Java com.google.gwt.canvas.dom.client Context2d fields, constructors, methods, implement or subclass

Example usage for Java com.google.gwt.canvas.dom.client Context2d fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.gwt.canvas.dom.client Context2d.

The text is from its open source code.

Method

voidarc(double x, double y, double radius, double startAngle, double endAngle, boolean anticlockwise)
Draws an arc.
voidarc(double x, double y, double radius, double startAngle, double endAngle)
Draws an arc.
voidarcTo(double x1, double y1, double x2, double y2, double radius)
Adds an arc to the current subpath, connecting it to the current point with a line segment.
voidbeginPath()
Begins a new path.
voidbezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y)
Draws a cubic B\u00e9zier curve from the current point to the point (x, y), with control points (cp1x, cp1y) and (cp2x, cp2y).
voidclearRect(double x, double y, double w, double h)
Clears a rectangle.
voidclip()
Creates a new clipping region from the current path.
voidclosePath()
Closes the current path.
ImageDatacreateImageData(int w, int h)
Creates an image data object of the given size.
CanvasGradientcreateLinearGradient(double x0, double y0, double x1, double y1)
Creates a linear gradient.
CanvasPatterncreatePattern(CanvasElement image, Repetition repetition)
Creates a pattern from another canvas.
CanvasPatterncreatePattern(CanvasElement image, String repetition)
Creates a pattern from another canvas.
CanvasPatterncreatePattern(ImageElement image, Repetition repetition)
Creates a pattern from an image.
CanvasPatterncreatePattern(ImageElement image, String repetition)
Creates a pattern from an image.
voiddrawImage(CanvasElement image, double dx, double dy)
Draws an image.
voiddrawImage(ImageElement image, double dx, double dy)
Draws an image.
voiddrawImage(CanvasElement image, double dx, double dy, double dw, double dh)
Draws a scaled image.
voiddrawImage(ImageElement image, double dx, double dy, double dw, double dh)
Draws a scaled image.
voiddrawImage(CanvasElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh)
Draws a scaled subset of an image.
voiddrawImage(ImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh)
Draws a scaled subset of an image.
voidfill()
Fills the current path.
voidfillRect(double x, double y, double w, double h)
Fills a rectangle.
voidfillText(String text, double x, double y)
Draws filled text.
voidfillText(String text, double x, double y, double maxWidth)
Draws filled text squeezed into the given max width.
CanvasElementgetCanvas()
Gets this context's canvas.
FillStrokeStylegetFillStyle()
Returns the context's fillStyle.
ImageDatagetImageData(double sx, double sy, double sw, double sh)
Returns an image data object for the screen area denoted by sx, sy, sw and sh.
doublegetLineWidth()
Gets the current line-width.
FillStrokeStylegetStrokeStyle()
Returns the context's strokeStyle.
voidlineTo(double x, double y)
Adds a line from the current point to the point (x, y) to the current path.
TextMetricsmeasureText(String text)
Returns the metrics for the given text.
voidmoveTo(double x, double y)
Terminates the current path and sets the current path position to the point (x, y).
voidputImageData(ImageData imagedata, double x, double y)
Draws the given image data at the given screen position.
voidquadraticCurveTo(double cpx, double cpy, double x, double y)
Draws a quadratic B\u00e9zier curve from the current point to the point (x, y), with control point (cpx, cpy).
voidrect(double x, double y, double w, double h)
Creates a new rectangular path.
voidrestore()
Restores the context's state.
voidrotate(double angle)
Applies rotation to the current transform.
voidsave()
Saves the context's state.
voidscale(double x, double y)
Applies scale to the current transform.
voidsetFillStyle(FillStrokeStyle fillStyle)
Sets the context's fillStyle.
voidsetFillStyle(String fillStyleColor)
Convenience method to set the context's fillStyle to a CssColor , specified in String form.
voidsetFont(String f)
Sets the font.
voidsetGlobalAlpha(double alpha)
Sets the global alpha value.
voidsetGlobalCompositeOperation(Composite composite)
Sets the global composite operation.
voidsetGlobalCompositeOperation(String globalCompositeOperation)
Sets the global composite operation.
voidsetLineCap(LineCap lineCap)
Sets the line-cap style.
voidsetLineCap(String lineCap)
Sets the line-cap style.
voidsetLineJoin(LineJoin lineJoin)
Sets the line-join style.
voidsetLineJoin(String lineJoin)
Sets the line-join style.
voidsetLineWidth(double lineWidth)
Sets the line-width.
voidsetMiterLimit(double miterLimit)
Sets the miter-limit.
voidsetShadowBlur(double shadowBlur)
Sets the shadow-blur.
voidsetShadowColor(String shadowColor)
Sets the shadow-color.
voidsetShadowOffsetY(double shadowOffsetY)
Sets the y-shadow-offset.
voidsetStrokeStyle(FillStrokeStyle strokeStyle)
Sets the context's stroke style.
voidsetStrokeStyle(String strokeStyleColor)
Convenience method to set the context's strokeStyle to a CssColor .
voidsetTextAlign(String align)
Sets the text alignment.
voidsetTextAlign(TextAlign align)
Sets the text alignment.
voidsetTextBaseline(String baseline)
Sets the text baseline.
voidsetTextBaseline(TextBaseline baseline)
Sets the text baseline.
voidstroke()
Draws the current path with the current stroke style.
voidstrokeRect(double x, double y, double w, double h)
Draws the outline of a rectangle with the current stroke style.
voidstrokeText(String text, double x, double y)
Draws the text outline.
voidtransform(double m11, double m12, double m21, double m22, double dx, double dy)
Multiplies the current transform by the given matrix.
voidtranslate(double x, double y)
Applies a translation to the current transform.