A thin caching wrapper around a 2D canvas rendering context.
This class is mostly a transparent wrapper around a canvas rendering context which improves performance when writing context state.
For best performance, avoid reading state from the gc. Writes are cached based on the previously written value.
gc
Unless otherwise specified, the API and semantics of this class are identical to the builtin 2D canvas rendering context: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
The wrapped canvas context should not be manipulated externally until the wrapping GraphicsContext object is disposed.
GraphicsContext
Create a new graphics context object.
The 2D canvas rendering context to wrap.
Generated using TypeDoc
A thin caching wrapper around a 2D canvas rendering context.
Notes
This class is mostly a transparent wrapper around a canvas rendering context which improves performance when writing context state.
For best performance, avoid reading state from the
gc
. Writes are cached based on the previously written value.Unless otherwise specified, the API and semantics of this class are identical to the builtin 2D canvas rendering context: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
The wrapped canvas context should not be manipulated externally until the wrapping
GraphicsContext
object is disposed.