Interface CanvasRenderingContext2D
- All Superinterfaces:
CanvasRenderingContext
- All Known Implementing Classes:
CanvasRenderingImpl
The interface CanvasRenderingContext2D.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
The CanvasRenderingContext2D.arc() method of the Canvas 2D API adds a circular arc to the current sub-path.void
arc
(Double x, Double y, Double radius, Integer startAngle, Double endAngle, boolean counterclockwise) The CanvasRenderingContext2D.arc() method of the Canvas 2D API adds a circular arc to the current sub-path.void
The CanvasRenderingContext2D.arcTo() method of the Canvas 2D API adds a circular arc to the current sub-path, using the given control points and radius.void
The CanvasRenderingContext2D.beginPath() method of the Canvas 2D API starts a new path by emptying the list of sub-paths.void
The CanvasRenderingContext2D.bezierCurveTo() method of the Canvas 2D API adds a cubic Binvalid input: 'é'();zier curve to the current sub-path.void
The CanvasRenderingContext2D.clearRect() method of the Canvas 2D API erases the pixels in a rectangular area by setting them to transparent black.void
clip()
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region.void
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region.void
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region.void
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region.void
The CanvasRenderingContext2D.closePath() method of the Canvas 2D API attempts to add a straight line from the current poInteger to the start of the current sub-path.createConicGradient
(Integer startAngle, Integer x, Integer y) createImageData
(Integer sw, Integer sh) The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions.createImageData
(Integer sw, Integer sh, ImageDataSettings settings) The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions.createImageData
(ImageData imagedata) The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions.createLinearGradient
(Integer x0, Integer y0, Integer x1, Integer y1) The CanvasRenderingContext2D.createLinearGradient() method of the Canvas 2D API creates a gradient along the line connecting two given coordinates.createPattern
(CanvasImageSource image, String repetition) The CanvasRenderingContext2D.createPattern() method of the Canvas 2D API creates a pattern using the specified image and repetition.The CanvasRenderingContext2D.createRadialGradient() method of the Canvas 2D API creates a radial gradient using the size and coordinates of two circles.void
drawFocusIfNeeded
(Path2D path, Element element) The CanvasRenderingContext2D.drawFocusIfNeeded() method of the Canvas 2D API draws a focus ring around the current or given path, if the specified element is focused.void
drawFocusIfNeeded
(Element element) The CanvasRenderingContext2D.drawFocusIfNeeded() method of the Canvas 2D API draws a focus ring around the current or given path, if the specified element is focused.void
drawImage
(CanvasImageSource image, Integer dx, Integer dy) The CanvasRenderingContext2D.drawImage() method of the Canvas 2D API provides different ways to draw an image onto the canvas.void
The CanvasRenderingContext2D.drawImage() method of the Canvas 2D API provides different ways to draw an image onto the canvas.void
drawImage
(CanvasImageSource image, Integer getSx, Integer getSy, Integer getSw, Integer getSh, Integer dx, Integer dy, Integer dw, Integer dh) The CanvasRenderingContext2D.drawImage() method of the Canvas 2D API provides different ways to draw an image onto the canvas.void
ellipse
(Integer x, Integer y, Integer radiusX, Integer radiusY, Integer rotation, Integer startAngle, Integer endAngle) The CanvasRenderingContext2D.ellipse() method of the Canvas 2D API adds an elliptical arc to the current sub-path.void
ellipse
(Integer x, Integer y, Integer radiusX, Integer radiusY, Integer rotation, Integer startAngle, Integer endAngle, boolean counterclockwise) The CanvasRenderingContext2D.ellipse() method of the Canvas 2D API adds an elliptical arc to the current sub-path.void
fill()
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.void
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.void
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.void
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.void
The CanvasRenderingContext2D.fillRect() method of the Canvas 2D API draws a rectangle that is filled according to the current fillStyle.void
The CanvasRenderingContext2D method fillText(), part of the Canvas 2D API, draws a text string at the specified coordinates, filling the string's characters with the current fillStyle.void
The CanvasRenderingContext2D method fillText(), part of the Canvas 2D API, draws a text string at the specified coordinates, filling the string's characters with the current fillStyle.The CanvasRenderingContext2D.canvas property, part of the Canvas API, is a read-only reference to the HTMLCanvasElement object that is associated with a given context.The CanvasRenderingContext2D.direction property of the Canvas 2D API specifies the current text direction used to draw text.The CanvasRenderingContext2D.fillStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use inside shapes.The CanvasRenderingContext2D.filter property of the Canvas 2D API provides filter effects such as blurring and grayscaling.getFont()
The CanvasRenderingContext2D.font property of the Canvas 2D API specifies the current text style to use when drawing text.The CanvasRenderingContext2D.globalAlpha property of the Canvas 2D API specifies the alpha (transparency) value that is applied to shapes and images before they are drawn onto the canvas.The CanvasRenderingContext2D.globalCompositeOperation property of the Canvas 2D API sets the type of compositing operation to apply when drawing new shapes.getImageData
(Integer sx, Integer sy, Integer sw, Integer sh) The CanvasRenderingContext2D method getImageData() of the Canvas 2D API returns an ImageData object representing the underlying pixel data for a specified portion of the canvas.getImageData
(Integer sx, Integer sy, Integer sw, Integer sh, ImageDataSettings settings) The CanvasRenderingContext2D method getImageData() of the Canvas 2D API returns an ImageData object representing the underlying pixel data for a specified portion of the canvas.boolean
The imageSmoothingEnabled property of the CanvasRenderingContext2D interface, part of the Canvas API, determines whether scaled images are smoothed (true, default) or not (false).The imageSmoothingQuality property of the CanvasRenderingContext2D interface, part of the Canvas API, lets you set the quality of image smoothing.The CanvasRenderingContext2D.lineCap property of the Canvas 2D API determines the shape used to draw the end points of lines.The getLineDash() method of the Canvas 2D API's CanvasRenderingContext2D interface gets the current line dash pattern.The CanvasRenderingContext2D.lineJoin property of the Canvas 2D API determines the shape used to join two line segments where they meet.The CanvasRenderingContext2D.lineWidth property of the Canvas 2D API sets the thickness of lines.The CanvasRenderingContext2D.miterLimit property of the Canvas 2D API sets the miter limit ratio.The CanvasRenderingContext2D.shadowBlur property of the Canvas 2D API specifies the amount of blur applied to shadows.The CanvasRenderingContext2D.shadowColor property of the Canvas 2D API specifies the color of shadows.The CanvasRenderingContext2D.shadowOffsetX property of the Canvas 2D API specifies the distance that shadows will be offset horizontally.The CanvasRenderingContext2D.shadowOffsetY property of the Canvas 2D API specifies the distance that shadows will be offset vertically.The CanvasRenderingContext2D.strokeStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use for the strokes (outlines) around shapes.The CanvasRenderingContext2D.textAlign property of the Canvas 2D API specifies the current text alignment used when drawing text.The CanvasRenderingContext2D.textBaseline property of the Canvas 2D API specifies the current text baseline used when drawing text.The CanvasRenderingContext2D.getTransform() method of the Canvas 2D API retrieves the current transformation matrix being applied to the context.boolean
boolean
isPointInPath
(Path2D path, Integer x, Integer y) The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.boolean
isPointInPath
(Path2D path, Integer x, Integer y, String fillRule) The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.boolean
isPointInPath
(Integer x, Integer y) The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.boolean
isPointInPath
(Integer x, Integer y, String fillRule) The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.boolean
isPointInStroke
(Path2D path, Integer x, Integer y) The CanvasRenderingContext2D.isPointInStroke() method of the Canvas 2D API reports whether or not the specified poInteger is inside the area contained by the stroking of a path.boolean
isPointInStroke
(Integer x, Integer y) The CanvasRenderingContext2D.isPointInStroke() method of the Canvas 2D API reports whether or not the specified poInteger is inside the area contained by the stroking of a path.The CanvasRenderingContext2D.lineDashOffset property of the Canvas 2D API sets the line dash offset, or invalid input: '"'();phase.invalid input: '"'();void
The CanvasRenderingContext2D method lineTo(), part of the Canvas 2D API, adds a straight line to the current sub-path by connecting the sub-path's last poInteger to the specified (x, y) coordinates.measureText
(String text) The CanvasRenderingContext2D.measureText() method returns a TextMetrics object that contains information about the measured text (such as its width, for example).void
The CanvasRenderingContext2D.moveTo() method of the Canvas 2D API begins a new sub-path at the poInteger specified by the given (x, y) coordinates.void
putImageData
(ImageData imagedata, Integer dx, Integer dy) The CanvasRenderingContext2D.putImageData() method of the Canvas 2D API paints data from the given ImageData object onto the canvas.void
putImageData
(ImageData imagedata, Integer dx, Integer dy, Integer dirtyX, Integer dirtyY, Integer dirtyWidth, Integer dirtyHeight) The CanvasRenderingContext2D.putImageData() method of the Canvas 2D API paints data from the given ImageData object onto the canvas.void
quadraticCurveTo
(Integer cpx, Integer cpy, Integer x, Integer y) The CanvasRenderingContext2D.quadraticCurveTo() method of the Canvas 2D API adds a quadratic Binvalid input: 'é'();zier curve to the current sub-path.void
The CanvasRenderingContext2D.rect() method of the Canvas 2D API adds a rectangle to the current path.void
reset()
void
The CanvasRenderingContext2D.resetTransform() method of the Canvas 2D API resets the current transform to the identity matrix.void
restore()
The CanvasRenderingContext2D.restore() method of the Canvas 2D API restores the most recently saved canvas state by popping the top entry in the drawing state stack.void
The CanvasRenderingContext2D.rotate() method of the Canvas 2D API adds a rotation to the transformation matrix.void
void
save()
The CanvasRenderingContext2D.save() method of the Canvas 2D API saves the entire state of the canvas by pushing the current state onto a stack.void
The CanvasRenderingContext2D.scale() method of the Canvas 2D API adds a scaling transformation to the canvas units horizontally and/or vertically.void
The CanvasRenderingContext2D.scrollPathIntoView() method of the Canvas 2D API scrolls the current or given path into view.void
scrollPathIntoView
(Path2D path) The CanvasRenderingContext2D.scrollPathIntoView() method of the Canvas 2D API scrolls the current or given path into view.void
setFillStyle
(Object style) void
void
setGlobalAlpha
(Float globalAlpha) void
setLineCap
(String lineCap) void
setLineDash
(List<Integer> segments) The setLineDash() method of the Canvas 2D API's CanvasRenderingContext2D interface sets the line dash pattern used when stroking lines.void
setLineJoin
(String lineJoin) void
setStrokeStyle
(Object style) void
The CanvasRenderingContext2D.setTransform() method of the Canvas 2D API resets (overrides) the current transformation to the identity matrix, and then invokes a transformation described by the arguments of this method.void
setTransform
(DOMMatrix2DInit transform) The CanvasRenderingContext2D.setTransform() method of the Canvas 2D API resets (overrides) the current transformation to the identity matrix, and then invokes a transformation described by the arguments of this method.void
stroke()
The CanvasRenderingContext2D.stroke() method of the Canvas 2D API strokes (outlines) the current or given path with the current stroke style.void
The CanvasRenderingContext2D.stroke() method of the Canvas 2D API strokes (outlines) the current or given path with the current stroke style.void
strokeRect
(Integer x, Integer y, Integer w, Integer h) The CanvasRenderingContext2D.strokeRect() method of the Canvas 2D API draws a rectangle that is stroked (outlined) according to the current strokeStyle and other context settings.void
strokeText
(String text, Integer x, Integer y) The CanvasRenderingContext2D method strokeText(), part of the Canvas 2D API, strokes invalid input: '&mdash'(); that is, draws the outlines of invalid input: '&mdash'(); the characters of a text string at the specified coordinates.void
strokeText
(String text, Integer x, Integer y, Integer maxWidth) The CanvasRenderingContext2D method strokeText(), part of the Canvas 2D API, strokes invalid input: '&mdash'(); that is, draws the outlines of invalid input: '&mdash'(); the characters of a text string at the specified coordinates.void
The CanvasRenderingContext2D.transform() method of the Canvas 2D API multiplies the current transformation with the matrix described by the arguments of this method.void
The CanvasRenderingContext2D.translate() method of the Canvas 2D API adds a translation transformation to the current matrix.
-
Method Details
-
getDirection
String getDirection()The CanvasRenderingContext2D.direction property of the Canvas 2D API specifies the current text direction used to draw text.- See Also:
-
getFillStyle
Object getFillStyle()The CanvasRenderingContext2D.fillStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use inside shapes. The default style is #000 (black).- See Also:
-
getFilter
Object getFilter()The CanvasRenderingContext2D.filter property of the Canvas 2D API provides filter effects such as blurring and grayscaling. It is similar to the CSS filter property and accepts the same values.- See Also:
-
getFont
Font getFont()The CanvasRenderingContext2D.font property of the Canvas 2D API specifies the current text style to use when drawing text. This string uses the same syntax as the CSS font specifier.- See Also:
-
getFontKerning
String getFontKerning() -
getFontStretch
String getFontStretch() -
getFontVariantCaps
String getFontVariantCaps() -
getGlobalAlpha
Float getGlobalAlpha()The CanvasRenderingContext2D.globalAlpha property of the Canvas 2D API specifies the alpha (transparency) value that is applied to shapes and images before they are drawn onto the canvas.- See Also:
-
getGlobalCompositeOperation
String getGlobalCompositeOperation()The CanvasRenderingContext2D.globalCompositeOperation property of the Canvas 2D API sets the type of compositing operation to apply when drawing new shapes.- See Also:
-
getImageSmoothingEnabled
boolean getImageSmoothingEnabled()The imageSmoothingEnabled property of the CanvasRenderingContext2D interface, part of the Canvas API, determines whether scaled images are smoothed (true, default) or not (false). On getting the imageSmoothingEnabled property, the last value it was set to is returned.- See Also:
-
getImageSmoothingQuality
String getImageSmoothingQuality()The imageSmoothingQuality property of the CanvasRenderingContext2D interface, part of the Canvas API, lets you set the quality of image smoothing.- See Also:
-
getLetterSpacing
String getLetterSpacing() -
getLineCap
String getLineCap()The CanvasRenderingContext2D.lineCap property of the Canvas 2D API determines the shape used to draw the end points of lines.- See Also:
-
lineDashOffset
Integer lineDashOffset()The CanvasRenderingContext2D.lineDashOffset property of the Canvas 2D API sets the line dash offset, or invalid input: '"'();phase.invalid input: '"'();- See Also:
-
getLineJoin
String getLineJoin()The CanvasRenderingContext2D.lineJoin property of the Canvas 2D API determines the shape used to join two line segments where they meet.- See Also:
-
getLineWidth
Integer getLineWidth()The CanvasRenderingContext2D.lineWidth property of the Canvas 2D API sets the thickness of lines.- See Also:
-
getMiterLimit
Integer getMiterLimit()The CanvasRenderingContext2D.miterLimit property of the Canvas 2D API sets the miter limit ratio.- See Also:
-
getShadowBlur
Integer getShadowBlur()The CanvasRenderingContext2D.shadowBlur property of the Canvas 2D API specifies the amount of blur applied to shadows. The default is 0 (no blur).- See Also:
-
getShadowColor
String getShadowColor()The CanvasRenderingContext2D.shadowColor property of the Canvas 2D API specifies the color of shadows.- See Also:
-
getShadowOffsetX
Integer getShadowOffsetX()The CanvasRenderingContext2D.shadowOffsetX property of the Canvas 2D API specifies the distance that shadows will be offset horizontally.- See Also:
-
getShadowOffsetY
Integer getShadowOffsetY()The CanvasRenderingContext2D.shadowOffsetY property of the Canvas 2D API specifies the distance that shadows will be offset vertically.- See Also:
-
getStrokeStyle
Object getStrokeStyle()The CanvasRenderingContext2D.strokeStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use for the strokes (outlines) around shapes. The default is #000 (black).- See Also:
-
getTextAlign
String getTextAlign()The CanvasRenderingContext2D.textAlign property of the Canvas 2D API specifies the current text alignment used when drawing text.- See Also:
-
getTextBaseline
String getTextBaseline()The CanvasRenderingContext2D.textBaseline property of the Canvas 2D API specifies the current text baseline used when drawing text.- See Also:
-
getTextRendering
String getTextRendering() -
getWordSpacing
String getWordSpacing() -
getCanvas
HTMLCanvasElement getCanvas()The CanvasRenderingContext2D.canvas property, part of the Canvas API, is a read-only reference to the HTMLCanvasElement object that is associated with a given context. It might be null if there is no associated canvas element.- Specified by:
getCanvas
in interfaceCanvasRenderingContext
- Returns:
- the canvas
- See Also:
-
getContextAttributes
CanvasRenderingContext2DSettings getContextAttributes() -
drawImage
The CanvasRenderingContext2D.drawImage() method of the Canvas 2D API provides different ways to draw an image onto the canvas.- See Also:
-
drawImage
The CanvasRenderingContext2D.drawImage() method of the Canvas 2D API provides different ways to draw an image onto the canvas.- See Also:
-
drawImage
void drawImage(CanvasImageSource image, Integer getSx, Integer getSy, Integer getSw, Integer getSh, Integer dx, Integer dy, Integer dw, Integer dh) The CanvasRenderingContext2D.drawImage() method of the Canvas 2D API provides different ways to draw an image onto the canvas.- See Also:
-
fillText
The CanvasRenderingContext2D method fillText(), part of the Canvas 2D API, draws a text string at the specified coordinates, filling the string's characters with the current fillStyle. 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.- See Also:
-
fillText
The CanvasRenderingContext2D method fillText(), part of the Canvas 2D API, draws a text string at the specified coordinates, filling the string's characters with the current fillStyle. 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.- See Also:
-
measureText
The CanvasRenderingContext2D.measureText() method returns a TextMetrics object that contains information about the measured text (such as its width, for example).- See Also:
-
strokeText
The CanvasRenderingContext2D method strokeText(), part of the Canvas 2D API, strokes invalid input: '&mdash'(); that is, draws the outlines of invalid input: '&mdash'(); 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.- See Also:
-
strokeText
The CanvasRenderingContext2D method strokeText(), part of the Canvas 2D API, strokes invalid input: '&mdash'(); that is, draws the outlines of invalid input: '&mdash'(); 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.- See Also:
-
createConicGradient
-
createLinearGradient
The CanvasRenderingContext2D.createLinearGradient() method of the Canvas 2D API creates a gradient along the line connecting two given coordinates.- See Also:
-
createPattern
The CanvasRenderingContext2D.createPattern() method of the Canvas 2D API creates a pattern using the specified image and repetition. This method returns a CanvasPattern.- See Also:
-
createRadialGradient
CanvasGradient createRadialGradient(Integer x0, Integer y0, Integer r0, Integer x1, Integer y1, Integer r1) The CanvasRenderingContext2D.createRadialGradient() method of the Canvas 2D API creates a radial gradient using the size and coordinates of two circles.- See Also:
-
beginPath
void beginPath()The CanvasRenderingContext2D.beginPath() method of the Canvas 2D API starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.- See Also:
-
clip
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region. The previous clipping region, if any, is intersected with the current or given path to create the new clipping region.- See Also:
-
clip
void clip()The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region. The previous clipping region, if any, is intersected with the current or given path to create the new clipping region.- See Also:
-
clip
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region. The previous clipping region, if any, is intersected with the current or given path to create the new clipping region.- See Also:
-
clip
The CanvasRenderingContext2D.clip() method of the Canvas 2D API turns the current or given path into the current clipping region. The previous clipping region, if any, is intersected with the current or given path to create the new clipping region.- See Also:
-
fill
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.- See Also:
-
fill
void fill()The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.- See Also:
-
fill
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.- See Also:
-
fill
The CanvasRenderingContext2D.fill() method of the Canvas 2D API fills the current or given path with the current fillStyle.- See Also:
-
isPointInPath
The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.- See Also:
-
isPointInPath
The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.- See Also:
-
isPointInPath
The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.- See Also:
-
isPointInPath
The CanvasRenderingContext2D.isPointInPath() method of the Canvas 2D API reports whether or not the specified poInteger is contained in the current path.- See Also:
-
isPointInStroke
The CanvasRenderingContext2D.isPointInStroke() method of the Canvas 2D API reports whether or not the specified poInteger is inside the area contained by the stroking of a path.- See Also:
-
isPointInStroke
The CanvasRenderingContext2D.isPointInStroke() method of the Canvas 2D API reports whether or not the specified poInteger is inside the area contained by the stroking of a path.- See Also:
-
stroke
void stroke()The CanvasRenderingContext2D.stroke() method of the Canvas 2D API strokes (outlines) the current or given path with the current stroke style.- See Also:
-
stroke
The CanvasRenderingContext2D.stroke() method of the Canvas 2D API strokes (outlines) the current or given path with the current stroke style.- See Also:
-
createImageData
The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.- See Also:
-
createImageData
The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.- See Also:
-
createImageData
The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.- See Also:
-
getImageData
The CanvasRenderingContext2D method getImageData() of the Canvas 2D API returns an ImageData object representing the underlying pixel data for a specified portion of the canvas.- See Also:
-
getImageData
The CanvasRenderingContext2D method getImageData() of the Canvas 2D API returns an ImageData object representing the underlying pixel data for a specified portion of the canvas.- See Also:
-
putImageData
The CanvasRenderingContext2D.putImageData() method of the Canvas 2D API paints data from the given ImageData object onto the canvas. If a dirty rectangle is provided, only the pixels from that rectangle are painted. This method is not affected by the canvas transformation matrix.- See Also:
-
putImageData
void putImageData(ImageData imagedata, Integer dx, Integer dy, Integer dirtyX, Integer dirtyY, Integer dirtyWidth, Integer dirtyHeight) The CanvasRenderingContext2D.putImageData() method of the Canvas 2D API paints data from the given ImageData object onto the canvas. If a dirty rectangle is provided, only the pixels from that rectangle are painted. This method is not affected by the canvas transformation matrix.- See Also:
-
arc
void arc(Double x, Double y, Double radius, Integer startAngle, Double endAngle, boolean counterclockwise) The CanvasRenderingContext2D.arc() method of the Canvas 2D API adds a circular arc to the current sub-path.- See Also:
-
arc
The CanvasRenderingContext2D.arc() method of the Canvas 2D API adds a circular arc to the current sub-path.- See Also:
-
arcTo
The CanvasRenderingContext2D.arcTo() method of the Canvas 2D API 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 poInteger with a straight line, if necessary for the specified parameters.- See Also:
-
bezierCurveTo
The CanvasRenderingContext2D.bezierCurveTo() method of the Canvas 2D API adds a cubic Binvalid input: 'é'();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 poInteger is the latest poInteger in the current path, which can be changed using moveTo() before creating the Binvalid input: 'é'();zier curve.- See Also:
-
closePath
void closePath()The CanvasRenderingContext2D.closePath() method of the Canvas 2D API attempts to add a straight line from the current poInteger to the start of the current sub-path. If the shape has already been closed or has only one point, this function does nothing.- See Also:
-
ellipse
void ellipse(Integer x, Integer y, Integer radiusX, Integer radiusY, Integer rotation, Integer startAngle, Integer endAngle, boolean counterclockwise) The CanvasRenderingContext2D.ellipse() method of the Canvas 2D API adds an elliptical arc to the current sub-path.- See Also:
-
ellipse
void ellipse(Integer x, Integer y, Integer radiusX, Integer radiusY, Integer rotation, Integer startAngle, Integer endAngle) The CanvasRenderingContext2D.ellipse() method of the Canvas 2D API adds an elliptical arc to the current sub-path.- See Also:
-
lineTo
The CanvasRenderingContext2D method lineTo(), part of the Canvas 2D API, adds a straight line to the current sub-path by connecting the sub-path's last poInteger to the specified (x, y) coordinates.- See Also:
-
moveTo
The CanvasRenderingContext2D.moveTo() method of the Canvas 2D API begins a new sub-path at the poInteger specified by the given (x, y) coordinates.- See Also:
-
quadraticCurveTo
The CanvasRenderingContext2D.quadraticCurveTo() method of the Canvas 2D API adds a quadratic Binvalid input: 'é'();zier curve to the current sub-path. It requires two points: the first one is a control poInteger and the second one is the end point. The starting poInteger is the latest poInteger in the current path, which can be changed using moveTo() before creating the quadratic Binvalid input: 'é'();zier curve.- See Also:
-
rect
The CanvasRenderingContext2D.rect() method of the Canvas 2D API adds a rectangle to the current path.- See Also:
-
roundRect
-
clearRect
The CanvasRenderingContext2D.clearRect() method of the Canvas 2D API erases the pixels in a rectangular area by setting them to transparent black.- See Also:
-
fillRect
The CanvasRenderingContext2D.fillRect() method of the Canvas 2D API draws a rectangle that is filled according to the current fillStyle.- See Also:
-
strokeRect
The CanvasRenderingContext2D.strokeRect() method of the Canvas 2D API draws a rectangle that is stroked (outlined) according to the current strokeStyle and other context settings.- See Also:
-
isContextLost
boolean isContextLost() -
reset
void reset() -
restore
void restore()The CanvasRenderingContext2D.restore() method of the Canvas 2D API 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.- See Also:
-
save
void save()The CanvasRenderingContext2D.save() method of the Canvas 2D API saves the entire state of the canvas by pushing the current state onto a stack.- See Also:
-
getLineDash
The getLineDash() method of the Canvas 2D API's CanvasRenderingContext2D interface gets the current line dash pattern.- See Also:
-
setLineDash
The setLineDash() method of the Canvas 2D API's CanvasRenderingContext2D interface 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.- See Also:
-
setFillStyle
-
setFont
-
setGlobalAlpha
-
setLineCap
-
setLineJoin
-
setStrokeStyle
-
drawFocusIfNeeded
The CanvasRenderingContext2D.drawFocusIfNeeded() method of the Canvas 2D API draws a focus ring around the current or given path, if the specified element is focused.- See Also:
-
drawFocusIfNeeded
The CanvasRenderingContext2D.drawFocusIfNeeded() method of the Canvas 2D API draws a focus ring around the current or given path, if the specified element is focused.- See Also:
-
scrollPathIntoView
void scrollPathIntoView()The CanvasRenderingContext2D.scrollPathIntoView() method of the Canvas 2D API scrolls the current or given path into view. It is similar to Element.scrollIntoView().- See Also:
-
scrollPathIntoView
The CanvasRenderingContext2D.scrollPathIntoView() method of the Canvas 2D API scrolls the current or given path into view. It is similar to Element.scrollIntoView().- See Also:
-
getTransform
DOMMatrix getTransform()The CanvasRenderingContext2D.getTransform() method of the Canvas 2D API retrieves the current transformation matrix being applied to the context.- See Also:
-
resetTransform
void resetTransform()The CanvasRenderingContext2D.resetTransform() method of the Canvas 2D API resets the current transform to the identity matrix.- See Also:
-
rotate
The CanvasRenderingContext2D.rotate() method of the Canvas 2D API adds a rotation to the transformation matrix.- See Also:
-
scale
The CanvasRenderingContext2D.scale() method of the Canvas 2D API adds a scaling transformation to the canvas units horizontally and/or vertically.- See Also:
-
setTransform
The CanvasRenderingContext2D.setTransform() method of the Canvas 2D API resets (overrides) the current transformation to the identity matrix, and then invokes a transformation described by the arguments of this method. This lets you scale, rotate, translate (move), and skew the context.- See Also:
-
setTransform
The CanvasRenderingContext2D.setTransform() method of the Canvas 2D API resets (overrides) the current transformation to the identity matrix, and then invokes a transformation described by the arguments of this method. This lets you scale, rotate, translate (move), and skew the context.- See Also:
-
transform
The CanvasRenderingContext2D.transform() method of the Canvas 2D API 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.- See Also:
-
translate
The CanvasRenderingContext2D.translate() method of the Canvas 2D API adds a translation transformation to the current matrix.- See Also:
-