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

Side by Side Diff: Source/platform/graphics/GraphicsContext.h

Issue 1213723006: Drop pattern-related state from GraphicsContext(State) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. 3 * Copyright (C) 2008-2009 Torch Mobile, Inc.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 float strokeThickness() const { return immutableState()->strokeData().thickn ess(); } 105 float strokeThickness() const { return immutableState()->strokeData().thickn ess(); }
106 void setStrokeThickness(float thickness) { mutableState()->setStrokeThicknes s(thickness); } 106 void setStrokeThickness(float thickness) { mutableState()->setStrokeThicknes s(thickness); }
107 107
108 StrokeStyle strokeStyle() const { return immutableState()->strokeData().styl e(); } 108 StrokeStyle strokeStyle() const { return immutableState()->strokeData().styl e(); }
109 void setStrokeStyle(StrokeStyle style) { mutableState()->setStrokeStyle(styl e); } 109 void setStrokeStyle(StrokeStyle style) { mutableState()->setStrokeStyle(styl e); }
110 110
111 Color strokeColor() const { return immutableState()->strokeColor(); } 111 Color strokeColor() const { return immutableState()->strokeColor(); }
112 void setStrokeColor(const Color& color) { mutableState()->setStrokeColor(col or); } 112 void setStrokeColor(const Color& color) { mutableState()->setStrokeColor(col or); }
113 113
114 Pattern* strokePattern() const { return immutableState()->strokePattern(); }
115 void setStrokePattern(PassRefPtr<Pattern>, float alpha = 1);
116
117 Gradient* strokeGradient() const { return immutableState()->strokeGradient() ; } 114 Gradient* strokeGradient() const { return immutableState()->strokeGradient() ; }
118 void setStrokeGradient(PassRefPtr<Gradient>, float alpha = 1); 115 void setStrokeGradient(PassRefPtr<Gradient>, float alpha = 1);
119 116
120 void setLineCap(LineCap cap) { mutableState()->setLineCap(cap); } 117 void setLineCap(LineCap cap) { mutableState()->setLineCap(cap); }
121 void setLineDash(const DashArray& dashes, float dashOffset) { mutableState() ->setLineDash(dashes, dashOffset); } 118 void setLineDash(const DashArray& dashes, float dashOffset) { mutableState() ->setLineDash(dashes, dashOffset); }
122 void setLineJoin(LineJoin join) { mutableState()->setLineJoin(join); } 119 void setLineJoin(LineJoin join) { mutableState()->setLineJoin(join); }
123 void setMiterLimit(float limit) { mutableState()->setMiterLimit(limit); } 120 void setMiterLimit(float limit) { mutableState()->setMiterLimit(limit); }
124 121
125 Color fillColor() const { return immutableState()->fillColor(); } 122 Color fillColor() const { return immutableState()->fillColor(); }
126 void setFillColor(const Color& color) { mutableState()->setFillColor(color); } 123 void setFillColor(const Color& color) { mutableState()->setFillColor(color); }
127 124
128 void setFillPattern(PassRefPtr<Pattern>, float alpha = 1);
129
130 void setFillGradient(PassRefPtr<Gradient>, float alpha = 1); 125 void setFillGradient(PassRefPtr<Gradient>, float alpha = 1);
131 126
132 SkMatrix getTotalMatrix() const; 127 SkMatrix getTotalMatrix() const;
133 128
134 void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias (antialias); } 129 void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias (antialias); }
135 bool shouldAntialias() const { return immutableState()->shouldAntialias(); } 130 bool shouldAntialias() const { return immutableState()->shouldAntialias(); }
136 131
137 void setTextDrawingMode(TextDrawingModeFlags mode) { mutableState()->setText DrawingMode(mode); } 132 void setTextDrawingMode(TextDrawingModeFlags mode) { mutableState()->setText DrawingMode(mode); }
138 TextDrawingModeFlags textDrawingMode() const { return immutableState()->text DrawingMode(); } 133 TextDrawingModeFlags textDrawingMode() const { return immutableState()->text DrawingMode(); }
139 134
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 390
396 float m_deviceScaleFactor; 391 float m_deviceScaleFactor;
397 392
398 unsigned m_printing : 1; 393 unsigned m_printing : 1;
399 unsigned m_hasMetaData : 1; 394 unsigned m_hasMetaData : 1;
400 }; 395 };
401 396
402 } // namespace blink 397 } // namespace blink
403 398
404 #endif // GraphicsContext_h 399 #endif // GraphicsContext_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/GeneratedImage.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698