Access the debug drawing api
Sets the opacity of the current Graphic being drawn, default is 1
Enable smoothed drawing (also known as anti-aliasing), by default false
Snaps all drawings to the nearest pixel truncated down, by default false
Sets the tint color to be multiplied by any images drawn, default is black 0xFFFFFFFF
Excalibur will automatically sort draw calls by z and priority for maximal draw performance, this can disrupt a specific desired painter order.
To force a specific draw call order, use ExcaliburGraphicsContext.z
By default useDrawSorting
is true
, to opt out set this to false
Set the current z context for the graphics context. Draw calls issued to the context will use this z to inform their sort order.
Note it is important to all ExcaliburGraphicsContext.save and ExcaliburGraphicsContext.restore when modifying state.
Add a post processor to the graphics context
Post processors are run in the order they were added.
Draw an image to the Excalibur Graphics context at an x and y coordinate using the images width and height
Draw an image to the Excalibur Graphics context at an x and y coordinate with a specific width and height
Draw an image to the Excalibur Graphics context specifying the source image coordinates (sx, sy, swidth, sheight) and to a specific destination on the context (dx, dy, dwidth, dheight)
Optional
swidth: numberOptional
sheight: numberOptional
dx: numberOptional
dy: numberOptional
dwidth: numberOptional
dheight: numberGets the current transform
Multiplies the current transform by a matrix
Remove a specific post processor from the graphics context
Update the context with the current viewport dimensions (used in resizing)
Set the background color of the graphics context, default is Color.ExcaliburBlue