diff options
author | Mike Reed <reed@google.com> | 2010-03-24 13:33:09 -0400 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2010-03-24 13:33:09 -0400 |
commit | 982d692bb2bbb2df5e6165cdae4a69f4b1922b60 (patch) | |
tree | 7cb0fdab9a683c9fc8cb03d601f70ea4447f973b | |
parent | 4aa28f1f5940594c38e46f06d720f07852b17112 (diff) | |
download | external_webkit-982d692bb2bbb2df5e6165cdae4a69f4b1922b60.zip external_webkit-982d692bb2bbb2df5e6165cdae4a69f4b1922b60.tar.gz external_webkit-982d692bb2bbb2df5e6165cdae4a69f4b1922b60.tar.bz2 |
drawRect is defined (in header) to always stroke with 1.0
Change-Id: I95bef5b769c9b2637424ae4f22ccd19ed6e4ff9a
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index 93b7562..369dce2 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -416,10 +416,16 @@ void GraphicsContext::drawRect(const IntRect& rect) m_data->setup_paint_fill(&paint); GC2Canvas(this)->drawRect(r, paint); } - + + /* According to GraphicsContext.h, stroking inside drawRect always means + a stroke of 1 inside the rect. + */ if (strokeStyle() != NoStroke && strokeColor().alpha()) { paint.reset(); m_data->setup_paint_stroke(&paint, &r); + paint.setPathEffect(NULL); // no dashing please + paint.setStrokeWidth(SK_Scalar1); // always just 1.0 width + r.inset(SK_ScalarHalf, SK_ScalarHalf); // ensure we're "inside" GC2Canvas(this)->drawRect(r, paint); } } |