OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 16 matching lines...) Expand all Loading... |
27 #define CanvasRenderingContext2D_h | 27 #define CanvasRenderingContext2D_h |
28 | 28 |
29 #include "core/html/canvas/Canvas2DContextAttributes.h" | 29 #include "core/html/canvas/Canvas2DContextAttributes.h" |
30 #include "core/html/canvas/CanvasPathMethods.h" | 30 #include "core/html/canvas/CanvasPathMethods.h" |
31 #include "core/html/canvas/CanvasRenderingContext.h" | 31 #include "core/html/canvas/CanvasRenderingContext.h" |
32 #include "core/platform/graphics/Color.h" | 32 #include "core/platform/graphics/Color.h" |
33 #include "core/platform/graphics/Font.h" | 33 #include "core/platform/graphics/Font.h" |
34 #include "core/platform/graphics/GraphicsTypes.h" | 34 #include "core/platform/graphics/GraphicsTypes.h" |
35 #include "core/platform/graphics/ImageBuffer.h" | 35 #include "core/platform/graphics/ImageBuffer.h" |
36 #include "core/platform/graphics/Path.h" | 36 #include "core/platform/graphics/Path.h" |
| 37 #include "core/svg/SVGMatrix.h" |
37 #include "platform/geometry/FloatSize.h" | 38 #include "platform/geometry/FloatSize.h" |
38 #include "platform/transforms/AffineTransform.h" | 39 #include "platform/transforms/AffineTransform.h" |
39 #include "wtf/HashMap.h" | 40 #include "wtf/HashMap.h" |
40 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
41 #include "wtf/text/WTFString.h" | 42 #include "wtf/text/WTFString.h" |
42 | 43 |
43 namespace WebKit { class WebLayer; } | 44 namespace WebKit { class WebLayer; } |
44 | 45 |
45 namespace WebCore { | 46 namespace WebCore { |
46 | 47 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 111 |
111 float globalAlpha() const; | 112 float globalAlpha() const; |
112 void setGlobalAlpha(float); | 113 void setGlobalAlpha(float); |
113 | 114 |
114 String globalCompositeOperation() const; | 115 String globalCompositeOperation() const; |
115 void setGlobalCompositeOperation(const String&); | 116 void setGlobalCompositeOperation(const String&); |
116 | 117 |
117 void save() { ++m_unrealizedSaveCount; } | 118 void save() { ++m_unrealizedSaveCount; } |
118 void restore(); | 119 void restore(); |
119 | 120 |
| 121 SVGMatrix currentTransform() const |
| 122 { |
| 123 return SVGMatrix(state().m_transform); |
| 124 } |
| 125 void setCurrentTransform(const SVGMatrix&); |
| 126 |
120 void scale(float sx, float sy); | 127 void scale(float sx, float sy); |
121 void rotate(float angleInRadians); | 128 void rotate(float angleInRadians); |
122 void translate(float tx, float ty); | 129 void translate(float tx, float ty); |
123 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); | 130 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); |
124 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); | 131 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); |
125 void resetTransform(); | 132 void resetTransform(); |
126 | 133 |
127 void setStrokeColor(const String& color); | 134 void setStrokeColor(const String& color); |
128 void setStrokeColor(float grayLevel); | 135 void setStrokeColor(float grayLevel); |
129 void setStrokeColor(const String& color, float alpha); | 136 void setStrokeColor(const String& color, float alpha); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 Vector<State, 1> m_stateStack; | 335 Vector<State, 1> m_stateStack; |
329 unsigned m_unrealizedSaveCount; | 336 unsigned m_unrealizedSaveCount; |
330 bool m_usesCSSCompatibilityParseMode; | 337 bool m_usesCSSCompatibilityParseMode; |
331 bool m_hasAlpha; | 338 bool m_hasAlpha; |
332 MutableStylePropertyMap m_fetchedFonts; | 339 MutableStylePropertyMap m_fetchedFonts; |
333 }; | 340 }; |
334 | 341 |
335 } // namespace WebCore | 342 } // namespace WebCore |
336 | 343 |
337 #endif | 344 #endif |
OLD | NEW |