@JsType(isNative=true, name="CanvasRenderingContext2D", namespace="<global>") public final class Context2dItem extends BaseHtmlElement
BaseEventTarget.EventListenerCallback
Modifier and Type | Method and Description |
---|---|
void |
arc(double x,
double y,
double radius,
double startAngle,
double endAngle)
Adds a circular arc to the current sub-path.
The arc method creates a circular arc centered at (x, y) with a radius of radius. The path starts at "startAngle", ends at "endAngle", and travels in the clockwise direction. |
void |
arc(double x,
double y,
double radius,
double startAngle,
double endAngle,
boolean anticlockwise)
Adds a circular arc to the current sub-path.
The arc method creates a circular arc centered at (x, y) with a radius of radius. The path starts at "startAngle", ends at "endAngle", and travels in the direction given by "anticlockwise" (defaulting to clockwise). |
void |
arcTo(double x1,
double y1,
double x2,
double y2,
double radius)
adds a circular arc to the current sub-path, using the given control points and radius.
The arc is automatically connected to the path's latest point with a straight line, if necessary for the specified parameters. This method is commonly used for making rounded corners. |
void |
beginPath()
Starts a new path by emptying the list of sub-paths.
Call this method when you want to create a new path. |
void |
bezierCurveTo(double cp1x,
double cp1y,
double cp2x,
double cp2y,
double x,
double y)
Adds a cubic Bézier curve to the current sub-path.
It requires three points: the first two are control points and the third one is the end point. The starting point is the latest point in the current path. |
void |
clearRect(double x,
double y,
double width,
double height)
Erases the pixels in a rectangular area by setting them to transparent black.
|
void |
clip()
Turns the current or given path in the the current clipping region.
It replaces any previous clipping region.. |
void |
closePath()
Causes the point of the pen to move back to the start of the current sub-path.
It tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing. |
CanvasGradientItem |
createLinearGradient(double x0,
double y0,
double x1,
double y1)
Creates a gradient along the line connecting two given coordinates.
|
CanvasPatternItem |
createPattern(Canvas canvas,
Repetition repetition)
Creates a pattern using the specified canvas and repetition.
|
CanvasPatternItem |
createPattern(Img image,
Repetition repetition)
Creates a pattern using the specified image and repetition.
|
CanvasGradientItem |
createRadialGradient(double x0,
double y0,
double r0,
double x1,
double y1,
double r1)
Creates a radial gradient using the size and coordinates of two circles.
|
void |
drawImage(Canvas canvas,
double dx,
double dy)
Draws a canvas onto the canvas.
|
void |
drawImage(Canvas canvas,
double dx,
double dy,
double dWidth)
Draws a canvas onto the canvas.
|
void |
drawImage(Canvas canvas,
double dx,
double dy,
double dWidth,
double dHeight)
Draws a canvas onto the canvas.
|
void |
drawImage(Img image,
double dx,
double dy)
Draws an image onto the canvas.
|
void |
drawImage(Img image,
double dx,
double dy,
double dWidth)
Draws an image onto the canvas.
|
void |
drawImage(Img image,
double dx,
double dy,
double dWidth,
double dHeight)
Draws an image onto the canvas.
|
void |
fill()
Fills the current or given path with the current fill style.
|
void |
fillRect(double x,
double y,
double width,
double height)
Draws a rectangle that is filled according to the current fill style.
This method draws directly to the canvas without modifying the current path, so any subsequent fill or stroke calls will have no effect on it. |
void |
fillText(String text,
double x,
double y)
Draws a text string at the specified coordinates, filling the string's characters with the current fill style.
|
void |
fillText(String text,
double x,
double y,
double maxWidth)
Draws a text string at the specified coordinates, filling the string's characters with the current fill style.
An parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size. |
Canvas |
getCanvas()
Returns the canvas of the canvas rendering context 2D object.
|
IsColor |
getFillColor()
Returns the filling styling is used for colors inside shapes.
|
String |
getFillColorAsString()
Returns the filling styling is used for colors inside shapes.
|
CanvasGradientItem |
getFillGradient()
Returns the filling styling is used for gradient style inside shapes.
|
CanvasPatternItem |
getFillPattern()
Returns the filling styling is used for pattern style inside shapes.
|
String |
getFont()
Returns the current text style to use when drawing text.
This string uses the same syntax as the CSS font specifier. |
GlobalCompositeOperation |
getGlobalCompositeOperation()
Returns the type of compositing operation to apply when drawing new shapes.
|
ImageData |
getImageData(double sx,
double sy,
double sw,
double sh)
Returns an
ImageData object representing the underlying pixel data for a specified portion of the canvas. |
CapStyle |
getLineCap()
Returns the shape used to draw the end points of lines.
|
double |
getLineDashOffset()
Returns the line dash offset, or "phase.".
Specifies where to start a dash array on a line. |
JoinStyle |
getLineJoin()
Returns the type of corners where two lines meet.
|
double |
getLineWidth()
Returns the thickness of lines.
|
double |
getMiterLimit()
Returns the miter limit ratio.
|
double |
getShadowBlur()
Returns the amount of blur applied to shadows.
|
String |
getShadowColor()
Returns the color of shadows.
The shadow's rendered opacity will be affected by the opacity of the fillStyle color when filling, and of the strokeStyle color when stroking. |
double |
getShadowOffsetX()
Returns the distance that shadows will be offset horizontally.
|
double |
getShadowOffsetY()
Returns the distance that shadows will be offset vertically.
|
IsColor |
getStrokeColor()
Returns the stroke color is used for the lines around shapes.
|
String |
getStrokeColorAsString()
Returns the stroke color is used for the lines around shapes.
|
CanvasGradientItem |
getStrokeGradient()
Returns the stroke gradient is used for the lines around shapes.
|
CanvasPatternItem |
getStrokePattern()
Returns the stroke pattern is used for the lines around shapes.
|
TextAlign |
getTextAlign()
Returns the current text alignment used when drawing text.
|
TextBaseline |
getTextBaseline()
Returns the current text baseline used when drawing text.
|
void |
lineTo(double x,
double y)
adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
|
TextMetricsItem |
measureText(String text)
Returns a text metric item that contains information about the measured text.
|
void |
moveTo(double x,
double y)
Begins a new sub-path at the point specified by the given (x, y) coordinates.
|
void |
putImageData(ImageData imagedata,
double dx,
double dy)
Paints data from the given
ImageData object onto the canvas. |
void |
quadraticCurveTo(double cpx,
double cpy,
double x,
double y)
Adds a quadratic Bézier curve to the current sub-path.
It requires two points: the first one is a control point and the second one is the end point. The starting point is the latest point in the current path. |
void |
rect(double x,
double y,
double width,
double height)
Adds a rectangle to the current path.
|
void |
restore()
Restores the most recently saved canvas state by popping the top entry in the drawing state stack.
If there is no saved state, this method does nothing. |
void |
rotate(double angle)
Adds a rotation to the transformation matrix.
|
void |
save()
Saves the entire state of the canvas by pushing the current state onto a stack.
|
void |
scale(double x,
double y)
Adds a scaling transformation to the canvas units horizontally and/or vertically.
|
void |
setFillColor(IsColor color)
Sets the filling styling is used for colors inside shapes.
|
void |
setFillColor(String color)
Sets the filling styling is used for colors inside shapes.
|
void |
setFillGradient(CanvasGradientItem gradient)
Sets the filling styling is used for gradient style inside shapes.
|
void |
setFillPattern(CanvasPatternItem pattern)
Sets the filling styling is used for pattern style inside shapes.
|
void |
setFont(String font)
Sets the current text style to use when drawing text.
This string uses the same syntax as the CSS font specifier. |
void |
setGlobalCompositeOperation(GlobalCompositeOperation globalCompositeOperation)
Sets the type of compositing operation to apply when drawing new shapes.
|
void |
setLineCap(CapStyle lineCap)
Sets the shape used to draw the end points of lines.
|
void |
setLineDash(int... lineDash)
Sets the line dash pattern used when stroking lines.
It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern. |
void |
setLineDash(List<Integer> lineDash)
Sets the line dash pattern used when stroking lines.
It uses a list of values that specify alternating lengths of lines and gaps which describe the pattern. |
void |
setLineDashOffset(double lineDashOffset)
Sets the line dash offset, or "phase.".
Specifies where to start a dash array on a line. |
void |
setLineJoin(JoinStyle lineJoin)
Sets the type of corners where two lines meet.
|
void |
setLineWidth(double lineWidth)
Sets the thickness of lines.
|
void |
setMiterLimit(double miterLimit)
Sets the miter limit ratio.
|
void |
setShadowBlur(double shadowBlur)
Sets the amount of blur applied to shadows.
|
void |
setShadowColor(String shadowColor)
Sets the color of shadows.
The shadow's rendered opacity will be affected by the opacity of the fillStyle color when filling, and of the strokeStyle color when stroking. |
void |
setShadowOffsetX(double shadowOffsetX)
Sets the distance that shadows will be offset horizontally.
|
void |
setShadowOffsetY(double shadowOffsetY)
Sets the distance that shadows will be offset vertically.
|
void |
setStrokeColor(IsColor color)
Sets the stroke color is used for the lines around shapes.
|
void |
setStrokeColor(String color)
Sets the stroke color is used for the lines around shapes.
|
void |
setStrokeGradient(CanvasGradientItem gradient)
Sets the stroke gradient is used for the lines around shapes.
|
void |
setStrokePattern(CanvasPatternItem pattern)
Sets the stroke pattern is used for the lines around shapes.
|
void |
setTextAlign(TextAlign textAlign)
Sets the current text alignment used when drawing text.
|
void |
setTextBaseline(TextBaseline textBaseline)
Sets the current text baseline used when drawing text.
|
void |
stroke()
Strokes (outlines) the current or given path with the current stroke style.
Strokes are aligned to the center of a path; in other words, half of the stroke is drawn on the inner side, and half on the outer side. |
void |
strokeRect(double x,
double y,
double width,
double height)
Draws a rectangle that is stroked (outlined) according to the current strokeStyle and other context settings.
|
void |
strokeText(String text,
double x,
double y)
Strokes - that is, draws the outlines of - the characters of a text string at the specified coordinates.
|
void |
strokeText(String text,
double x,
double y,
double maxWidth)
Strokes - that is, draws the outlines of - the characters of a text string at the specified coordinates.
An optional parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size. |
void |
transform(double m11,
double m12,
double m21,
double m22,
double dx,
double dy)
Multiplies the current transformation with the matrix described by the arguments of this method.
This lets you scale, rotate, translate (move), and skew the context. |
void |
translate(double x,
double y)
Adds a translation transformation to the current matrix by moving the canvas and its origin x units horizontally and y units vertically on the grid.
|
getAbsoluteLeft, getAbsoluteTop, getInnerText, getOffsetHeight, getOffsetLeft, getOffsetParent, getOffsetTop, getOffsetWidth, getParentHtmlElement, getScrollingElement, getStyle, getTabIndex, removeFromParent, setInnerText, setTabIndex
getAttributes, getChildElementCount, getClientHeight, getClientLeft, getClientTop, getClientWidth, getElementsByTagName, getFirstElementChild, getId, getInnerHTML, getLastElementChild, getNextElementSibling, getOuterHTML, getPreviousElementSibling, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getTagName, hasAttributes, remove, setId, setInnerHTML
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, getTextContent, hasChildNodes, insertBefore, removeAllChildren, removeChild, setNodeValue, setTextContent
addEventListener, removeEventListener
@JsProperty public Canvas getCanvas()
@JsOverlay public void setFillColor(String color)
color
- color to use inside shapes@JsOverlay public void setFillColor(IsColor color)
color
- color to use inside shapes@JsOverlay public void setFillGradient(CanvasGradientItem gradient)
gradient
- gradient style to use inside shapes@JsOverlay public final void setFillPattern(CanvasPatternItem pattern)
pattern
- pattern style to use inside shapes@JsOverlay public String getFillColorAsString()
@JsOverlay public IsColor getFillColor()
@JsOverlay public CanvasGradientItem getFillGradient()
@JsOverlay public final CanvasPatternItem getFillPattern()
@JsProperty public String getFont()
@JsProperty public void setFont(String font)
font
- the current text style to use when drawing text@JsOverlay public void setLineCap(CapStyle lineCap)
lineCap
- the shape used to draw the end points of lines.@JsOverlay public CapStyle getLineCap()
@JsProperty public double getLineDashOffset()
@JsProperty public void setLineDashOffset(double lineDashOffset)
lineDashOffset
- the line dash offset, or "phase."@JsOverlay public void setLineJoin(JoinStyle lineJoin)
lineJoin
- the type of corners where two lines meet@JsOverlay public JoinStyle getLineJoin()
@JsProperty public double getLineWidth()
@JsProperty public void setLineWidth(double lineWidth)
lineWidth
- the thickness of lines@JsOverlay public void setLineDash(int... lineDash)
lineDash
- an array of integers that specify distances to alternately draw a line and a gap (in coordinate space units).@JsOverlay public void setLineDash(List<Integer> lineDash)
lineDash
- a list of integers that specify distances to alternately draw a line and a gap (in coordinate space units).@JsProperty public double getMiterLimit()
@JsProperty public void setMiterLimit(double miterLimit)
miterLimit
- the miter limit ratio@JsProperty public double getShadowBlur()
@JsProperty public void setShadowBlur(double shadowBlur)
shadowBlur
- the amount of blur applied to shadows.@JsProperty public String getShadowColor()
@JsProperty public void setShadowColor(String shadowColor)
shadowColor
- the color of shadows@JsProperty public double getShadowOffsetX()
@JsProperty public void setShadowOffsetX(double shadowOffsetX)
shadowOffsetX
- the distance that shadows will be offset horizontally@JsProperty public double getShadowOffsetY()
@JsProperty public void setShadowOffsetY(double shadowOffsetY)
shadowOffsetY
- the distance that shadows will be offset vertically.@JsOverlay public void setStrokeColor(String color)
color
- the stroke color is used for the lines around shapes@JsOverlay public void setStrokeColor(IsColor color)
color
- the stroke color is used for the lines around shapes@JsOverlay public void setStrokeGradient(CanvasGradientItem gradient)
gradient
- the stroke gradient is used for the lines around shapes@JsOverlay public final void setStrokePattern(CanvasPatternItem pattern)
pattern
- the stroke pattern is used for the lines around shapes@JsOverlay public String getStrokeColorAsString()
@JsOverlay public IsColor getStrokeColor()
@JsOverlay public CanvasGradientItem getStrokeGradient()
@JsOverlay public final CanvasPatternItem getStrokePattern()
@JsOverlay public void setTextAlign(TextAlign textAlign)
textAlign
- the current text alignment used when drawing text@JsOverlay public TextAlign getTextAlign()
@JsOverlay public void setTextBaseline(TextBaseline textBaseline)
textBaseline
- the current text baseline used when drawing text@JsOverlay public TextBaseline getTextBaseline()
@JsOverlay public void setGlobalCompositeOperation(GlobalCompositeOperation globalCompositeOperation)
globalCompositeOperation
- which of the compositing or blending mode operations to use@JsOverlay public GlobalCompositeOperation getGlobalCompositeOperation()
@JsMethod public void arc(double x, double y, double radius, double startAngle, double endAngle, boolean anticlockwise)
x
- the horizontal coordinate of the arc's centery
- the vertical coordinate of the arc's centerradius
- the arc's radius. Must be positivestartAngle
- the angle at which the arc starts in radians, measured from the positive x-axisendAngle
- the angle at which the arc ends in radians, measured from the positive x-axisanticlockwise
- if true
, draws the arc counter-clockwise between the start and end angles.false
(clockwise).@JsMethod public void arc(double x, double y, double radius, double startAngle, double endAngle)
x
- the horizontal coordinate of the arc's centery
- the vertical coordinate of the arc's centerradius
- the arc's radius. Must be positivestartAngle
- the angle at which the arc starts in radians, measured from the positive x-axisendAngle
- the angle at which the arc ends in radians, measured from the positive x-axis@JsMethod public void arcTo(double x1, double y1, double x2, double y2, double radius)
x1
- the x-axis coordinate of the first control pointy1
- the y-axis coordinate of the first control pointx2
- the x-axis coordinate of the second control pointy2
- the y-axis coordinate of the second control pointradius
- the arc's radius. Must be non-negative.@JsMethod public void beginPath()
@JsMethod public void bezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y)
cp1x
- the x-axis coordinate of the first control pointcp1y
- the y-axis coordinate of the first control pointcp2x
- the x-axis coordinate of the second control pointcp2y
- the y-axis coordinate of the second control pointx
- the x-axis coordinate of the end pointy
- the y-axis coordinate of the end point@JsMethod public void clearRect(double x, double y, double width, double height)
x
- the x-axis coordinate of the rectangle's starting pointy
- the y-axis coordinate of the rectangle's starting pointwidth
- the rectangle's width. Positive values are to the right, and negative to the leftheight
- the rectangle's height. Positive values are down, and negative are up@JsMethod public void clip()
@JsMethod public void closePath()
@JsMethod public CanvasGradientItem createLinearGradient(double x0, double y0, double x1, double y1)
x0
- the x-axis coordinate of the start pointy0
- the y-axis coordinate of the start pointx1
- the x-axis coordinate of the end pointy1
- the y-axis coordinate of the end point@JsOverlay public final CanvasPatternItem createPattern(Canvas canvas, Repetition repetition)
canvas
- an canvas objectrepetition
- a repetition object indicating how to repeat the pattern's image@JsOverlay public final CanvasPatternItem createPattern(Img image, Repetition repetition)
image
- an image objectrepetition
- a repetition object indicating how to repeat the pattern's image@JsMethod public CanvasGradientItem createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1)
x0
- the x-axis coordinate of the start circley0
- the y-axis coordinate of the start circler0
- the radius of the start circle. Must be non-negative and finitex1
- the x-axis coordinate of the end circley1
- the y-axis coordinate of the end circler1
- the radius of the end circle. Must be non-negative and finite@JsOverlay public final void drawImage(Canvas canvas, double dx, double dy, double dWidth, double dHeight)
canvas
- canvas instance to draw in the the contextdx
- the x-axis coordinate in the destination canvas at which to place the top-left corner of the source canvasdy
- the y-axis coordinate in the destination canvas at which to place the top-left corner of the source canvasdWidth
- the width to draw the canvas in the destination canvas.dHeight
- the height to draw the canvas in the destination canvas.@JsOverlay public final void drawImage(Canvas canvas, double dx, double dy, double dWidth)
canvas
- canvas instance to draw in the the contextdx
- the x-axis coordinate in the destination canvas at which to place the top-left corner of the source canvasdy
- the y-axis coordinate in the destination canvas at which to place the top-left corner of the source canvasdWidth
- the width to draw the canvas in the destination canvas.@JsOverlay public final void drawImage(Canvas canvas, double dx, double dy)
canvas
- canvas instance to draw in the the contextdx
- the x-axis coordinate in the destination canvas at which to place the top-left corner of the source canvasdy
- the y-axis coordinate in the destination canvas at which to place the top-left corner of the source canvas@JsOverlay public final void drawImage(Img image, double dx, double dy, double dWidth, double dHeight)
image
- image instance to draw in the the contextdx
- the x-axis coordinate in the destination canvas at which to place the top-left corner of the source imagedy
- the y-axis coordinate in the destination canvas at which to place the top-left corner of the source imagedWidth
- the width to draw the image in the destination canvas.dHeight
- the height to draw the image in the destination canvas.@JsOverlay public final void drawImage(Img image, double dx, double dy, double dWidth)
image
- image instance to draw in the the contextdx
- the x-axis coordinate in the destination canvas at which to place the top-left corner of the source imagedy
- the y-axis coordinate in the destination canvas at which to place the top-left corner of the source imagedWidth
- the width to draw the image in the destination canvas.@JsOverlay public final void drawImage(Img image, double dx, double dy)
image
- image instance to draw in the the contextdx
- the x-axis coordinate in the destination canvas at which to place the top-left corner of the source imagedy
- the y-axis coordinate in the destination canvas at which to place the top-left corner of the source image@JsMethod public void fill()
@JsMethod public void fillRect(double x, double y, double width, double height)
x
- the x-axis coordinate of the rectangle's starting pointy
- the y-axis coordinate of the rectangle's starting pointwidth
- the rectangle's width. Positive values are to the right, and negative to the leftheight
- the rectangle's height. Positive values are down, and negative are up@JsMethod public void fillText(String text, double x, double y, double maxWidth)
text
- the string to render in the the context.x
- the x-axis coordinate of the point at which to begin drawing the text, in pixelsy
- the y-axis coordinate of the point at which to begin drawing the text, in pixelsmaxWidth
- the maximum number of pixels wide the text may be once rendered.@JsMethod public void fillText(String text, double x, double y)
text
- the string to render in the the context.x
- the x-axis coordinate of the point at which to begin drawing the text, in pixelsy
- the y-axis coordinate of the point at which to begin drawing the text, in pixels@JsMethod public void lineTo(double x, double y)
x
- the x-axis coordinate of the line's end pointy
- the y-axis coordinate of the line's end point@JsMethod public TextMetricsItem measureText(String text)
text
- the text to measure@JsMethod public void moveTo(double x, double y)
x
- the x-axis (horizontal) coordinate of the pointy
- the y-axis (vertical) coordinate of the point@JsMethod public void quadraticCurveTo(double cpx, double cpy, double x, double y)
cpx
- the x-axis coordinate of the control pointcpy
- the y-axis coordinate of the control pointx
- the x-axis coordinate of the end pointy
- the y-axis coordinate of the end point@JsMethod public void rect(double x, double y, double width, double height)
x
- the x-axis coordinate of the rectangle's starting pointy
- the y-axis coordinate of the rectangle's starting pointwidth
- the rectangle's width. Positive values are to the right, and negative to the leftheight
- the rectangle's height. Positive values are down, and negative are up@JsMethod public void restore()
@JsMethod public void rotate(double angle)
angle
- the rotation angle, clockwise in radians.degree * Math.PI / 180
to calculate a radian from a degree.@JsMethod public void save()
@JsMethod public void scale(double x, double y)
x
- scaling factor in the horizontal direction.y
- scaling factor in the vertical direction.@JsMethod public void stroke()
@JsMethod public void strokeRect(double x, double y, double width, double height)
x
- the x-axis coordinate of the rectangle's starting pointy
- the y-axis coordinate of the rectangle's starting pointwidth
- the rectangle's width. Positive values are to the right, and negative to the leftheight
- the rectangle's height. Positive values are down, and negative are up@JsMethod public void strokeText(String text, double x, double y, double maxWidth)
text
- the text specifying the text string to render in the the context.x
- the x-axis coordinate of the point at which to begin drawing the texty
- the y-axis coordinate of the point at which to begin drawing the textmaxWidth
- The maximum width the text may be once rendered.@JsMethod public void strokeText(String text, double x, double y)
text
- the text specifying the text string to render in the the context.x
- the x-axis coordinate of the point at which to begin drawing the texty
- the y-axis coordinate of the point at which to begin drawing the text@JsMethod public void transform(double m11, double m12, double m21, double m22, double dx, double dy)
m11
- horizontal scaling. A value of 1 results in no scalingm12
- vertical skewingm21
- horizontal skewingm22
- vertical scaling. A value of 1 results in no scalingdx
- horizontal translation (moving)dy
- vertical translation (moving)@JsMethod public void translate(double x, double y)
x
- distance to move in the horizontal direction.y
- distance to move in the vertical direction.@JsMethod public ImageData getImageData(double sx, double sy, double sw, double sh)
ImageData
object representing the underlying pixel data for a specified portion of the canvas.sx
- The x-axis coordinate of the top-left corner of the rectangle from which the ImageData
will be extracted.sy
- The y-axis coordinate of the top-left corner of the rectangle from which the ImageData
will be extracted.sw
- The width of the rectangle from which the ImageData
will be extracted. Positive values are to the right, and negative to the left.sh
- The height of the rectangle from which the ImageData
will be extracted. Positive values are down, and negative are up.ImageData
object representing the underlying pixel data for a specified portion of the canvas.@JsMethod public void putImageData(ImageData imagedata, double dx, double dy)
ImageData
object onto the canvas.imagedata
- An ImageData
object containing the array of pixel values.dx
- Horizontal position (x coordinate) at which to place the image data in the destination canvas.dy
- Vertical position (y coordinate) at which to place the image data in the destination canvas.