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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 24233004: Support currentTransform in 2D Canvas. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class DOMPath; 50 class DOMPath;
51 class Element; 51 class Element;
52 class ExceptionState; 52 class ExceptionState;
53 class FloatRect; 53 class FloatRect;
54 class GraphicsContext; 54 class GraphicsContext;
55 class HTMLCanvasElement; 55 class HTMLCanvasElement;
56 class HTMLImageElement; 56 class HTMLImageElement;
57 class HTMLVideoElement; 57 class HTMLVideoElement;
58 class ImageBitmap; 58 class ImageBitmap;
59 class ImageData; 59 class ImageData;
60 class SVGMatrix;
60 class TextMetrics; 61 class TextMetrics;
61 62
62 typedef HashMap<String, RefPtr<MutableStylePropertySet> > MutableStylePropertyMa p; 63 typedef HashMap<String, RefPtr<MutableStylePropertySet> > MutableStylePropertyMa p;
63 64
64 class CanvasRenderingContext2D : public CanvasRenderingContext, public CanvasPat hMethods { 65 class CanvasRenderingContext2D : public CanvasRenderingContext, public CanvasPat hMethods {
65 public: 66 public:
66 static PassOwnPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas , const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityParseMode) 67 static PassOwnPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas , const Canvas2DContextAttributes* attrs, bool usesCSSCompatibilityParseMode)
67 { 68 {
68 return adoptPtr(new CanvasRenderingContext2D(canvas, attrs, usesCSSCompa tibilityParseMode)); 69 return adoptPtr(new CanvasRenderingContext2D(canvas, attrs, usesCSSCompa tibilityParseMode));
69 } 70 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
Justin Novosad 2013/09/19 19:23:48 IIRC, you can't return an incomplete type. If thi
122 void setCurrentTransform(const SVGMatrix&);
120 void scale(float sx, float sy); 123 void scale(float sx, float sy);
121 void rotate(float angleInRadians); 124 void rotate(float angleInRadians);
122 void translate(float tx, float ty); 125 void translate(float tx, float ty);
123 void transform(float m11, float m12, float m21, float m22, float dx, float d y); 126 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); 127 void setTransform(float m11, float m12, float m21, float m22, float dx, floa t dy);
125 void resetTransform(); 128 void resetTransform();
126 129
127 void setStrokeColor(const String& color); 130 void setStrokeColor(const String& color);
128 void setStrokeColor(float grayLevel); 131 void setStrokeColor(float grayLevel);
129 void setStrokeColor(const String& color, float alpha); 132 void setStrokeColor(const String& color, float alpha);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 Vector<State, 1> m_stateStack; 338 Vector<State, 1> m_stateStack;
336 unsigned m_unrealizedSaveCount; 339 unsigned m_unrealizedSaveCount;
337 bool m_usesCSSCompatibilityParseMode; 340 bool m_usesCSSCompatibilityParseMode;
338 bool m_hasAlpha; 341 bool m_hasAlpha;
339 MutableStylePropertyMap m_fetchedFonts; 342 MutableStylePropertyMap m_fetchedFonts;
340 }; 343 };
341 344
342 } // namespace WebCore 345 } // namespace WebCore
343 346
344 #endif 347 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698