6 const VGfloat white_color
[4] = {1.0, 1.0, 1.0, 1.0};
7 const VGfloat color
[4] = {0.4, 0.1, 1.0, 1.0};
16 VGfloat clearColor
[] = {0.0f
, 0.0f
, 0.0f
, 1.0f
};/* black color */
17 VGfloat greenColor
[] = {0.0f
, 1.0f
, 0.0f
, 1.0f
};/* green color */
18 VGint arcType
= VGU_ARC_OPEN
;
19 VGfloat x
, y
, w
, h
, startAngle
, angleExtent
;
33 paint
= vgCreatePaint();
35 vgSetPaint(paint
, VG_STROKE_PATH
);
36 vgSetParameterfv(paint
, VG_PAINT_COLOR
, 4, greenColor
);
37 vgSetParameteri( paint
, VG_PAINT_TYPE
, VG_PAINT_TYPE_COLOR
);
38 vgSetf(VG_STROKE_LINE_WIDTH
, 6.0f
);
39 vgSeti(VG_RENDERING_QUALITY
, VG_RENDERING_QUALITY_NONANTIALIASED
);
40 vgSetfv(VG_CLEAR_COLOR
, 4, clearColor
);
42 path
= vgCreatePath(VG_PATH_FORMAT_STANDARD
, VG_PATH_DATATYPE_F
,
43 1.0f
, 0.0f
, 0, 0, VG_PATH_CAPABILITY_ALL
);
45 vguArc(path
, x
, y
, w
, h
, startAngle
, angleExtent
, arcType
);
47 vgSeti(VG_STROKE_CAP_STYLE
, VG_CAP_BUTT
);
48 vgSeti(VG_STROKE_JOIN_STYLE
, VG_JOIN_BEVEL
);
49 vgSetf(VG_STROKE_MITER_LIMIT
, 4.0f
);
52 /* new window size or exposure */
62 vgClear(0, 0, window_width(), window_height());
63 vgDrawPath(path
, VG_STROKE_PATH
);
69 int main(int argc
, char **argv
)
71 // set_window_size(64, 63);
72 return run(argc
, argv
, init
, reshape
,