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

Side by Side Diff: core/html/canvas/CanvasRenderingContext2D.idl

Issue 581453002: Dartium Roll 38 roll (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Sync'd w/ r 182210 Created 6 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 | Annotate | Revision Log
« no previous file with comments | « core/html/canvas/CanvasPattern.idl ('k') | core/html/canvas/DataView.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
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 20 matching lines...) Expand all
31 typedef (HTMLImageElement or 31 typedef (HTMLImageElement or
32 HTMLVideoElement or 32 HTMLVideoElement or
33 HTMLCanvasElement // or 33 HTMLCanvasElement // or
34 // CanvasRenderingContext2D or 34 // CanvasRenderingContext2D or
35 // ImageBitmap 35 // ImageBitmap
36 ) CanvasImageSource; 36 ) CanvasImageSource;
37 37
38 enum CanvasFillRule { "nonzero", "evenodd" }; 38 enum CanvasFillRule { "nonzero", "evenodd" };
39 39
40 [ 40 [
41 TypeChecking=Interface|Nullable|Unrestricted, 41 TypeChecking=Interface|Unrestricted,
42 WillBeGarbageCollected, 42 WillBeGarbageCollected,
43 ] interface CanvasRenderingContext2D { 43 ] interface CanvasRenderingContext2D {
44 // back-reference to the canvas 44 // back-reference to the canvas
45 readonly attribute HTMLCanvasElement canvas; 45 readonly attribute HTMLCanvasElement canvas;
46 46
47 // state 47 // state
48 void save(); // push state on state stack 48 void save(); // push state on state stack
49 void restore(); // pop state stack and restore state 49 void restore(); // pop state stack and restore state
50 50
51 // transformations (default transform is the identity matrix) 51 // transformations (default transform is the identity matrix)
(...skipping 12 matching lines...) Expand all
64 // image smoothing 64 // image smoothing
65 [ImplementedAs=imageSmoothingEnabled, MeasureAs=PrefixedImageSmoothingEnable d, DartSuppress] attribute boolean webkitImageSmoothingEnabled; 65 [ImplementedAs=imageSmoothingEnabled, MeasureAs=PrefixedImageSmoothingEnable d, DartSuppress] attribute boolean webkitImageSmoothingEnabled;
66 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing Enabled; 66 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing Enabled;
67 67
68 // colors and styles (see also the CanvasDrawingStyles interface) 68 // colors and styles (see also the CanvasDrawingStyles interface)
69 // FIXME: Use union types when supported: http://crbug.com/372891 69 // FIXME: Use union types when supported: http://crbug.com/372891
70 [Custom] attribute object strokeStyle; // (default black) 70 [Custom] attribute object strokeStyle; // (default black)
71 [Custom] attribute object fillStyle; // (default black) 71 [Custom] attribute object fillStyle; // (default black)
72 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); 72 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
73 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl oat r0, float x1, float y1, float r1); 73 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl oat r0, float x1, float y1, float r1);
74 [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, [Tre atNullAs=NullString] DOMString repetitionType); 74 [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, DOMS tring? repetitionType);
75 [RaisesException] CanvasPattern createPattern(HTMLImageElement image, [Treat NullAs=NullString] DOMString repetitionType); 75 [RaisesException] CanvasPattern createPattern(HTMLImageElement image, DOMStr ing? repetitionType);
76 [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, [Treat NullAs=NullString] DOMString repetitionType); 76 [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, DOMStr ing? repetitionType);
77 77
78 // shadows 78 // shadows
79 attribute unrestricted float shadowOffsetX; 79 attribute unrestricted float shadowOffsetX;
80 attribute unrestricted float shadowOffsetY; 80 attribute unrestricted float shadowOffsetY;
81 attribute unrestricted float shadowBlur; 81 attribute unrestricted float shadowBlur;
82 [TreatNullAs=NullString] attribute DOMString shadowColor; 82 [TreatNullAs=NullString] attribute DOMString shadowColor;
83 83
84 // rects 84 // rects
85 void clearRect(unrestricted float x, unrestricted float y, unrestricted floa t width, unrestricted float height); 85 void clearRect(unrestricted float x, unrestricted float y, unrestricted floa t width, unrestricted float height);
86 void fillRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); 86 void fillRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
(...skipping 29 matching lines...) Expand all
116 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa t x, unrestricted float y); 116 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa t x, unrestricted float y);
117 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa t x, unrestricted float y, unrestricted float width, unrestricted float height); 117 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa t x, unrestricted float y, unrestricted float width, unrestricted float height);
118 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa t sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unres tricted float dx, unrestricted float dy, unrestricted float dw, unrestricted flo at dh); 118 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa t sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unres tricted float dx, unrestricted float dy, unrestricted float dw, unrestricted flo at dh);
119 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y); 119 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y);
120 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height); 120 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
121 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestr icted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh); 121 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestr icted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
122 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage( ImageBitmap imageBitmap, unrestricted float x, unrestricted float y); 122 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage( ImageBitmap imageBitmap, unrestricted float x, unrestricted float y);
123 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage( ImageBitmap imageBitmap, unrestricted float x, unrestricted float y, unrestricte d float width, unrestricted float height); 123 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage( ImageBitmap imageBitmap, unrestricted float x, unrestricted float y, unrestricte d float width, unrestricted float height);
124 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage( ImageBitmap imageBitmap, unrestricted float sx, unrestricted float sy, unrestric ted float sw, unrestricted float sh, unrestricted float dx, unrestricted float d y, unrestricted float dw, unrestricted float dh); 124 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage( ImageBitmap imageBitmap, unrestricted float sx, unrestricted float sy, unrestric ted float sw, unrestricted float sh, unrestricted float dx, unrestricted float d y, unrestricted float dw, unrestricted float dh);
125 125
126 // hit regions
127 // FIXME: Blink does not currently support WebIDL dictionary definitions.
128 // See http://crbug.com/321462
129 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegi on(optional Dictionary options);
130 [RuntimeEnabled=ExperimentalCanvasFeatures] void removeHitRegion(DOMString i d);
131 [RuntimeEnabled=ExperimentalCanvasFeatures] void clearHitRegions();
132
126 // pixel manipulation 133 // pixel manipulation
127 [DartName=createImageDataFromImageData] ImageData createImageData(ImageData imagedata); 134 [DartName=createImageDataFromImageData] ImageData createImageData(ImageData imagedata);
128 [RaisesException] ImageData createImageData(float sw, float sh); 135 [RaisesException] ImageData createImageData(float sw, float sh);
129 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float sh); 136 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float sh);
130 void putImageData(ImageData imagedata, float dx, float dy); 137 void putImageData(ImageData imagedata, float dx, float dy);
131 void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, flo at dirtyY, float dirtyWidth, float dirtyHeight); 138 void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, flo at dirtyY, float dirtyWidth, float dirtyHeight);
132 139
133 // Context state 140 // Context state
134 // Should be merged with WebGL counterpart in CanvasRenderingContext, once n o-longer experimental 141 // Should be merged with WebGL counterpart in CanvasRenderingContext, once n o-longer experimental
135 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean isContextLost(); 142 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean isContextLost();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect ( 180 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect (
174 HTMLImageElement? image, optional unrestricted float sx, optional unrest ricted float sy, optional unrestricted float sw, optional unrestricted float sh, 181 HTMLImageElement? image, optional unrestricted float sx, optional unrest ricted float sy, optional unrestricted float sw, optional unrestricted float sh,
175 optional unrestricted float dx, optional unrestricted float dy, optional unrestricted float dw, optional unrestricted float dh, optional DOMString compo siteOperation); 182 optional unrestricted float dx, optional unrestricted float dy, optional unrestricted float dw, optional unrestricted float dh, optional DOMString compo siteOperation);
176 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, optional DOMStrin g color, optional unrestricted float alpha); 183 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, optional DOMStrin g color, optional unrestricted float alpha);
177 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, unrestricted floa t grayLevel, optional unrestricted float alpha); 184 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, unrestricted floa t grayLevel, optional unrestricted float alpha);
178 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, unrestricted floa t r, unrestricted float g, unrestricted float b, unrestricted float a); 185 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, unrestricted floa t r, unrestricted float g, unrestricted float b, unrestricted float a);
179 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, unrestricted floa t c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric ted float a); 186 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl oat width, unrestricted float height, unrestricted float blur, unrestricted floa t c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric ted float a);
180 }; 187 };
181 188
182 CanvasRenderingContext2D implements CanvasPathMethods; 189 CanvasRenderingContext2D implements CanvasPathMethods;
OLDNEW
« no previous file with comments | « core/html/canvas/CanvasPattern.idl ('k') | core/html/canvas/DataView.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698