Subtractively blends a new pixel with an existing color value in a canvas.
As this method is often called many times in render loops, only bounds
checking is applied to the given coordinates.
The coordinates are expected to already be integers. Supplying numbers with fractions
has performance implications. Ensure you're working with integers, or truncate the
coordinates before passing them in.
The alpha value is expected to be an integer in the range from 0 to 255.
0 meaning fully transparent, 255 meaning fully opaque.
Subtractively blends a new pixel with an existing color value in a canvas.
As this method is often called many times in render loops, only bounds checking is applied to the given coordinates.
The coordinates are expected to already be integers. Supplying numbers with fractions has performance implications. Ensure you're working with integers, or truncate the coordinates before passing them in.
The
alpha
value is expected to be an integer in the range from0
to255
.0
meaning fully transparent,255
meaning fully opaque.