RenderContext2D
Helper class using BatchBuilder2D that keeps a chain of affine transforms MMatrix, ColorTransform and blendMode and allows to draw images and scissors with that transform.
keepMatrix, keepBlendMode, keepColor and keep block methods allow to do transformations inside its blocks while restoring its initial state at the end of the block.
setMatrix, translate, scale, and rotate allows to control the transform matrix.
rect and imageScale allows to render color quads and images.
blendFactors property allow to specify the blending mode to be used. multiplyColor will set the multiplicative color to be usd when drawing rects and images.
scissor methods allow to specify a scissor rectangle limiting the area where the pixels will be renderer.
Properties
Functions
Renders a texture with the blendMode at x, y scaling it by scale. The texture colors will be multiplied by multiplyColor. Since it is multiplicative, white won't cause any effect.
Executes callback restoring the initial blendFactors at the end
Renders a colored rectangle with the multiplyColor with the blendMode at x, y of size widthxheight