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
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.
Clears the screen with the current background color
Remove all post processors from the graphics context
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)
Flushes the batched draw calls to the screen
Gets the current transform
Multiplies the current transform by a matrix
Remove a specific post processor from the graphics context
Resets the current transform to the identity matrix
Restore the state of the canvas from the stack
Rotate the context about the current origin
Save the current state of the canvas to the stack (transforms and opacity)
Scale the context by an x and y factor
Translate the origin of the context by an x and y
Update the context with the current viewport dimensions (used in resizing)
Set the background color of the graphics context, default is Color.ExcaliburBlue