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

Side by Side Diff: sky/engine/core/html/canvas/CanvasRenderingContext2D.h

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void stroke(); 142 void stroke();
143 void stroke(Path2D*); 143 void stroke(Path2D*);
144 void clip(const String& winding = "nonzero"); 144 void clip(const String& winding = "nonzero");
145 void clip(Path2D*, const String& winding = "nonzero"); 145 void clip(Path2D*, const String& winding = "nonzero");
146 146
147 bool isPointInPath(const float x, const float y, const String& winding = "no nzero"); 147 bool isPointInPath(const float x, const float y, const String& winding = "no nzero");
148 bool isPointInPath(Path2D*, const float x, const float y, const String& wind ing = "nonzero"); 148 bool isPointInPath(Path2D*, const float x, const float y, const String& wind ing = "nonzero");
149 bool isPointInStroke(const float x, const float y); 149 bool isPointInStroke(const float x, const float y);
150 bool isPointInStroke(Path2D*, const float x, const float y); 150 bool isPointInStroke(Path2D*, const float x, const float y);
151 151
152 void scrollPathIntoView();
153 void scrollPathIntoView(Path2D*);
154
155 void clearRect(float x, float y, float width, float height); 152 void clearRect(float x, float y, float width, float height);
156 void fillRect(float x, float y, float width, float height); 153 void fillRect(float x, float y, float width, float height);
157 void strokeRect(float x, float y, float width, float height); 154 void strokeRect(float x, float y, float width, float height);
158 155
159 void setShadow(float width, float height, float blur); 156 void setShadow(float width, float height, float blur);
160 void setShadow(float width, float height, float blur, const String& color); 157 void setShadow(float width, float height, float blur, const String& color);
161 void setShadow(float width, float height, float blur, float grayLevel); 158 void setShadow(float width, float height, float blur, float grayLevel);
162 void setShadow(float width, float height, float blur, const String& color, f loat alpha); 159 void setShadow(float width, float height, float blur, const String& color, f loat alpha);
163 void setShadow(float width, float height, float blur, float grayLevel, float alpha); 160 void setShadow(float width, float height, float blur, float grayLevel, float alpha);
164 void setShadow(float width, float height, float blur, float r, float g, floa t b, float a); 161 void setShadow(float width, float height, float blur, float r, float g, floa t b, float a);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 300
304 void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, flo at sh, float dx, float dy, float dw, float dh, ExceptionState&, CompositeOperato r, blink::WebBlendMode, GraphicsContext* = 0); 301 void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, flo at sh, float dx, float dy, float dw, float dh, ExceptionState&, CompositeOperato r, blink::WebBlendMode, GraphicsContext* = 0);
305 302
306 void fillInternal(const Path&, const String& windingRuleString); 303 void fillInternal(const Path&, const String& windingRuleString);
307 void strokeInternal(const Path&); 304 void strokeInternal(const Path&);
308 void clipInternal(const Path&, const String& windingRuleString); 305 void clipInternal(const Path&, const String& windingRuleString);
309 306
310 bool isPointInPathInternal(const Path&, const float x, const float y, const String& windingRuleString); 307 bool isPointInPathInternal(const Path&, const float x, const float y, const String& windingRuleString);
311 bool isPointInStrokeInternal(const Path&, const float x, const float y); 308 bool isPointInStrokeInternal(const Path&, const float x, const float y);
312 309
313 void scrollPathIntoViewInternal(const Path&);
314
315 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false); 310 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false);
316 311
317 const Font& accessFont(); 312 const Font& accessFont();
318 int getFontBaseline(const FontMetrics&) const; 313 int getFontBaseline(const FontMetrics&) const;
319 314
320 void clearCanvas(); 315 void clearCanvas();
321 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; 316 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const;
322 317
323 void inflateStrokeRect(FloatRect&) const; 318 void inflateStrokeRect(FloatRect&) const;
324 319
(...skipping 29 matching lines...) Expand all
354 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; 349 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
355 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; 350 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
356 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; 351 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
357 }; 352 };
358 353
359 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 354 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
360 355
361 } // namespace blink 356 } // namespace blink
362 357
363 #endif // SKY_ENGINE_CORE_HTML_CANVAS_CANVASRENDERINGCONTEXT2D_H_ 358 #endif // SKY_ENGINE_CORE_HTML_CANVAS_CANVASRENDERINGCONTEXT2D_H_
OLDNEW
« no previous file with comments | « sky/engine/core/frame/LocalFrame.cpp ('k') | sky/engine/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698