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

Unified Diff: modules/canvas2d/CanvasRenderingContext2D.idl

Issue 2786203002: Roll 50: Copied IDLs, PYTHON scripts from WebKit removed deleted files in WebCore (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/cachestorage/WorkerCacheStorage.idl ('k') | modules/canvas2d/Path2D.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/canvas2d/CanvasRenderingContext2D.idl
diff --git a/modules/canvas2d/CanvasRenderingContext2D.idl b/modules/canvas2d/CanvasRenderingContext2D.idl
index d366967ec839ec5ee7a26eb74e33e0b118834ae6..a2a897c6b8c639aa29cfba14f54948bf8da023b1 100644
--- a/modules/canvas2d/CanvasRenderingContext2D.idl
+++ b/modules/canvas2d/CanvasRenderingContext2D.idl
@@ -25,7 +25,6 @@
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
-// FIXME: float => double throughout
typedef (HTMLImageElement or
HTMLVideoElement or
HTMLCanvasElement or
@@ -33,10 +32,10 @@ typedef (HTMLImageElement or
ImageBitmap) CanvasImageSource;
enum CanvasFillRule { "nonzero", "evenodd" };
+enum ImageSmoothingQuality {"low", "medium", "high"};
[
SetWrapperReferenceFrom=canvas,
- TypeChecking=Interface,
WillBeGarbageCollected,
] interface CanvasRenderingContext2D {
// back-reference to the canvas
@@ -48,39 +47,40 @@ enum CanvasFillRule { "nonzero", "evenodd" };
// transformations (default transform is the identity matrix)
[RuntimeEnabled=ExperimentalCanvasFeatures] attribute SVGMatrix currentTransform;
- void scale(unrestricted float x, unrestricted float y);
- void rotate(unrestricted float angle);
- void translate(unrestricted float x, unrestricted float y);
- void transform(unrestricted float a, unrestricted float b, unrestricted float c, unrestricted float d, unrestricted float e, unrestricted float f);
- void setTransform(unrestricted float a, unrestricted float b, unrestricted float c, unrestricted float d, unrestricted float e, unrestricted float f);
+ void scale(unrestricted double x, unrestricted double y);
+ void rotate(unrestricted double angle);
+ void translate(unrestricted double x, unrestricted double y);
+ void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
+ void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
void resetTransform();
// compositing
- attribute unrestricted float globalAlpha; // (default 1.0)
- [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; // (default source-over)
- [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString filter; // (default 'none')
+ attribute unrestricted double globalAlpha; // (default 1.0)
+ attribute DOMString globalCompositeOperation; // (default source-over)
+ [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString filter; // (default 'none')
// image smoothing
[ImplementedAs=imageSmoothingEnabled, DeprecateAs=PrefixedImageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
- [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothingEnabled;
+ [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothingEnabled; // (default True)
+ [RuntimeEnabled=ExperimentalCanvasFeatures] attribute ImageSmoothingQuality imageSmoothingQuality; // (default "low")
// colors and styles (see also the CanvasDrawingStyles interface)
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
- CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
- [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1);
- [RaisesException] CanvasPattern createPattern(CanvasImageSource image, DOMString? repetitionType);
+ CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
+ [RaisesException] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
+ [RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType);
// shadows
- attribute unrestricted float shadowOffsetX;
- attribute unrestricted float shadowOffsetY;
- attribute unrestricted float shadowBlur;
- [TreatNullAs=NullString] attribute DOMString shadowColor;
+ attribute unrestricted double shadowOffsetX;
+ attribute unrestricted double shadowOffsetY;
+ attribute unrestricted double shadowBlur;
+ attribute DOMString shadowColor;
// rects
- void clearRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
- void fillRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
- void strokeRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
+ void clearRect(unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
+ void fillRect(unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
+ void strokeRect(unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
// path API (see also CanvasPathMethods)
void beginPath();
@@ -95,20 +95,20 @@ enum CanvasFillRule { "nonzero", "evenodd" };
[RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(optional Path2D path);
void clip(optional CanvasFillRule winding);
void clip(Path2D path, optional CanvasFillRule winding);
- boolean isPointInPath(unrestricted float x, unrestricted float y, optional CanvasFillRule winding);
- boolean isPointInPath(Path2D path, unrestricted float x, unrestricted float y, optional CanvasFillRule winding);
- boolean isPointInStroke(unrestricted float x, unrestricted float y);
- boolean isPointInStroke(Path2D path, unrestricted float x, unrestricted float y);
+ boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule winding);
+ boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule winding);
+ boolean isPointInStroke(unrestricted double x, unrestricted double y);
+ boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
// text (see also the CanvasDrawingStyles interface)
- void fillText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
- void strokeText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
+ void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
+ void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
TextMetrics measureText(DOMString text);
// drawing images
- [RaisesException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y);
- [RaisesException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
- [RaisesException] void drawImage(CanvasImageSource image, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
+ [RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y);
+ [RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
+ [RaisesException] void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
// hit regions
[RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegion(optional HitRegionOptions options);
@@ -117,10 +117,10 @@ enum CanvasFillRule { "nonzero", "evenodd" };
// pixel manipulation
ImageData createImageData(ImageData imagedata);
- [RaisesException] ImageData createImageData(float sw, float sh);
- [RaisesException] ImageData getImageData(float sx, float sy, float sw, float sh);
- void putImageData(ImageData imagedata, float dx, float dy);
- void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
+ [RaisesException] ImageData createImageData(double sw, double sh);
+ [RaisesException] ImageData getImageData(double sx, double sy, double sw, double sh);
+ [RaisesException] void putImageData(ImageData imagedata, double dx, double dy);
+ [RaisesException] void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
// Context state
// Should be merged with WebGL counterpart in CanvasRenderingContext, once no-longer experimental
@@ -130,15 +130,15 @@ enum CanvasFillRule { "nonzero", "evenodd" };
// FIXME: factor out to CanvasDrawingStyles
// line caps/joins
- attribute unrestricted float lineWidth; // (default 1)
- [TreatNullAs=NullString] attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
- [TreatNullAs=NullString] attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
- attribute unrestricted float miterLimit; // (default 10)
+ attribute unrestricted double lineWidth; // (default 1)
+ attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
+ attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
+ attribute unrestricted double miterLimit; // (default 10)
// dashed lines
- void setLineDash(sequence<unrestricted float> dash);
- sequence<unrestricted float> getLineDash();
- attribute unrestricted float lineDashOffset;
+ void setLineDash(sequence<unrestricted double> dash);
+ sequence<unrestricted double> getLineDash();
+ attribute unrestricted double lineDashOffset;
// text
attribute DOMString font; // (default 10px sans-serif)
« no previous file with comments | « modules/cachestorage/WorkerCacheStorage.idl ('k') | modules/canvas2d/Path2D.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698