if (path_is_empty((struct path*)path))
return;
- path_render((struct path*)path, paintModes);
+ path_render((struct path*)path, paintModes,
+ &ctx->state.vg.path_user_to_surface_matrix);
}
struct vg_context *ctx = vg_current_context();
const VGfloat fill_color[4] = {1.f, 1.f, 1.f, 1.f};
struct pipe_screen *screen = ctx->pipe->screen;
+ struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
struct pipe_surface *surface;
surface = screen->get_tex_surface(screen, layer->sampler_view->texture, 0, 0, 0,
setup_mask_framebuffer(surface, layer->width, layer->height);
if (paint_modes & VG_FILL_PATH) {
- struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
path_fill(path, mat);
}
if (paint_modes & VG_STROKE_PATH){
- path_stroke(path);
+ path_stroke(path, mat);
}
return stroker.base.path;
}
-void path_render(struct path *p, VGbitfield paintModes)
+void path_render(struct path *p, VGbitfield paintModes,
+ struct matrix *mat)
{
struct vg_context *ctx = vg_current_context();
- struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
vg_validate_state(ctx);
return;
shader_set_paint(ctx->shader, ctx->state.vg.stroke_paint);
shader_bind(ctx->shader);
- path_stroke(p);
+ path_stroke(p, mat);
}
}
}
}
-void path_stroke(struct path *p)
+void path_stroke(struct path *p, struct matrix *mat)
{
struct vg_context *ctx = vg_current_context();
- struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
VGFillRule old_fill = ctx->state.vg.fill_rule;
struct matrix identity;
struct path *stroke;
VGfloat amount);
void path_clear(struct path *p, VGbitfield capabilities);
-void path_render(struct path *p, VGbitfield paintModes);
+void path_render(struct path *p, VGbitfield paintModes, struct matrix *mat);
void path_fill(struct path *p, struct matrix *mat);
-void path_stroke(struct path *p);
+void path_stroke(struct path *p, struct matrix *mat);
void path_move_to(struct path *p, float x, float y);
void path_line_to(struct path *p, float x, float y);