#define ENABLE_TIZEN_SUPPORT_COMPLEX_FONTS_SHAPING 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Support complex fonts shaping */
#define ENABLE_TIZEN_FALLBACK_FONTDATA 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Add the fallback fontData to FontFallbackList */
#define ENABLE_TIZEN_COLLECT_HARFBUZZRUN 1 /* Rashmi Shyamasundar(rashmi.s2@samsung.com) Create proper harfBuzzRun for a word which follows a space */
+#define ENABLE_TIZEN_CANVAS_2D_LINE_JOIN 1 /* Rashmi Shyamasundar(rashmi.s2@samsung.com) Save the value of lineJoin in GraphicsContextState */
#define ENABLE_TIZEN_CONTEXTSHADOW_BLUR_NEON 0 /* use neon shadowblur function in ContextShadow.cpp <hyunki.baik@samsung.com> */
#define ENABLE_TIZEN_ON_AUTHENTICATION_REQUESTED 1 /* Sungman Kim(ssungmai.kim@samsung.com) : Implement to requested authentication signal handling method */
setPlatformShouldSmoothFonts(m_state.shouldSmoothFonts);
setPlatformTextDrawingMode(m_state.textDrawingMode);
setPlatformCompositeOperation(m_state.compositeOperator);
+#if ENABLE(TIZEN_CANVAS_2D_LINE_JOIN)
+ setPlatformLineJoin(m_state.lineJoin);
+#endif
}
#endif
struct GraphicsContextState {
GraphicsContextState()
: strokeThickness(0)
+#if ENABLE(TIZEN_CANVAS_2D_LINE_JOIN)
+ , lineJoin(MiterJoin)
+#endif
, shadowBlur(0)
, textDrawingMode(TextModeFill)
, strokeColor(Color::black)
FloatSize shadowOffset;
float strokeThickness;
+#if ENABLE(TIZEN_CANVAS_2D_LINE_JOIN)
+ LineJoin lineJoin;
+#endif
float shadowBlur;
TextDrawingModeFlags textDrawingMode;
float strokeThickness() const;
void setStrokeThickness(float);
+#if ENABLE(TIZEN_CANVAS_2D_LINE_JOIN)
+ void setPlatformLineJoin(LineJoin);
+#endif
StrokeStyle strokeStyle() const;
void setStrokeStyle(StrokeStyle);
Color strokeColor() const;
cairo_set_line_width(platformContext()->cr(), strokeThickness);
}
+#if ENABLE(TIZEN_CANVAS_2D_LINE_JOIN)
+void GraphicsContext::setPlatformLineJoin(LineJoin lineJoin)
+{
+ if (paintingDisabled())
+ return;
+
+ cairo_line_join_t cairoJoin = CAIRO_LINE_JOIN_MITER;
+ switch (lineJoin) {
+ case MiterJoin:
+ // no-op
+ break;
+ case RoundJoin:
+ cairoJoin = CAIRO_LINE_JOIN_ROUND;
+ break;
+ case BevelJoin:
+ cairoJoin = CAIRO_LINE_JOIN_BEVEL;
+ break;
+ }
+ cairo_set_line_join(platformContext()->cr(), cairoJoin);
+}
+#endif
+
void GraphicsContext::setPlatformStrokeStyle(StrokeStyle strokeStyle)
{
static double dashPattern[] = {5.0, 5.0};
if (paintingDisabled())
return;
+#if ENABLE(TIZEN_CANVAS_2D_LINE_JOIN)
+ m_state.lineJoin = lineJoin;
+ setPlatformLineJoin(lineJoin);
+#else
cairo_line_join_t cairoJoin = CAIRO_LINE_JOIN_MITER;
switch (lineJoin) {
case MiterJoin:
break;
}
cairo_set_line_join(platformContext()->cr(), cairoJoin);
+#endif
}
void GraphicsContext::setMiterLimit(float miter)