Permalink
Browse files

update openvg.xtm

fewer polymorphic shenanigans, more efficient
  • Loading branch information...
1 parent a38b0ee commit 53aa0a7d69ec773b98ddc18b415b890d7c1edc4c @benswift benswift committed Feb 27, 2014
Showing with 100 additions and 331 deletions.
  1. +62 −193 libs/external/openvg.xtm
  2. +38 −138 libs/xtm.xtm
View
255 libs/external/openvg.xtm
@@ -487,7 +487,7 @@
(define xtm-vg-create-context
(lambda (w h)
(xtm_vg_create_contexti32 (real->integer w)
- (real->integer h))))
+ (real->integer h))))
(bind-func xtm_vg_reset_matrices
(lambda ()
@@ -499,85 +499,36 @@
;; clear canvas
-(bind-alias xtm_colour |4,VGfloat|)
-(bind-alias xtm_color xtm_colour)
+(bind-alias xtm_color |4,VGfloat|)
+(bind-alias xtm_colour xtm_color)
-(bind-func xtm_vg_clear_rect32
- (lambda (r g b a x y w h)
- (let ((clear_colour:xtm_colour* (salloc)))
- (afill! clear_colour r g b a)
- (vgSetfv VG_CLEAR_COLOR 4 (cast clear_colour VGfloat*))
- (vgClear x y w h))))
+(bind-func xtm_vg_clear_rect
+ (lambda (x y w h clear_color:xtm_color*)
+ (vgSetfv VG_CLEAR_COLOR 4 (cast clear_color VGfloat*))
+ (vgClear x y w h)))
-(bind-func xtm_vg_clear_rect64
- (lambda (r g b a x y w h)
- (let ((clear_colour:xtm_colour* (salloc)))
- (afill! clear_colour (dtof r) (dtof g) (dtof b) (dtof a))
- (vgSetfv VG_CLEAR_COLOR 4 (cast clear_colour VGfloat*))
- (vgClear (i64toi32 x) (i64toi32 y) (i64toi32 w) (i64toi32 h)))))
-
-(bind-poly xtm_vg_clear_rect xtm_vg_clear_rect32)
-(bind-poly xtm_vg_clear_rect xtm_vg_clear_rect64)
-
-;; perhaps need 32 and 64-bit versions of this one as well?
-(bind-func xtm_vg_clear32
- (lambda (r g b a w h)
- (xtm_vg_clear_rect32 r g b a 0 0 w h)))
-
-(bind-func xtm_vg_clear64
- (lambda (r g b a w h)
- (xtm_vg_clear_rect64 r g b a 0 0 w h)))
-
-(bind-poly xtm_vg_clear xtm_vg_clear32)
-(bind-poly xtm_vg_clear xtm_vg_clear64)
+(bind-func xtm_vg_clear
+ (lambda (w h clear_color:xtm_color*)
+ (xtm_vg_clear_rect 0 0 w h clear_color)))
;; paint
-(bind-func xtm_paint_setupf
- (lambda (paint r g b a)
- (let ((paint_colour:xtm_colour* (salloc)))
- (vgSetParameteri paint VG_PAINT_TYPE VG_PAINT_TYPE_COLOR)
- (afill! paint_colour r g b a)
- (vgSetParameterfv paint VG_PAINT_COLOR 4 (cast paint_colour VGfloat*)))))
-
-(bind-func xtm_paint_setupd
- (lambda (paint r g b a)
- (let ((paint_colour:xtm_colour* (salloc)))
- (vgSetParameteri paint VG_PAINT_TYPE VG_PAINT_TYPE_COLOR)
- (afill! paint_colour (dtof r) (dtof g) (dtof b) (dtof a))
- (vgSetParameterfv paint VG_PAINT_COLOR 4 (cast paint_colour VGfloat*)))))
-
-(bind-poly xtm_paint_setup xtm_paint_setupf)
-(bind-poly xtm_paint_setup xtm_paint_setupd)
-
-(bind-func xtm_paint_setup_strokef
- (lambda (paint r g b a width)
- (xtm_paint_setupf paint r g b a)
- (vgSetPaint paint VG_STROKE_PATH)
- (vgSetf VG_STROKE_LINE_WIDTH width)))
+(bind-func xtm_paint_set_color
+ (lambda (paint paint_color:xtm_color*)
+ (vgSetParameteri paint VG_PAINT_TYPE VG_PAINT_TYPE_COLOR)
+ (vgSetParameterfv paint VG_PAINT_COLOR 4 (cast paint_color VGfloat*))))
-(bind-func xtm_paint_setup_stroked
- (lambda (paint r g b a width)
- (xtm_paint_setupd paint r g b a)
+(bind-func xtm_paint_set_stroke
+ (lambda (paint stroke_color:xtm_color* width)
+ (xtm_paint_set_color paint stroke_color)
(vgSetPaint paint VG_STROKE_PATH)
- (vgSetf VG_STROKE_LINE_WIDTH (dtof width))))
-
-(bind-poly xtm_paint_setup_stroke xtm_paint_setup_strokef)
-(bind-poly xtm_paint_setup_stroke xtm_paint_setup_stroked)
-
-(bind-func xtm_paint_setup_fillf
- (lambda (paint r g b a)
- (xtm_paint_setupf paint r g b a)
- (vgSetPaint paint VG_FILL_PATH)))
+ (vgSetf VG_STROKE_LINE_WIDTH width)))
-(bind-func xtm_paint_setup_filld
- (lambda (paint r g b a)
- (xtm_paint_setupd paint r g b a)
+(bind-func xtm_paint_set_fill
+ (lambda (paint fill_color:xtm_color*)
+ (xtm_paint_set_color paint fill_color)
(vgSetPaint paint VG_FILL_PATH)))
-(bind-poly xtm_paint_setup_fill xtm_paint_setup_fillf)
-(bind-poly xtm_paint_setup_fill xtm_paint_setup_filld)
-
(bind-func xtm_destroy_paint
(lambda (paint)
(vgDestroyPaint paint)))
@@ -628,18 +579,15 @@
;; convenience functions for adding shapes to path
;; from vgu.h
-(bind-func xtm_add_linef
+(bind-func xtm_add_line
(lambda (path x1 y1 x2 y2)
(vguLine path x1 y1 x2 y2)))
(bind-func xtm_add_lined
(lambda (path x1 y1 x2 y2)
(vguLine path (dtof x1) (dtof y1) (dtof x2) (dtof y2))))
-(bind-poly xtm_add_line xtm_add_linef)
-(bind-poly xtm_add_line xtm_add_lined)
-
-(bind-func xtm_add_polyf
+(bind-func xtm_add_poly
(lambda (path points:VGfloat* npoints closed)
(vguPolygon path points npoints closed)))
@@ -651,10 +599,7 @@
(pset! pointsf i (dtof (pref points i))))
(vguPolygon path pointsf (i64toi32 npoints) closed))))
-(bind-poly xtm_add_poly xtm_add_polyf)
-(bind-poly xtm_add_poly xtm_add_polyd)
-
-(bind-func xtm_add_trif
+(bind-func xtm_add_tri
(lambda (path x1 y1 x2 y2 x3 y3)
(let ((points:VGfloat* (salloc 6)))
(pfill! points x1 y1 x2 y2 x3 y3)
@@ -664,12 +609,9 @@
(lambda (path x1 y1 x2 y2 x3 y3)
(let ((points:double* (salloc 6)))
(pfill! points x1 y1 x2 y2 x3 y3)
- (xtm_add_poly path points 3 VG_TRUE))))
+ (xtm_add_polyd path points 3 VG_TRUE))))
-(bind-poly xtm_add_tri xtm_add_trif)
-(bind-poly xtm_add_tri xtm_add_trid)
-
-(bind-func xtm_add_quadf
+(bind-func xtm_add_quad
(lambda (path x1 y1 x2 y2 x3 y3 x4 y4)
(let ((points:VGfloat* (salloc 8)))
(pfill! points x1 y1 x2 y2 x3 y3 x4 y4)
@@ -679,45 +621,33 @@
(lambda (path x1 y1 x2 y2 x3 y3 x4 y4)
(let ((points:double* (salloc 8)))
(pfill! points x1 y1 x2 y2 x3 y3 x4 y4)
- (xtm_add_poly path points 4 VG_TRUE))))
-
-(bind-poly xtm_add_quad xtm_add_quadf)
-(bind-poly xtm_add_quad xtm_add_quadd)
+ (xtm_add_polyd path points 4 VG_TRUE))))
-(bind-func xtm_add_rectf
+(bind-func xtm_add_rect
(lambda (path x y w h)
(vguRect path x y w h)))
(bind-func xtm_add_rectd
(lambda (path x y w h)
(vguRect path (dtof x) (dtof y) (dtof w) (dtof h))))
-(bind-poly xtm_add_rect xtm_add_rectf)
-(bind-poly xtm_add_rect xtm_add_rectd)
-
-(bind-func xtm_add_round_rectf
+(bind-func xtm_add_round_rect
(lambda (path x y w h arcw arch)
(vguRoundRect path x y w h arcw arch)))
(bind-func xtm_add_round_rectd
(lambda (path x y w h arcw arch)
(vguRoundRect path (dtof x) (dtof y) (dtof w) (dtof h) (dtof arcw) (dtof arch))))
-(bind-poly xtm_add_round_rect xtm_add_round_rectf)
-(bind-poly xtm_add_round_rect xtm_add_round_rectd)
-
-(bind-func xtm_add_ellipsef
+(bind-func xtm_add_ellipse
(lambda (path cx cy w h)
(vguEllipse path cx cy w h)))
(bind-func xtm_add_ellipsed
(lambda (path cx cy w h)
(vguEllipse path (dtof cx) (dtof cy) (dtof w) (dtof h))))
-(bind-poly xtm_add_ellipse xtm_add_ellipsef)
-(bind-poly xtm_add_ellipse xtm_add_ellipsed)
-
-(bind-func xtm_add_arcf
+(bind-func xtm_add_arc
(lambda (path x y w h start_angle angle_extent arc_type)
(vguArc path x y w h start_angle angle_extent arc_type)))
@@ -732,27 +662,17 @@
(dtof angle_extent)
arc_type)))
-(bind-poly xtm_add_arc xtm_add_arcf)
-(bind-poly xtm_add_arc xtm_add_arcd)
-
;; path length
(bind-func xtm_path_num_segments
(lambda (path)
- (i32toi64 (vgGetParameteri path VG_PATH_NUM_SEGMENTS))))
+ (vgGetParameteri path VG_PATH_NUM_SEGMENTS)))
-(bind-func xtm_path_lengthf
+(bind-func xtm_path_length
(lambda (path start_segment num_segments)
(vgPathLength path start_segment num_segments)))
-(bind-func xtm_path_lengthd
- (lambda (path start_segment num_segments)
- (ftod (vgPathLength path (i64toi32 start_segment) (i64toi32 num_segments)))))
-
-(bind-poly xtm_path_length xtm_path_lengthf)
-(bind-poly xtm_path_length xtm_path_lengthd)
-
-(bind-type xpoint <double,double>)
+(bind-type xpoint <VGfloat,VGfloat>)
;; these wrappers only check first segment of the path
@@ -765,8 +685,8 @@
(pref-ptr ptf 0)
(pref-ptr ptf 1)
null null) ;; don't calculate tangent
- (tset! point 0 (ftod (pref ptf 0)))
- (tset! point 1 (ftod (pref ptf 1)))
+ (tset! point 0 (pref ptf 0))
+ (tset! point 1 (pref ptf 1))
void)))
(bind-func xtm_point_along_path_norm
@@ -785,7 +705,7 @@
;; higher-level path drawing with xtlang closures
-(bind-func xtm_draw_linef
+(bind-func xtm_draw_line
(lambda (x1 y1 x2 y2)
(let ((path (xtm_create_path))
(vgu_err (vguLine path x1 y1 x2 y2)))
@@ -801,10 +721,7 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_line xtm_draw_linef)
-(bind-poly xtm_draw_line xtm_draw_lined)
-
-(bind-func xtm_draw_polyf
+(bind-func xtm_draw_poly
(lambda (points:VGfloat* npoints closed)
(let ((path (xtm_create_path))
(vgu_err (vguPolygon path points npoints closed)))
@@ -820,13 +737,10 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_poly xtm_draw_polyf)
-(bind-poly xtm_draw_poly xtm_draw_polyd)
-
-(bind-func xtm_draw_trif
+(bind-func xtm_draw_tri
(lambda (x1 y1 x2 y2 x3 y3)
(let ((path (xtm_create_path))
- (vgu_err (xtm_add_trif path x1 y1 x2 y2 x3 y3)))
+ (vgu_err (xtm_add_tri path x1 y1 x2 y2 x3 y3)))
(if (= vgu_err VGU_NO_ERROR)
(xtm_draw_path path))
void)))
@@ -839,13 +753,10 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_tri xtm_draw_trif)
-(bind-poly xtm_draw_tri xtm_draw_trid)
-
-(bind-func xtm_draw_quadf
+(bind-func xtm_draw_quad
(lambda (x1 y1 x2 y2 x3 y3 x4 y4)
(let ((path (xtm_create_path))
- (vgu_err (xtm_add_quadf path x1 y1 x2 y2 x3 y3 x4 y4)))
+ (vgu_err (xtm_add_quad path x1 y1 x2 y2 x3 y3 x4 y4)))
(if (= vgu_err VGU_NO_ERROR)
(xtm_draw_path path))
void)))
@@ -858,10 +769,7 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_quad xtm_draw_quadf)
-(bind-poly xtm_draw_quad xtm_draw_quadd)
-
-(bind-func xtm_draw_rectf
+(bind-func xtm_draw_rect
(lambda (x y w h)
(let ((path (xtm_create_path))
(vgu_err (vguRect path x y w h)))
@@ -877,10 +785,7 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_rect xtm_draw_rectf)
-(bind-poly xtm_draw_rect xtm_draw_rectd)
-
-(bind-func xtm_draw_round_rectf
+(bind-func xtm_draw_round_rect
(lambda (x y w h arcw arch)
(let ((path (xtm_create_path))
(vgu_err (vguRoundRect path x y w h arcw arch)))
@@ -896,10 +801,7 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_round_rect xtm_draw_round_rectf)
-(bind-poly xtm_draw_round_rect xtm_draw_round_rectd)
-
-(bind-func xtm_draw_ellipsef
+(bind-func xtm_draw_ellipse
(lambda (cx cy w h)
(let ((path (xtm_create_path))
(vgu_err (vguEllipse path cx cy w h)))
@@ -915,10 +817,7 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_ellipse xtm_draw_ellipsef)
-(bind-poly xtm_draw_ellipse xtm_draw_ellipsed)
-
-(bind-func xtm_draw_arcf
+(bind-func xtm_draw_arc
(lambda (x y w h start_angle angle_extent arc_type)
(let ((path (xtm_create_path))
(vgu_err (vguArc path x y w h start_angle angle_extent arc_type)))
@@ -934,12 +833,9 @@
(xtm_draw_path path))
void)))
-(bind-poly xtm_draw_arc xtm_draw_arcf)
-(bind-poly xtm_draw_arc xtm_draw_arcd)
-
;; path matrix transformations
-(bind-func xtm_path_translatef
+(bind-func xtm_path_translate
(lambda (tx ty)
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgTranslate tx ty)))
@@ -949,10 +845,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgTranslate (dtof tx) (dtof ty))))
-(bind-poly xtm_path_translate xtm_path_translatef)
-(bind-poly xtm_path_translate xtm_path_translated)
-
-(bind-func xtm_path_scalef
+(bind-func xtm_path_scale
(lambda (sx sy)
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgScale sx sy)))
@@ -962,10 +855,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgScale (dtof sx) (dtof sy))))
-(bind-poly xtm_path_scale xtm_path_scalef)
-(bind-poly xtm_path_scale xtm_path_scaled)
-
-(bind-func xtm_path_shearf
+(bind-func xtm_path_shear
(lambda (shx shy)
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgShear shx shy)))
@@ -975,10 +865,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgShear (dtof shx) (dtof shy))))
-(bind-poly xtm_path_shear xtm_path_shearf)
-(bind-poly xtm_path_shear xtm_path_sheard)
-
-(bind-func xtm_path_rotatef
+(bind-func xtm_path_rotate
(lambda (angle)
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgRotate angle)))
@@ -988,23 +875,20 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_PATH_USER_TO_SURFACE)
(vgRotate (dtof angle))))
-(bind-poly xtm_path_rotate xtm_path_rotatef)
-(bind-poly xtm_path_rotate xtm_path_rotated)
-
;; images
;; this image stuff assumes VG_lARGB_8888 image format
(bind-func xtm_create_vgimage
(lambda (width height)
- (vgCreateImage VG_lARGB_8888 (i64toi32 width) (i64toi32 height) VG_IMAGE_QUALITY_BETTER)))
+ (vgCreateImage VG_lARGB_8888 width height VG_IMAGE_QUALITY_BETTER)))
(bind-func xtm_destroy_vgimage
(lambda (image)
(vgDestroyImage image)))
(bind-func xtm_set_vgimage_subdata
(lambda (image data data_stride x y width height)
- (vgImageSubData image data (i64toi32 data_stride) VG_lARGB_8888 (i64toi32 x) (i64toi32 y) (i64toi32 width) (i64toi32 height))))
+ (vgImageSubData image data data_stride VG_lARGB_8888 x y width height)))
(bind-func xtm_load_vgimage
(lambda (path)
@@ -1016,7 +900,7 @@
(h (pref h_ptr 0))
(c (pref c_ptr 0))
(row:i8* null)
- (img (xtm_create_vgimage (i32toi64 w) (i32toi64 h)))
+ (img (xtm_create_vgimage w h))
(i 0))
(if (null? data)
(begin (printf "Error: image not loaded\n") null)
@@ -1026,10 +910,10 @@
(set! row (pref-ptr data (* i (* w 4))))
(xtm_set_vgimage_subdata img
row
- (i32toi64 (* w 4))
+ (* w 4)
0
- (i32toi64 (- h i 1))
- (i32toi64 w)
+ (- h i 1)
+ w
1))
img)))))
@@ -1039,7 +923,7 @@
;; image matrix transformations
-(bind-func xtm_vgimage_translatef
+(bind-func xtm_vgimage_translate
(lambda (tx ty)
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgTranslate tx ty)))
@@ -1049,10 +933,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgTranslate (dtof tx) (dtof ty))))
-(bind-poly xtm_vgimage_translate xtm_vgimage_translatef)
-(bind-poly xtm_vgimage_translate xtm_vgimage_translated)
-
-(bind-func xtm_vgimage_scalef
+(bind-func xtm_vgimage_scale
(lambda (sx sy)
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgScale sx sy)))
@@ -1062,10 +943,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgScale (dtof sx) (dtof sy))))
-(bind-poly xtm_vgimage_scale xtm_vgimage_scalef)
-(bind-poly xtm_vgimage_scale xtm_vgimage_scaled)
-
-(bind-func xtm_vgimage_shearf
+(bind-func xtm_vgimage_shear
(lambda (shx shy)
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgShear shx shy)))
@@ -1075,10 +953,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgShear (dtof shx) (dtof shy))))
-(bind-poly xtm_vgimage_shear xtm_vgimage_shearf)
-(bind-poly xtm_vgimage_shear xtm_vgimage_sheard)
-
-(bind-func xtm_vgimage_rotatef
+(bind-func xtm_vgimage_rotate
(lambda (angle)
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgRotate angle)))
@@ -1088,10 +963,7 @@
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgRotate (dtof angle))))
-(bind-poly xtm_vgimage_rotate xtm_vgimage_rotatef)
-(bind-poly xtm_vgimage_rotate xtm_vgimage_rotated)
-
-(bind-func xtm_scale_and_draw_vgimagef
+(bind-func xtm_scale_and_draw_vgimage
(lambda (image xscale yscale)
(vgSeti VG_MATRIX_MODE VG_MATRIX_IMAGE_USER_TO_SURFACE)
(vgScale xscale yscale)
@@ -1103,10 +975,7 @@
(vgScale (dtof xscale) (dtof yscale))
(vgDrawImage image)))
-(bind-poly xtm_scale_and_draw_vgimage xtm_scale_and_draw_vgimagef)
-(bind-poly xtm_scale_and_draw_vgimage xtm_scale_and_draw_vgimaged)
-
-;; working with colours, dealing with double -> uint8 conversions, etc.
+;; working with colors, dealing with double -> uint8 conversions, etc.
;; clip input values into [0.0,1.0]
(bind-func xtm_set_color32
View
176 libs/xtm.xtm
@@ -4851,24 +4851,20 @@ void main( void ) {
(bind-lib libopenvg vguComputeWarpQuadToSquare [i32,float,float,float,float,float,float,float,float,float*]*)
(bind-lib libopenvg vguComputeWarpSquareToQuad [i32,float,float,float,float,float,float,float,float,float*]*)
(bind-lib libopenvg vguComputeWarpQuadToQuad [i32,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float*]*)
+
(bind-lib-func stdlib xtm_vg_print_error [i32]*)
(bind-lib-func stdlib xtm_vg_create_contexti32 [i32,i32,i32]*)
(bind-lib-func stdlib xtm_vg_create_contextf [i32,float,float]*)
(bind-lib-func stdlib xtm_vg_reset_matrices [void]*)
-(bind-lib-func stdlib xtm_create_path [i8*]*)
-(bind-alias xtm_colour |4,float|)
(bind-alias xtm_color |4,float|)
-(bind-lib-func stdlib xtm_vg_clear_rect32 [void,float,float,float,float,i32,i32,i32,i32]*)
-(bind-lib-func stdlib xtm_vg_clear_rect64 [void,double,double,double,double,i64,i64,i64,i64]*)
-(bind-lib-func stdlib xtm_vg_clear32 [void,float,float,float,float,i32,i32]*)
-(bind-lib-func stdlib xtm_vg_clear64 [void,double,double,double,double,i64,i64]*)
-(bind-lib-func stdlib xtm_paint_setupf [void,i8*,float,float,float,float]*)
-(bind-lib-func stdlib xtm_paint_setupd [void,i8*,double,double,double,double]*)
-(bind-lib-func stdlib xtm_paint_setup_strokef [void,i8*,float,float,float,float,float]*)
-(bind-lib-func stdlib xtm_paint_setup_stroked [void,i8*,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_paint_setup_fillf [void,i8*,float,float,float,float]*)
-(bind-lib-func stdlib xtm_paint_setup_filld [void,i8*,double,double,double,double]*)
+(bind-alias xtm_colour xtm_color)
+(bind-lib-func stdlib xtm_vg_clear_rect [void,i32,i32,i32,i32,|4,float|*]*)
+(bind-lib-func stdlib xtm_vg_clear [void,i32,i32,|4,float|*]*)
+(bind-lib-func stdlib xtm_paint_set_color [void,i8*,|4,float|*]*)
+(bind-lib-func stdlib xtm_paint_set_stroke [void,i8*,|4,float|*,float]*)
+(bind-lib-func stdlib xtm_paint_set_fill [void,i8*,|4,float|*]*)
(bind-lib-func stdlib xtm_destroy_paint [void,i8*]*)
+(bind-lib-func stdlib xtm_create_path [i8*]*)
(bind-lib-func stdlib xtm_draw_path_keep [void,i8*]*)
(bind-lib-func stdlib xtm_draw_path [void,i8*]*)
(bind-lib-func stdlib xtm_clear_path [void,i8*]*)
@@ -4877,68 +4873,65 @@ void main( void ) {
(bind-lib-func stdlib xtm_stroke_path [void,i8*]*)
(bind-lib-func stdlib xtm_fill_path_keep [void,i8*]*)
(bind-lib-func stdlib xtm_fill_path [void,i8*]*)
-(bind-lib-func stdlib xtm_add_linef [i32,i8*,float,float,float,float]*)
+(bind-lib-func stdlib xtm_add_line [i32,i8*,float,float,float,float]*)
(bind-lib-func stdlib xtm_add_lined [i32,i8*,double,double,double,double]*)
-(bind-lib-func stdlib xtm_add_polyf [i32,i8*,float*,i32,i32]*)
+(bind-lib-func stdlib xtm_add_poly [i32,i8*,float*,i32,i32]*)
(bind-lib-func stdlib xtm_add_polyd [i32,i8*,double*,i64,i32]*)
-(bind-lib-func stdlib xtm_add_trif [i32,i8*,float,float,float,float,float,float]*)
+(bind-lib-func stdlib xtm_add_tri [i32,i8*,float,float,float,float,float,float]*)
(bind-lib-func stdlib xtm_add_trid [i32,i8*,double,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_add_quadf [i32,i8*,float,float,float,float,float,float,float,float]*)
+(bind-lib-func stdlib xtm_add_quad [i32,i8*,float,float,float,float,float,float,float,float]*)
(bind-lib-func stdlib xtm_add_quadd [i32,i8*,double,double,double,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_add_rectf [i32,i8*,float,float,float,float]*)
+(bind-lib-func stdlib xtm_add_rect [i32,i8*,float,float,float,float]*)
(bind-lib-func stdlib xtm_add_rectd [i32,i8*,double,double,double,double]*)
-(bind-lib-func stdlib xtm_add_round_rectf [i32,i8*,float,float,float,float,float,float]*)
+(bind-lib-func stdlib xtm_add_round_rect [i32,i8*,float,float,float,float,float,float]*)
(bind-lib-func stdlib xtm_add_round_rectd [i32,i8*,double,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_add_ellipsef [i32,i8*,float,float,float,float]*)
+(bind-lib-func stdlib xtm_add_ellipse [i32,i8*,float,float,float,float]*)
(bind-lib-func stdlib xtm_add_ellipsed [i32,i8*,double,double,double,double]*)
-(bind-lib-func stdlib xtm_add_arcf [i32,i8*,float,float,float,float,float,float,i32]*)
+(bind-lib-func stdlib xtm_add_arc [i32,i8*,float,float,float,float,float,float,i32]*)
(bind-lib-func stdlib xtm_add_arcd [i32,i8*,double,double,double,double,double,double,i32]*)
-(bind-lib-func stdlib xtm_path_lengthf [float,i8*,i32,i32]*)
-(bind-lib-func stdlib xtm_path_lengthd [double,i8*,i64,i64]*)
-
-;; (bind-type xpoint <double,double>)
-(bind-lib-type stdlib xpoint <double,double>)
-
+(bind-lib-func stdlib xtm_path_num_segments [i32,i8*]*)
+(bind-lib-func stdlib xtm_path_length [float,i8*,i32,i32]*)
+(bind-lib-type stdlib xpoint <float,float>)
(bind-lib-func stdlib xtm_point_along_path [void,i8*,float,xpoint*]*)
(bind-lib-func stdlib xtm_point_along_path_norm [void,i8*,float,xpoint*]*)
-(bind-lib-func stdlib xtm_draw_linef [void,float,float,float,float]*)
+(bind-lib-func stdlib xtm_draw_line [void,float,float,float,float]*)
(bind-lib-func stdlib xtm_draw_lined [void,double,double,double,double]*)
-(bind-lib-func stdlib xtm_draw_polyf [void,float*,i32,i32]*)
+(bind-lib-func stdlib xtm_draw_poly [void,float*,i32,i32]*)
(bind-lib-func stdlib xtm_draw_polyd [void,double*,i64,i32]*)
-(bind-lib-func stdlib xtm_draw_trif [void,float,float,float,float,float,float]*)
+(bind-lib-func stdlib xtm_draw_tri [void,float,float,float,float,float,float]*)
(bind-lib-func stdlib xtm_draw_trid [void,double,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_draw_quadf [void,float,float,float,float,float,float,float,float]*)
+(bind-lib-func stdlib xtm_draw_quad [void,float,float,float,float,float,float,float,float]*)
(bind-lib-func stdlib xtm_draw_quadd [void,double,double,double,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_draw_rectf [void,float,float,float,float]*)
+(bind-lib-func stdlib xtm_draw_rect [void,float,float,float,float]*)
(bind-lib-func stdlib xtm_draw_rectd [void,double,double,double,double]*)
-(bind-lib-func stdlib xtm_draw_round_rectf [void,float,float,float,float,float,float]*)
+(bind-lib-func stdlib xtm_draw_round_rect [void,float,float,float,float,float,float]*)
(bind-lib-func stdlib xtm_draw_round_rectd [void,double,double,double,double,double,double]*)
-(bind-lib-func stdlib xtm_draw_ellipsef [void,float,float,float,float]*)
+(bind-lib-func stdlib xtm_draw_ellipse [void,float,float,float,float]*)
(bind-lib-func stdlib xtm_draw_ellipsed [void,double,double,double,double]*)
-(bind-lib-func stdlib xtm_draw_arcf [void,float,float,float,float,float,float,i32]*)
+(bind-lib-func stdlib xtm_draw_arc [void,float,float,float,float,float,float,i32]*)
(bind-lib-func stdlib xtm_draw_arcd [void,double,double,double,double,double,double,i32]*)
-(bind-lib-func stdlib xtm_path_translatef [void,float,float]*)
+(bind-lib-func stdlib xtm_path_translate [void,float,float]*)
(bind-lib-func stdlib xtm_path_translated [void,double,double]*)
-(bind-lib-func stdlib xtm_path_scalef [void,float,float]*)
+(bind-lib-func stdlib xtm_path_scale [void,float,float]*)
(bind-lib-func stdlib xtm_path_scaled [void,double,double]*)
-(bind-lib-func stdlib xtm_path_shearf [void,float,float]*)
+(bind-lib-func stdlib xtm_path_shear [void,float,float]*)
(bind-lib-func stdlib xtm_path_sheard [void,double,double]*)
-(bind-lib-func stdlib xtm_path_rotatef [void,float]*)
+(bind-lib-func stdlib xtm_path_rotate [void,float]*)
(bind-lib-func stdlib xtm_path_rotated [void,double]*)
-(bind-lib-func stdlib xtm_create_vgimage [i8*,i64,i64]*)
+(bind-lib-func stdlib xtm_create_vgimage [i8*,i32,i32]*)
(bind-lib-func stdlib xtm_destroy_vgimage [void,i8*]*)
-(bind-lib-func stdlib xtm_set_vgimage_subdata [void,i8*,i8*,i64,i64,i64,i64,i64]*)
+(bind-lib-func stdlib xtm_set_vgimage_subdata [void,i8*,i8*,i32,i32,i32,i32,i32]*)
(bind-lib-func stdlib xtm_load_vgimage [i8*,i8*]*)
(bind-lib-func stdlib xtm_draw_vgimage [void,i8*]*)
-(bind-lib-func stdlib xtm_vgimage_translatef [void,float,float]*)
+(bind-lib-func stdlib xtm_vgimage_translate [void,float,float]*)
(bind-lib-func stdlib xtm_vgimage_translated [void,double,double]*)
-(bind-lib-func stdlib xtm_vgimage_scalef [void,float,float]*)
+(bind-lib-func stdlib xtm_vgimage_scale [void,float,float]*)
(bind-lib-func stdlib xtm_vgimage_scaled [void,double,double]*)
-(bind-lib-func stdlib xtm_vgimage_shearf [void,float,float]*)
+(bind-lib-func stdlib xtm_vgimage_shear [void,float,float]*)
(bind-lib-func stdlib xtm_vgimage_sheard [void,double,double]*)
-(bind-lib-func stdlib xtm_vgimage_rotatef [void,float]*)
+(bind-lib-func stdlib xtm_vgimage_rotate [void,float]*)
(bind-lib-func stdlib xtm_vgimage_rotated [void,double]*)
-(bind-lib-func stdlib xtm_scale_and_draw_vgimagef [void,i8*,float,float]*)
+(bind-lib-func stdlib xtm_scale_and_draw_vgimage [void,i8*,float,float]*)
(bind-lib-func stdlib xtm_scale_and_draw_vgimaged [void,i8*,double,double]*)
(bind-lib-func stdlib xtm_set_color32 [i8,i8*,double,double,double,double]*)
(bind-lib-func stdlib xtm_color32_red [double,i8*]*)
@@ -4959,99 +4952,6 @@ void main( void ) {
(bind-poly xtm_vg_create_context xtm_vg_create_contexti32)
(bind-poly xtm_vg_create_context xtm_vg_create_contextf)
-(bind-poly xtm_vg_clear_rect xtm_vg_clear_rect32)
-(bind-poly xtm_vg_clear_rect xtm_vg_clear_rect64)
-
-(bind-poly xtm_vg_clear xtm_vg_clear32)
-(bind-poly xtm_vg_clear xtm_vg_clear64)
-
-(bind-poly xtm_path_translate xtm_path_translatef)
-(bind-poly xtm_path_translate xtm_path_translated)
-(bind-poly xtm_path_scale xtm_path_scalef)
-(bind-poly xtm_path_scale xtm_path_scaled)
-(bind-poly xtm_path_shear xtm_path_shearf)
-(bind-poly xtm_path_shear xtm_path_sheard)
-(bind-poly xtm_path_rotate xtm_path_rotatef)
-(bind-poly xtm_path_rotate xtm_path_rotated)
-(bind-poly xtm_vgimage_translate xtm_vgimage_translatef)
-(bind-poly xtm_vgimage_translate xtm_vgimage_translated)
-(bind-poly xtm_vgimage_scale xtm_vgimage_scalef)
-(bind-poly xtm_vgimage_scale xtm_vgimage_scaled)
-(bind-poly xtm_vgimage_shear xtm_vgimage_shearf)
-(bind-poly xtm_vgimage_shear xtm_vgimage_sheard)
-(bind-poly xtm_vgimage_rotate xtm_vgimage_rotatef)
-(bind-poly xtm_vgimage_rotate xtm_vgimage_rotated)
-(bind-poly xtm_scale_and_draw_vgimage xtm_scale_and_draw_vgimagef)
-(bind-poly xtm_scale_and_draw_vgimage xtm_scale_and_draw_vgimaged)
-
-(bind-poly xtm_draw_arc xtm_draw_arcf)
-(bind-poly xtm_draw_arc xtm_draw_arcd)
-
-(bind-poly xtm_draw_ellipse xtm_draw_ellipsef)
-(bind-poly xtm_draw_ellipse xtm_draw_ellipsed)
-
-(bind-poly xtm_draw_round_rect xtm_draw_round_rectf)
-(bind-poly xtm_draw_round_rect xtm_draw_round_rectd)
-
-(bind-poly xtm_draw_rect xtm_draw_rectf)
-(bind-poly xtm_draw_rect xtm_draw_rectd)
-
-(bind-poly xtm_draw_tri xtm_draw_trif)
-(bind-poly xtm_draw_tri xtm_draw_trid)
-
-(bind-poly xtm_draw_quad xtm_draw_quadf)
-(bind-poly xtm_draw_quad xtm_draw_quadd)
-
-(bind-poly xtm_draw_poly xtm_draw_polyf)
-(bind-poly xtm_draw_poly xtm_draw_polyd)
-
-(bind-poly xtm_draw_line xtm_draw_linef)
-(bind-poly xtm_draw_line xtm_draw_lined)
-
-(bind-poly xtm_add_arc xtm_add_arcf)
-(bind-poly xtm_add_arc xtm_add_arcd)
-
-(bind-poly xtm_add_ellipse xtm_add_ellipsef)
-(bind-poly xtm_add_ellipse xtm_add_ellipsed)
-
-(bind-poly xtm_add_round_rect xtm_add_round_rectf)
-(bind-poly xtm_add_round_rect xtm_add_round_rectd)
-
-(bind-poly xtm_add_rect xtm_add_rectf)
-(bind-poly xtm_add_rect xtm_add_rectd)
-
-(bind-poly xtm_path_length xtm_path_lengthf)
-(bind-poly xtm_path_length xtm_path_lengthd)
-
-(bind-poly xtm_paint_setup xtm_paint_setupf)
-(bind-poly xtm_paint_setup xtm_paint_setupd)
-
-(bind-poly xtm_paint_setup_stroke xtm_paint_setup_strokef)
-(bind-poly xtm_paint_setup_stroke xtm_paint_setup_stroked)
-
-(bind-poly xtm_paint_setup_stroke xtm_paint_setup_strokef)
-(bind-poly xtm_paint_setup_stroke xtm_paint_setup_stroked)
-
-(bind-poly xtm_paint_setup_fill xtm_paint_setup_fillf)
-(bind-poly xtm_paint_setup_fill xtm_paint_setup_filld)
-
-(bind-poly xtm_paint_setup_fill xtm_paint_setup_fillf)
-(bind-poly xtm_paint_setup_fill xtm_paint_setup_filld)
-
-(bind-poly xtm_add_line xtm_add_linef)
-(bind-poly xtm_add_line xtm_add_lined)
-
-(bind-poly xtm_add_poly xtm_add_polyf)
-(bind-poly xtm_add_poly xtm_add_polyd)
-
-(bind-poly xtm_add_tri xtm_add_trif)
-(bind-poly xtm_add_tri xtm_add_trid)
-
-(bind-poly xtm_add_quad xtm_add_quadf)
-(bind-poly xtm_add_quad xtm_add_quadd)
-
-(bind-poly xtm_paint_setup xtm_paint_setupf)
-(bind-poly xtm_paint_setup xtm_paint_setupd)
(define *xtmlib-openvg-loaded* #t)
(ascii-print-color 0 2 10)

0 comments on commit 53aa0a7

Please sign in to comment.