diff options
author | Mike Reed <reed@google.com> | 2010-03-24 10:45:41 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-24 10:45:41 -0700 |
commit | 03f19ba76488b3a62011e106d1fd65e076e52837 (patch) | |
tree | 9c2520bb8286d2503cd740bdb6ab9fbdc9a27423 | |
parent | fef9ddedbf313d5afeda1938c57b4e90cef118f7 (diff) | |
parent | 982d692bb2bbb2df5e6165cdae4a69f4b1922b60 (diff) | |
download | external_webkit-03f19ba76488b3a62011e106d1fd65e076e52837.zip external_webkit-03f19ba76488b3a62011e106d1fd65e076e52837.tar.gz external_webkit-03f19ba76488b3a62011e106d1fd65e076e52837.tar.bz2 |
Merge "drawRect is defined (in header) to always stroke with 1.0"
-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); } } |