add vgcanvas_set_stroke_gradient/vgcanvas_set_fill_gradient

This commit is contained in:
lixianjing 2021-06-30 08:18:04 +08:00
parent accde8d3ae
commit 95154a7b24
2 changed files with 3 additions and 3 deletions

View File

@ -54,12 +54,12 @@ if OS_NAME == 'Windows':
else:
NANOVG_BACKEND='GL3'
#VGCANVAS='CAIRO'
#NANOVG_BACKEND='GLES2'
#NANOVG_BACKEND='GLES3'
#NANOVG_BACKEND='AGG'
#NANOVG_BACKEND='BGFX'
#NANOVG_BACKEND='AGGE'
VGCANVAS='CAIRO'
FRAME_BUFFER_FORMAT=''
if VGCANVAS == 'CAIRO':

View File

@ -671,9 +671,9 @@ static cairo_pattern_t* vgcanvas_cairo_create_pattern_from_gradient(const vg_gra
cairo_pattern_t* pattern = NULL;
if (gradient->type == VG_GRADIENT_LINEAR) {
pattern = cairo_pattern_create_linear(sx, sy, ex, ey);
pattern = cairo_pattern_create_linear(gradient->sx, gradient->sy, gradient->ex, gradient->ey);
} else if (gradient->type == VG_GRADIENT_RADIAL) {
pattern = cairo_pattern_create_radial(cx, cy, inr, cx, cy, outr);
pattern = cairo_pattern_create_radial(gradient->sx, gradient->sy, gradient->ex, gradient->sx, gradient->sy, gradient->ey);
}
return_value_if_fail(pattern != NULL, NULL);