Protected
_ctxReadonly
idGets or sets the opacity of the graphic, 0 is transparent, 1 is solid (opaque).
Gets or sets wether to show debug information about the graphic
Gets whether the graphic is dirty, this means there are changes that haven't been re-rasterized
Gets or sets the flipHorizontal, which will flip the graphic horizontally (across the y axis)
Gets or sets the flipVertical, which will flip the graphic vertically (across the x axis)
Gets or sets the current height of the Raster graphic. Setting the height will cause the raster to be flagged dirty causing a re-raster on the next draw.
Any padding
or quality
set will be factored into the height
Gets or sets the line width of the Raster graphic. Setting the lineWidth will cause the raster to be flagged dirty causing a re-raster on the next draw.
Returns the local bounds of the Raster including the padding
Gets or sets the rotation of the graphic
Gets or sets the smoothing (anti-aliasing of the graphic). Setting the height will cause the raster to be flagged dirty causing a re-raster on the next draw.
Gets or sets the current width of the Raster graphic. Setting the width will cause the raster to be flagged dirty causing a re-raster on the next draw.
Any padding
s or quality
set will be factored into the width
Protected
_applyProtected
_drawMeant to be overridden by the graphic implementation to draw the underlying image (HTMLCanvasElement or HTMLImageElement) to the graphics context without transform. Transformations like position, rotation, and scale are handled by Graphic._preDraw and Graphic._postDraw
The excalibur graphics context
Protected
_flipProtected
_postApply any additional work after Graphic._drawImage and restore the context state.
Protected
_preApply affine transformations to the graphics context to manipulate the graphic before Graphic._drawImage
Protected
_rotateDraw the whole graphic to the context including transform
The excalibur graphics context
Executes drawing implementation of the graphic, this is where the specific drawing code for the graphic
should be implemented. Once rasterize()
the graphic can be drawn to the ExcaliburGraphicsContext via draw(...)
Canvas to draw the graphic to
Rasterize the graphic to a bitmap making it usable as in excalibur. Rasterize is called automatically if the graphic is Raster.dirty on the next Graphic.draw call
A Rectangle Graphic for drawing rectangles to the ExcaliburGraphicsContext