type
fields
alpha |
Global alpha value used to control opacity for rending. |
---|---|
color |
Convenience for setting paint to a solid color. |
font |
Current font used for drawing text |
paint |
Current paint defines how text and shapes are stroked and filled |
stroke |
Current stroke defines how the shapes are outlined |
methods
clipRect |
Convenience to clip the given the rectangle. |
---|---|
clipRoundRect |
Clip a rectangle with rounded corners with the current paint. |
dispose |
Dispose of this graphics context and release underyling OS resources. |
drawEllipse |
Draw an ellipse within the given bounds with the current stroke and paint. |
drawImage |
Draw an image at the given coordinate for the top/left corner. |
drawImageRegion |
Draw a rectangular region of the source image to the drawing surface. |
drawLine |
Draw a line with the current stroke and paint. |
drawRect |
Draw a rectangle with the current stroke and paint. |
drawRoundRect |
Draw a rectangle with rounded corners with the current stroke and paint. |
drawText |
Draw a the text string with the current paint and font. |
fillEllipse |
Fill an ellipse within the given bounds with the current stroke and paint. |
fillRect |
Fill a rectangle with the current paint. |
fillRoundRect |
Fill a rectangle with rounded corners with the current paint. |
metrics |
Get font metrics for the current font |
path |
Begin a new path operation to stroke, fill, or clip a shape. |
pop |
Pop the graphics stack and reset the state to the the last |
push |
Push the current graphics state onto an internal stack. |
transform |
Perform an affine transformation on the coordinate system |
translate |
Translate the coordinate system to the new origin. |
Slot Details
alpha
clipRect
clipRoundRect
color
Convenience for setting paint to a solid color. If the paint is currently not a solid color, then get returns Paint.asColorPaint
.
dispose
drawEllipse
drawImage
drawImageRegion
src
abstract This drawImageRegion(Image img, Rect src, Rect dst)
Draw a rectangular region of the source image to the drawing surface. The src rectangle defines the subregion of the source image to use. The dst rectangle identifies the destination location. If the src size does not correspond to the dst size, then the image is scaled to fit.
drawLine
drawRect
drawRoundRect
drawText
src
abstract This drawText(Str s, Float x, Float y)
Draw a the text string with the current paint and font. The x, y coordinate specifies the left baseline corner of where the text is to be drawn. Technically this is a fill operation similiar to the Canvas fillText function (there is currently no support to stroke/outline text).
fillEllipse
fillRect
fillRoundRect
font
metrics
src
abstract FontMetrics metrics()
Get font metrics for the current font
paint
path
src
abstract GraphicsPath path()
Begin a new path operation to stroke, fill, or clip a shape.