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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl

Issue 1402963003: ** DO NO COMMIT ** for jake Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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 16 matching lines...) Expand all
27 27
28 // FIXME: float => double throughout 28 // FIXME: float => double throughout
29 typedef (HTMLImageElement or 29 typedef (HTMLImageElement or
30 HTMLVideoElement or 30 HTMLVideoElement or
31 HTMLCanvasElement or 31 HTMLCanvasElement or
32 // CanvasRenderingContext2D or 32 // CanvasRenderingContext2D or
33 ImageBitmap) CanvasImageSource; 33 ImageBitmap) CanvasImageSource;
34 34
35 enum CanvasFillRule { "nonzero", "evenodd" }; 35 enum CanvasFillRule { "nonzero", "evenodd" };
36 36
37 enum ImageSmoothingQuality { "low", "medium", "high" };
37 [ 38 [
38 SetWrapperReferenceFrom=canvas, 39 SetWrapperReferenceFrom=canvas,
39 TypeChecking=Interface, 40 TypeChecking=Interface,
40 WillBeGarbageCollected, 41 WillBeGarbageCollected,
41 ] interface CanvasRenderingContext2D { 42 ] interface CanvasRenderingContext2D {
42 // back-reference to the canvas 43 // back-reference to the canvas
43 readonly attribute HTMLCanvasElement canvas; 44 readonly attribute HTMLCanvasElement canvas;
44 45
45 // state 46 // state
46 void save(); // push state on state stack 47 void save(); // push state on state stack
47 void restore(); // pop state stack and restore state 48 void restore(); // pop state stack and restore state
48 49
49 // transformations (default transform is the identity matrix) 50 // transformations (default transform is the identity matrix)
50 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute SVGMatrix currentTrans form; 51 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute SVGMatrix currentTrans form;
51 void scale(unrestricted float x, unrestricted float y); 52 void scale(unrestricted float x, unrestricted float y);
52 void rotate(unrestricted float angle); 53 void rotate(unrestricted float angle);
53 void translate(unrestricted float x, unrestricted float y); 54 void translate(unrestricted float x, unrestricted float y);
54 void transform(unrestricted float a, unrestricted float b, unrestricted floa t c, unrestricted float d, unrestricted float e, unrestricted float f); 55 void transform(unrestricted float a, unrestricted float b, unrestricted floa t c, unrestricted float d, unrestricted float e, unrestricted float f);
55 void setTransform(unrestricted float a, unrestricted float b, unrestricted f loat c, unrestricted float d, unrestricted float e, unrestricted float f); 56 void setTransform(unrestricted float a, unrestricted float b, unrestricted f loat c, unrestricted float d, unrestricted float e, unrestricted float f);
56 void resetTransform(); 57 void resetTransform();
57 58
58 // compositing 59 // compositing
59 attribute unrestricted float globalAlpha; // (default 1.0) 60 attribute unrestricted float globalAlpha; // (default 1.0)
60 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; // (d efault source-over) 61 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; // (d efault source-over)
61 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString filter; // ( default 'none') 62 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString filter; // ( default 'none')
62 63
63 // image smoothing 64 // image smoothing
64 [ImplementedAs=imageSmoothingEnabled, DeprecateAs=PrefixedImageSmoothingEnab led] attribute boolean webkitImageSmoothingEnabled; 65 [ImplementedAs=imageSmoothingEnabled, DeprecateAs=PrefixedImageSmoothingEnab led] attribute boolean webkitImageSmoothingEnabled;
65 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing Enabled; 66 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing Enabled;
67 attribute ImageSmoothingQuality imageSmoothingQuality; // (default 'low')
66 68
67 // colors and styles (see also the CanvasDrawingStyles interface) 69 // colors and styles (see also the CanvasDrawingStyles interface)
68 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de fault black) 70 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de fault black)
69 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa ult black) 71 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa ult black)
70 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); 72 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
71 [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);
72 [RaisesException] CanvasPattern createPattern(CanvasImageSource image, DOMSt ring? repetitionType); 74 [RaisesException] CanvasPattern createPattern(CanvasImageSource image, DOMSt ring? repetitionType);
73 75
74 // shadows 76 // shadows
75 attribute unrestricted float shadowOffsetX; 77 attribute unrestricted float shadowOffsetX;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 144
143 // text 145 // text
144 attribute DOMString font; // (default 10px sans-serif) 146 attribute DOMString font; // (default 10px sans-serif)
145 attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start") 147 attribute DOMString textAlign; // "start", "end", "left", "right", "center" (default: "start")
146 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic ", "ideographic", "bottom" (default: "alphabetic") 148 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic ", "ideographic", "bottom" (default: "alphabetic")
147 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; / / "inherit", "rtl", "ltr" (default: "inherit") 149 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString direction; / / "inherit", "rtl", "ltr" (default: "inherit")
148 150
149 }; 151 };
150 152
151 CanvasRenderingContext2D implements CanvasPathMethods; 153 CanvasRenderingContext2D implements CanvasPathMethods;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698