~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
 
3
 *
 
4
 * Redistribution and use in source and binary forms, with or without
 
5
 * modification, are permitted provided that the following conditions
 
6
 * are met:
 
7
 * 1. Redistributions of source code must retain the above copyright
 
8
 *    notice, this list of conditions and the following disclaimer.
 
9
 * 2. Redistributions in binary form must reproduce the above copyright
 
10
 *    notice, this list of conditions and the following disclaimer in the
 
11
 *    documentation and/or other materials provided with the distribution.
 
12
 *
 
13
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
24
 */
 
25
 
 
26
module html {
 
27
 
 
28
    interface [
 
29
        GenerateConstructor,
 
30
        InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
 
31
        ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
 
32
    ] CanvasRenderingContext2D : CanvasRenderingContext {
 
33
 
 
34
        // Web Applications 1.0 draft
 
35
 
 
36
        void save();
 
37
        void restore();
 
38
 
 
39
        void scale(in float sx, in float sy);
 
40
        void rotate(in float angle);
 
41
        void translate(in float tx, in float ty);
 
42
        void transform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
 
43
        void setTransform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
 
44
 
 
45
        attribute float globalAlpha;
 
46
        attribute [ConvertNullToNullString] DOMString globalCompositeOperation;
 
47
 
 
48
        CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1)
 
49
            raises (DOMException);
 
50
        CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1)
 
51
            raises (DOMException);
 
52
 
 
53
        attribute float lineWidth;
 
54
        attribute [ConvertNullToNullString] DOMString lineCap;
 
55
        attribute [ConvertNullToNullString] DOMString lineJoin;
 
56
        attribute float miterLimit;
 
57
 
 
58
        attribute float shadowOffsetX;
 
59
        attribute float shadowOffsetY;
 
60
        attribute float shadowBlur;
 
61
        attribute [ConvertNullToNullString] DOMString shadowColor;
 
62
 
 
63
        void clearRect(in float x, in float y, in float width, in float height);
 
64
        void fillRect(in float x, in float y, in float width, in float height);
 
65
 
 
66
        void beginPath();
 
67
        void closePath();
 
68
        void moveTo(in float x, in float y);
 
69
        void lineTo(in float x, in float y);
 
70
        void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
 
71
        void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
 
72
        void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius)
 
73
            raises (DOMException);
 
74
        void rect(in float x, in float y, in float width, in float height);
 
75
        void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise)
 
76
            raises (DOMException);
 
77
        void fill();
 
78
        void stroke();
 
79
        void clip();
 
80
        boolean isPointInPath(in float x, in float y);
 
81
 
 
82
        // text
 
83
        attribute DOMString font;
 
84
        attribute DOMString textAlign;
 
85
        attribute DOMString textBaseline;
 
86
        [Custom] void fillText(/* 4 */);
 
87
        [Custom] void strokeText(/* 4 */);
 
88
        TextMetrics measureText(in DOMString text);
 
89
 
 
90
        // other
 
91
 
 
92
        void setAlpha(in float alpha);
 
93
        void setCompositeOperation(in DOMString compositeOperation);
 
94
 
 
95
        void setLineWidth(in float width);
 
96
        void setLineCap(in DOMString cap);
 
97
        void setLineJoin(in DOMString join);
 
98
        void setMiterLimit(in float limit);
 
99
 
 
100
        void clearShadow();
 
101
 
 
102
        [Custom] void setStrokeColor(/* 1  */);
 
103
        [Custom] void setFillColor(/* 1 */);
 
104
        [Custom] void strokeRect(/* 4 */);
 
105
        [Custom] void drawImage(/* 3 */);
 
106
        [Custom] void drawImageFromRect(/* 10 */);
 
107
        [Custom] void setShadow(/* 3 */);
 
108
        [Custom] void createPattern(/* 2 */);
 
109
        
 
110
        attribute [Custom] custom strokeStyle;
 
111
        attribute [Custom] custom fillStyle;
 
112
        
 
113
        // pixel manipulation
 
114
        ImageData createImageData(in float sw, in float sh)
 
115
            raises (DOMException);
 
116
        ImageData getImageData(in float sx, in float sy, in float sw, in float sh)
 
117
            raises(DOMException);
 
118
        [Custom] void putImageData(/* in ImageData imagedata, in float dx, in float dy [, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight] */);
 
119
    };
 
120
 
 
121
}
 
122