summaryrefslogtreecommitdiff
path: root/src/lib/ector
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-08-22 13:00:01 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-22 13:00:01 +0900
commit34dc52dbd2216f52a006e3855fbd3bca096cc0b6 (patch)
treef0b8d112bafc2567767992eea113fe5f35f9849f /src/lib/ector
parenta569a4eb276720fb0dcd56c6b9fd27d1a9156619 (diff)
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
Diffstat (limited to 'src/lib/ector')
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c3
-rw-r--r--src/lib/ector/software/ector_software_private.h2
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c6
3 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index b9cf1fa..6210179 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -604,7 +604,8 @@ _update_rle(void *data, Ector_Software_Thread *thread)
604 task->pd->public_shape->stroke.scale), 604 task->pd->public_shape->stroke.scale),
605 task->pd->public_shape->stroke.cap, 605 task->pd->public_shape->stroke.cap,
606 task->pd->public_shape->stroke.join, 606 task->pd->public_shape->stroke.join,
607 task->pd->base->m); 607 task->pd->base->m,
608 task->pd->public_shape->stroke.miterlimit);
608 609
609 if (task->pd->public_shape->stroke.dash) 610 if (task->pd->public_shape->stroke.dash)
610 { 611 {
diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h
index 62d1c3f..f7e47fe 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -118,7 +118,7 @@ void ector_software_rasterizer_init(Software_Rasterizer *rasterizer);
118 118
119void ector_software_rasterizer_stroke_set(Ector_Software_Thread *thread, Software_Rasterizer *rasterizer, 119void ector_software_rasterizer_stroke_set(Ector_Software_Thread *thread, Software_Rasterizer *rasterizer,
120 double width, 120 double width,
121 Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style, Eina_Matrix3 *m); 121 Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style, Eina_Matrix3 *m, double miterlimit);
122 122
123void ector_software_rasterizer_transform_set(Software_Rasterizer *rasterizer, Eina_Matrix3 *t); 123void ector_software_rasterizer_transform_set(Software_Rasterizer *rasterizer, Eina_Matrix3 *t);
124void ector_software_rasterizer_color_set(Software_Rasterizer *rasterizer, int r, int g, int b, int a); 124void ector_software_rasterizer_color_set(Software_Rasterizer *rasterizer, int r, int g, int b, int a);
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index e9efb3f..d6242a0 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -685,15 +685,15 @@ void ector_software_thread_shutdown(Ector_Software_Thread *thread)
685void ector_software_rasterizer_stroke_set(Ector_Software_Thread *thread, 685void ector_software_rasterizer_stroke_set(Ector_Software_Thread *thread,
686 Software_Rasterizer *rasterizer EINA_UNUSED, double width, 686 Software_Rasterizer *rasterizer EINA_UNUSED, double width,
687 Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style, 687 Efl_Gfx_Cap cap_style, Efl_Gfx_Join join_style,
688 Eina_Matrix3 *m) 688 Eina_Matrix3 *m, double miterlimit)
689{ 689{
690 SW_FT_Stroker_LineCap cap; 690 SW_FT_Stroker_LineCap cap;
691 SW_FT_Stroker_LineJoin join; 691 SW_FT_Stroker_LineJoin join;
692 int stroke_width; 692 int stroke_width;
693 double scale_factor = 1.0; 693 double scale_factor = 1.0;
694 694
695 //TODO: The interface to change the value of the miter_limit is not yet ready. 695 // convert to freetype co-ordinate
696 SW_FT_Fixed miter_limit = 0x4<<16; 696 SW_FT_Fixed miter_limit = miterlimit * (1<<16);
697 697
698 if (m) 698 if (m)
699 { 699 {