public interface CanvasRenderingContext2D extends CanvasRenderingContext
Modifier and Type | Method and Description |
---|---|
void |
arc(float x,
float y,
float radius,
float startAngle,
float endAngle,
boolean anticlockwise)
Adds an arc to the path which it center is at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
|
void |
arcTo(float x1,
float y1,
float x2,
float y2,
float radius)
Adds an arc with the given control points and radius, connected to the previous point by a straight line.
|
void |
beginPath() |
void |
bezierCurveTo(float cp1x,
float cp1y,
float cp2x,
float cp2y,
float x,
float y) |
void |
clearRect(float x,
float y,
float width,
float height)
Clears the rectangle defined by it starting point at (x, y) and has a w width and a h height.
|
void |
clearShadow() |
void |
clip() |
void |
closePath() |
ImageData |
createImageData(float sw,
float sh) |
ImageData |
createImageData(ImageData imagedata) |
CanvasGradient |
createLinearGradient(float x0,
float y0,
float x1,
float y1) |
CanvasPattern |
createPattern(CanvasElement canvas,
String repetitionType)
Parameters |
CanvasPattern |
createPattern(ImageElement image,
String repetitionType)
Parameters |
CanvasGradient |
createRadialGradient(float x0,
float y0,
float r0,
float x1,
float y1,
float r1) |
void |
drawImage(CanvasElement canvas,
float x,
float y)
Draws the specified image.
|
void |
drawImage(CanvasElement canvas,
float x,
float y,
float width,
float height)
Draws the specified image.
|
void |
drawImage(CanvasElement canvas,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy,
float dw,
float dh)
Draws the specified image.
|
void |
drawImage(ImageElement image,
float x,
float y)
Draws the specified image.
|
void |
drawImage(ImageElement image,
float x,
float y,
float width,
float height)
Draws the specified image.
|
void |
drawImage(ImageElement image,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy,
float dw,
float dh)
Draws the specified image.
|
void |
drawImage(VideoElement video,
float x,
float y)
Draws the specified image.
|
void |
drawImage(VideoElement video,
float x,
float y,
float width,
float height)
Draws the specified image.
|
void |
drawImage(VideoElement video,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy,
float dw,
float dh)
Draws the specified image.
|
void |
drawImageFromRect(ImageElement image) |
void |
drawImageFromRect(ImageElement image,
float sx) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw,
float sh) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw,
float sh,
float dx) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy,
float dw) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy,
float dw,
float dh) |
void |
drawImageFromRect(ImageElement image,
float sx,
float sy,
float sw,
float sh,
float dx,
float dy,
float dw,
float dh,
String compositeOperation) |
void |
fill()
Fills the subpaths with the current fill style.
|
void |
fillRect(float x,
float y,
float width,
float height)
Draws a filled rectangle at (x, y) position whose size is determined by width and height.
|
void |
fillText(String text,
float x,
float y) |
void |
fillText(String text,
float x,
float y,
float maxWidth) |
Object |
getFillStyle()
Color or style to use inside shapes.
|
String |
getFont()
Default value
10px sans-serif . |
float |
getGlobalAlpha()
Alpha value that is applied to shapes and images before they are composited onto the canvas.
|
String |
getGlobalCompositeOperation()
With
globalAplpha applied this sets how shapes and images are drawn onto the existing bitmap. |
ImageData |
getImageData(float sx,
float sy,
float sw,
float sh)
Returns an
ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has a sw width and sh height. |
String |
getLineCap()
Type of endings on the end of lines.
|
String |
getLineJoin()
Defines the type of corners where two lines meet.
|
float |
getLineWidth()
Width of lines.
|
float |
getMiterLimit()
Default
10 . |
float |
getShadowBlur()
Specifies the blurring effect.
|
String |
getShadowColor()
Color of the shadow.
|
float |
getShadowOffsetX()
Horizontal distance the shadow will be offset.
|
float |
getShadowOffsetY()
Vertical distance the shadow will be offset.
|
Object |
getStrokeStyle()
Color or style to use for the lines around shapes.
|
String |
getTextAlign()
Possible values:
start (default), end , left , right or center . |
String |
getTextBaseline() |
float |
getWebkitBackingStorePixelRatio() |
Indexable |
getWebkitLineDash()
An array which specifies the lengths of alternating dashes and gaps.
|
float |
getWebkitLineDashOffset()
Specifies where to start a dasharray on a line.
|
boolean |
isPointInPath(float x,
float y)
Reports whether or not the specified point is contained in the current path.
|
boolean |
isWebkitImageSmoothingEnabled()
Image smoothing mode; if disabled, images will not be smoothed if scaled.
|
void |
lineTo(float x,
float y)
Connects the last point in the subpath to the
x, y coordinates with a straight line. |
TextMetrics |
measureText(String text) |
void |
moveTo(float x,
float y)
Moves the starting point of a new subpath to the (x, y) coordinates.
|
void |
putImageData(ImageData imagedata,
float dx,
float dy)
Compatibility notes |
void |
putImageData(ImageData imagedata,
float dx,
float dy,
float dirtyX,
float dirtyY,
float dirtyWidth,
float dirtyHeight)
Compatibility notes |
void |
quadraticCurveTo(float cpx,
float cpy,
float x,
float y) |
void |
rect(float x,
float y,
float width,
float height) |
void |
restore()
Restores the drawing style state to the last element on the 'state stack' saved by save()
|
void |
rotate(float angle) |
void |
save()
Saves the current drawing style state using a stack so you can revert any change you make to it using restore().
|
void |
scale(float sx,
float sy) |
void |
setAlpha(float alpha) |
void |
setCompositeOperation(String compositeOperation) |
void |
setFillColor(float grayLevel) |
void |
setFillColor(float grayLevel,
float alpha) |
void |
setFillColor(float r,
float g,
float b,
float a) |
void |
setFillColor(float c,
float m,
float y,
float k,
float a) |
void |
setFillColor(String color) |
void |
setFillColor(String color,
float alpha) |
void |
setFillStyle(Object arg) |
void |
setFont(String arg) |
void |
setGlobalAlpha(float arg) |
void |
setGlobalCompositeOperation(String arg) |
void |
setLineCap(String arg) |
void |
setLineJoin(String arg) |
void |
setLineWidth(float arg) |
void |
setMiterLimit(float arg) |
void |
setShadow(float width,
float height,
float blur) |
void |
setShadow(float width,
float height,
float blur,
float grayLevel) |
void |
setShadow(float width,
float height,
float blur,
float grayLevel,
float alpha) |
void |
setShadow(float width,
float height,
float blur,
float r,
float g,
float b,
float a) |
void |
setShadow(float width,
float height,
float blur,
float c,
float m,
float y,
float k,
float a) |
void |
setShadow(float width,
float height,
float blur,
String color) |
void |
setShadow(float width,
float height,
float blur,
String color,
float alpha) |
void |
setShadowBlur(float arg) |
void |
setShadowColor(String arg) |
void |
setShadowOffsetX(float arg) |
void |
setShadowOffsetY(float arg) |
void |
setStrokeColor(float grayLevel) |
void |
setStrokeColor(float grayLevel,
float alpha) |
void |
setStrokeColor(float r,
float g,
float b,
float a) |
void |
setStrokeColor(float c,
float m,
float y,
float k,
float a) |
void |
setStrokeColor(String color) |
void |
setStrokeColor(String color,
float alpha) |
void |
setStrokeStyle(Object arg) |
void |
setTextAlign(String arg) |
void |
setTextBaseline(String arg) |
void |
setTransform(float m11,
float m12,
float m21,
float m22,
float dx,
float dy) |
void |
setWebkitImageSmoothingEnabled(boolean arg) |
void |
setWebkitLineDash(Indexable arg) |
void |
setWebkitLineDashOffset(float arg) |
void |
stroke()
Strokes the subpaths with the current stroke style.
|
void |
strokeRect(float x,
float y,
float width,
float height)
Paints a rectangle which it starting point is at (x, y) and has a w width and a h height onto the canvas, using the current stroke style.
|
void |
strokeRect(float x,
float y,
float width,
float height,
float lineWidth)
Paints a rectangle which it starting point is at (x, y) and has a w width and a h height onto the canvas, using the current stroke style.
|
void |
strokeText(String text,
float x,
float y) |
void |
strokeText(String text,
float x,
float y,
float maxWidth) |
void |
transform(float m11,
float m12,
float m21,
float m22,
float dx,
float dy) |
void |
translate(float tx,
float ty)
Moves the origin point of the context to (x, y).
|
ImageData |
webkitGetImageDataHD(float sx,
float sy,
float sw,
float sh) |
void |
webkitPutImageDataHD(ImageData imagedata,
float dx,
float dy) |
void |
webkitPutImageDataHD(ImageData imagedata,
float dx,
float dy,
float dirtyX,
float dirtyY,
float dirtyWidth,
float dirtyHeight) |
getCanvas
Object getFillStyle()
#000
(black).void setFillStyle(Object arg)
String getFont()
10px sans-serif
.void setFont(String arg)
float getGlobalAlpha()
1.0
(opaque).void setGlobalAlpha(float arg)
String getGlobalCompositeOperation()
globalAplpha
applied this sets how shapes and images are drawn onto the existing bitmap. Possible values: source-atop
source-in
source-out
source-over
(default)destination-atop
destination-in
destination-out
destination-over
lighter
xor
void setGlobalCompositeOperation(String arg)
String getLineCap()
butt
(default), round
, square
void setLineCap(String arg)
String getLineJoin()
round
, bevel
, miter
(default)void setLineJoin(String arg)
float getLineWidth()
1.0
void setLineWidth(float arg)
float getMiterLimit()
10
.void setMiterLimit(float arg)
float getShadowBlur()
0
void setShadowBlur(float arg)
String getShadowColor()
void setShadowColor(String arg)
float getShadowOffsetX()
void setShadowOffsetX(float arg)
float getShadowOffsetY()
void setShadowOffsetY(float arg)
Object getStrokeStyle()
#000
(black).void setStrokeStyle(Object arg)
String getTextAlign()
start
(default), end
, left
, right
or center
.void setTextAlign(String arg)
String getTextBaseline()
void setTextBaseline(String arg)
float getWebkitBackingStorePixelRatio()
boolean isWebkitImageSmoothingEnabled()
void setWebkitImageSmoothingEnabled(boolean arg)
Indexable getWebkitLineDash()
void setWebkitLineDash(Indexable arg)
float getWebkitLineDashOffset()
void setWebkitLineDashOffset(float arg)
void arc(float x, float y, float radius, float startAngle, float endAngle, boolean anticlockwise)
Adds an arc to the path which it center is at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
x
y
radius
startAngle
endAngle
anticlockwise
Optional from Gecko 2.0
true
draws the arc anticlockwise, otherwise in a clockwise direction.void arcTo(float x1, float y1, float x2, float y2, float radius)
Adds an arc with the given control points and radius, connected to the previous point by a straight line.
x1
y1
x2
y2
radius
void beginPath()
void bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)
void clearRect(float x, float y, float width, float height)
Clears the rectangle defined by it starting point at (x, y) and has a w width and a h height.
x
y
width
height
void clearShadow()
void clip()
void closePath()
ImageData createImageData(float sw, float sh)
CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1)
CanvasPattern createPattern(CanvasElement canvas, String repetitionType)
A new DOM canvas pattern object for use in pattern-based operations.
NS_ERROR_DOM_INVALID_STATE_ERR
Requires Gecko 10.0
<canvas>
element for the image
parameter is zero-sized (that is, one or both of its dimensions are 0 pixels).CanvasPattern createPattern(ImageElement image, String repetitionType)
A new DOM canvas pattern object for use in pattern-based operations.
NS_ERROR_DOM_INVALID_STATE_ERR
Requires Gecko 10.0
<canvas>
element for the image
parameter is zero-sized (that is, one or both of its dimensions are 0 pixels).CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1)
void drawImage(ImageElement image, float x, float y)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(ImageElement image, float x, float y, float width, float height)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(ImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(CanvasElement canvas, float x, float y)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(CanvasElement canvas, float x, float y, float width, float height)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(CanvasElement canvas, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(VideoElement video, float x, float y)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(VideoElement video, float x, float y, float width, float height)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImage(VideoElement video, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh)
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
image
<img>
, <canvas>
, and <video>
). Some browsers, including Firefox, let you use any arbitrary element.dx
image
.dy
image
.dw
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.dh
image
in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.sx
sy
sw
sx
and sy
to the bottom-right corner of the image is used. If you specify a negative value, the image is flipped horizontally when drawn.sh
The diagram below illustrates the meanings of the various parameters.
INDEX_SIZE_ERR
INVALID_STATE_ERR
TYPE_MISMATCH_ERR
sw
and sh
was added in Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)
.void drawImageFromRect(ImageElement image)
void drawImageFromRect(ImageElement image, float sx)
void drawImageFromRect(ImageElement image, float sx, float sy)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw, float sh)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw, float sh, float dx)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw, float sh, float dx, float dy)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh)
void drawImageFromRect(ImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, String compositeOperation)
void fill()
void fillRect(float x, float y, float width, float height)
Draws a filled rectangle at (x, y) position whose size is determined by width and height.
x
y
width
height
void fillText(String text, float x, float y)
void fillText(String text, float x, float y, float maxWidth)
ImageData getImageData(float sx, float sy, float sw, float sh)
Returns an ImageData
object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has a sw width and sh height.
sx
sy
sw
sh
Returns an ImageData
object containing the image data for the given rectangle of the canvas.
boolean isPointInPath(float x, float y)
Reports whether or not the specified point is contained in the current path.
x
y
true
if the specified point is contained in the current path; otherwise false
.
void lineTo(float x, float y)
Connects the last point in the subpath to the x, y
coordinates with a straight line.
x
y
TextMetrics measureText(String text)
void moveTo(float x, float y)
Moves the starting point of a new subpath to the (x, y) coordinates.
x
y
void putImageData(ImageData imagedata, float dx, float dy)
void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight)
void quadraticCurveTo(float cpx, float cpy, float x, float y)
void rect(float x, float y, float width, float height)
void restore()
void rotate(float angle)
void save()
void scale(float sx, float sy)
void setAlpha(float alpha)
void setCompositeOperation(String compositeOperation)
void setFillColor(String color)
void setFillColor(String color, float alpha)
void setFillColor(float grayLevel)
void setFillColor(float grayLevel, float alpha)
void setFillColor(float r, float g, float b, float a)
void setFillColor(float c, float m, float y, float k, float a)
void setShadow(float width, float height, float blur)
void setShadow(float width, float height, float blur, String color)
void setShadow(float width, float height, float blur, String color, float alpha)
void setShadow(float width, float height, float blur, float grayLevel)
void setShadow(float width, float height, float blur, float grayLevel, float alpha)
void setShadow(float width, float height, float blur, float r, float g, float b, float a)
void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
void setStrokeColor(String color)
void setStrokeColor(String color, float alpha)
void setStrokeColor(float grayLevel)
void setStrokeColor(float grayLevel, float alpha)
void setStrokeColor(float r, float g, float b, float a)
void setStrokeColor(float c, float m, float y, float k, float a)
void setTransform(float m11, float m12, float m21, float m22, float dx, float dy)
void stroke()
void strokeRect(float x, float y, float width, float height)
Paints a rectangle which it starting point is at (x, y) and has a w width and a h height onto the canvas, using the current stroke style.
x
y
w
h
void strokeRect(float x, float y, float width, float height, float lineWidth)
Paints a rectangle which it starting point is at (x, y) and has a w width and a h height onto the canvas, using the current stroke style.
x
y
w
h
void strokeText(String text, float x, float y)
void strokeText(String text, float x, float y, float maxWidth)
void transform(float m11, float m12, float m21, float m22, float dx, float dy)
void translate(float tx, float ty)
Moves the origin point of the context to (x, y).
x
y
ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh)
void webkitPutImageDataHD(ImageData imagedata, float dx, float dy)
void webkitPutImageDataHD(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight)
Copyright © 2016. All rights reserved.