Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1494)

Unified Diff: Source/platform/graphics/StrokeData.h

Issue 169283008: Maintain SkPaint in GraphicsContextState. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nuked pointless const Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/StrokeData.h
diff --git a/Source/platform/graphics/StrokeData.h b/Source/platform/graphics/StrokeData.h
index 177012d599924bc7b96526f723afb80fa49ec984..884ad631deacfe253cda93ccdab9b666576f3a92 100644
--- a/Source/platform/graphics/StrokeData.h
+++ b/Source/platform/graphics/StrokeData.h
@@ -56,10 +56,10 @@ public:
}
StrokeStyle style() const { return m_style; }
- void setStyle(const StrokeStyle style) { m_style = style; }
+ void setStyle(StrokeStyle style) { m_style = style; }
float thickness() const { return m_thickness; }
- void setThickness(const float thickness) { m_thickness = thickness; }
+ void setThickness(float thickness) { m_thickness = thickness; }
Color color() const { return m_color; }
void setColor(const Color& color) { m_color = color; }
@@ -73,22 +73,26 @@ public:
void clearPattern() { m_pattern.clear(); }
LineCap lineCap() const { return (LineCap)m_lineCap; }
- void setLineCap(const LineCap cap) { m_lineCap = (SkPaint::Cap)cap; }
+ void setLineCap(LineCap cap) { m_lineCap = (SkPaint::Cap)cap; }
LineJoin lineJoin() const { return (LineJoin)m_lineJoin; }
- void setLineJoin(const LineJoin join) { m_lineJoin = (SkPaint::Join)join; }
+ void setLineJoin(LineJoin join) { m_lineJoin = (SkPaint::Join)join; }
float miterLimit() const { return m_miterLimit; }
- void setMiterLimit(const float miterLimit) { m_miterLimit = miterLimit; }
+ void setMiterLimit(float miterLimit) { m_miterLimit = miterLimit; }
- void setLineDash(const DashArray&, const float);
+ void setLineDash(const DashArray&, float);
// Sets everything on the paint except the pattern, gradient and color.
- // GraphicsContext::setupShader does that. Returns a float representing the
- // effective width of the pen. If a non-zero length is provided, the
+ // GraphicsContext::setupShader does that. If a non-zero length is provided, the
// number of dashes/dots on a dashed/dotted line will be adjusted to
// start and end that length with a dash/dot.
- float setupPaint(SkPaint*, int length = 0) const;
+ void setupPaint(SkPaint*, int length = 0) const;
+
+ // Setup any DashPathEffect on the paint. If a non-zero length is provided,
+ // and no line dash has been set, the number of dashes/dots on a dashed/dotted
+ // line will be adjusted to start and end that length with a dash/dot.
+ void setupPaintDashPathEffect(SkPaint*, int) const;
private:
StrokeStyle m_style;

Powered by Google App Engine
This is Rietveld 408576698