forked from enlightenment/efl
efl_canvas_vg_shape/ector_software : Set and use stroke miterlimit
Summary: efl_canvas_vg_shape is set to miterlimit with Efl.Gfx.Shape.stroke_miterlimit and pass the value from rasterizer to freetype. NOTE: The default value is 4. It only refers to the standard of web svg. https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit Depends D9657 Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Subscribers: cedric, #committers, #reviewers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9665
This commit is contained in:
parent
a569a4eb27
commit
34dc52dbd2
|
@ -604,7 +604,8 @@ _update_rle(void *data, Ector_Software_Thread *thread)
|
|||
task->pd->public_shape->stroke.scale),
|
||||
task->pd->public_shape->stroke.cap,
|
||||
task->pd->public_shape->stroke.join,
|
||||
task->pd->base->m);
|
||||
task->pd->base->m,
|
||||
task->pd->public_shape->stroke.miterlimit);
|
||||
|
||||
if (task->pd->public_shape->stroke.dash)
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@ void ector_software_rasterizer_init(Software_Rasterizer *rasterizer);
|
|||
|
||||
void ector_software_rasterizer_stroke_set(Ector_Software_Thread *thread, Software_Rasterizer *rasterizer,
|
||||
double width,
|
||||
Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style, Eina_Matrix3 *m);
|
||||
Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style, Eina_Matrix3 *m, double miterlimit);
|
||||
|
||||
void ector_software_rasterizer_transform_set(Software_Rasterizer *rasterizer, Eina_Matrix3 *t);
|
||||
void ector_software_rasterizer_color_set(Software_Rasterizer *rasterizer, int r, int g, int b, int a);
|
||||
|
|
|
@ -685,15 +685,15 @@ void ector_software_thread_shutdown(Ector_Software_Thread *thread)
|
|||
void ector_software_rasterizer_stroke_set(Ector_Software_Thread *thread,
|
||||
Software_Rasterizer *rasterizer EINA_UNUSED, double width,
|
||||
Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style,
|
||||
Eina_Matrix3 *m)
|
||||
Eina_Matrix3 *m, double miterlimit)
|
||||
{
|
||||
SW_FT_Stroker_LineCap cap;
|
||||
SW_FT_Stroker_LineJoin join;
|
||||
int stroke_width;
|
||||
double scale_factor = 1.0;
|
||||
|
||||
//TODO: The interface to change the value of the miter_limit is not yet ready.
|
||||
SW_FT_Fixed miter_limit = 0x4<<16;
|
||||
// convert to freetype co-ordinate
|
||||
SW_FT_Fixed miter_limit = miterlimit * (1<<16);
|
||||
|
||||
if (m)
|
||||
{
|
||||
|
|
|
@ -132,6 +132,10 @@ _efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *p
|
|||
efl_gfx_shape_stroke_cap_set(obj, EFL_GFX_CAP_BUTT);
|
||||
efl_gfx_shape_stroke_join_set(obj, EFL_GFX_JOIN_MITER);
|
||||
|
||||
//NOTE: The default value is 4. It only refers to the standard of web svg.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit
|
||||
efl_gfx_shape_stroke_miterlimit_set(obj, 4);
|
||||
|
||||
nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
|
||||
nd->render_pre = _efl_canvas_vg_shape_render_pre;
|
||||
nd->data = pd;
|
||||
|
|
Loading…
Reference in New Issue