Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIDOMCanvasRenderingContext2D Interface Reference

import "nsIDOMCanvasRenderingContext2D.idl";

Inheritance diagram for nsIDOMCanvasRenderingContext2D:
Inheritance graph
[legend]
Collaboration diagram for nsIDOMCanvasRenderingContext2D:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void save ()
void restore ()
void scale (in float x, in float y)
void rotate (in float angle)
void translate (in float x, in float y)
nsIDOMCanvasGradient createLinearGradient (in float x0, in float y0, in float x1, in float y1)
nsIDOMCanvasGradient createRadialGradient (in float x0, in float y0, in float r0, in float x1, in float y1, in float r1)
nsIDOMCanvasPattern createPattern (in nsIDOMHTMLElement image, in DOMString repetition)
void clearRect (in float x, in float y, in float w, in float h)
void fillRect (in float x, in float y, in float w, in float h)
void strokeRect (in float x, in float y, in float w, in float h)
void beginPath ()
void closePath ()
void moveTo (in float x, in float y)
void lineTo (in float x, in float y)
void quadraticCurveTo (in float cpx, in float cpy, in float x, in float y)
void bezierCurveTo (in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y)
void arcTo (in float x1, in float y1, in float x2, in float y2, in float radius)
void arc (in float x, in float y, in float r, in float startAngle, in float endAngle, in boolean clockwise)
void rect (in float x, in float y, in float w, in float h)
void fill ()
void stroke ()
void clip ()
void drawImage ()
boolean isPointInPath (in float x, in float y)
void getImageData ()
void putImageData ()
void drawWindow (in nsIDOMWindow window, in long x, in long y, in long w, in long h, in DOMString bgColor)
 Renders a region of a window into the canvas.

Public Attributes

readonly attribute
nsIDOMHTMLCanvasElement 
canvas
attribute float globalAlpha
attribute DOMString globalCompositeOperation
attribute nsIVariant strokeStyle
attribute nsIVariant fillStyle
attribute float lineWidth
attribute DOMString lineCap
attribute DOMString lineJoin
attribute float miterLimit
attribute float shadowOffsetX
attribute float shadowOffsetY
attribute float shadowBlur
attribute DOMString shadowColor

Detailed Description

Definition at line 58 of file nsIDOMCanvasRenderingContext2D.idl.


Member Function Documentation

void nsIDOMCanvasRenderingContext2D::arc ( in float  x,
in float  y,
in float  r,
in float  startAngle,
in float  endAngle,
in boolean  clockwise 
)
void nsIDOMCanvasRenderingContext2D::arcTo ( in float  x1,
in float  y1,
in float  x2,
in float  y2,
in float  radius 
)
void nsIDOMCanvasRenderingContext2D::bezierCurveTo ( in float  cp1x,
in float  cp1y,
in float  cp2x,
in float  cp2y,
in float  x,
in float  y 
)
void nsIDOMCanvasRenderingContext2D::clearRect ( in float  x,
in float  y,
in float  w,
in float  h 
)
nsIDOMCanvasGradient nsIDOMCanvasRenderingContext2D::createLinearGradient ( in float  x0,
in float  y0,
in float  x1,
in float  y1 
)
nsIDOMCanvasGradient nsIDOMCanvasRenderingContext2D::createRadialGradient ( in float  x0,
in float  y0,
in float  r0,
in float  x1,
in float  y1,
in float  r1 
)
void nsIDOMCanvasRenderingContext2D::drawWindow ( in nsIDOMWindow  window,
in long  x,
in long  y,
in long  w,
in long  h,
in DOMString  bgColor 
)

Renders a region of a window into the canvas.

The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling.

Parameters:
x
y
w
hspecify the area of the window to render, in CSS pixels.
backgroundColorthe canvas is filled with this color before we render the window into it. This color may be transparent/translucent. It is given as a CSS color string (e.g., rgb() or rgba()).

Of course, the rendering obeys the current scale, transform and globalAlpha values.

Hints: -- If 'rgba(0,0,0,0)' is used for the background color, the drawing will be transparent wherever the window is transparent. -- Top-level browsed documents are usually not transparent because the user's background-color preference is applied, but IFRAMEs are transparent if the page doesn't set a background. -- If an opaque color is used for the background color, rendering will be faster because we won't have to compute the window's transparency.

This API cannot currently be used by Web content. It is chrome only.

void nsIDOMCanvasRenderingContext2D::fillRect ( in float  x,
in float  y,
in float  w,
in float  h 
)
void nsIDOMCanvasRenderingContext2D::lineTo ( in float  x,
in float  y 
)
void nsIDOMCanvasRenderingContext2D::moveTo ( in float  x,
in float  y 
)
void nsIDOMCanvasRenderingContext2D::quadraticCurveTo ( in float  cpx,
in float  cpy,
in float  x,
in float  y 
)
void nsIDOMCanvasRenderingContext2D::rect ( in float  x,
in float  y,
in float  w,
in float  h 
)
void nsIDOMCanvasRenderingContext2D::scale ( in float  x,
in float  y 
)
void nsIDOMCanvasRenderingContext2D::strokeRect ( in float  x,
in float  y,
in float  w,
in float  h 
)

Member Data Documentation

Definition at line 62 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 79 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 74 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 75 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 86 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 87 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 85 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 88 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 93 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 94 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 91 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 92 of file nsIDOMCanvasRenderingContext2D.idl.

Definition at line 78 of file nsIDOMCanvasRenderingContext2D.idl.


The documentation for this interface was generated from the following file: