Expand description
Blend modes and the per-pixel composite of a straight-alpha RGBA layer onto an opaque canvas.
Functionsยง
- blend_
channel - Blend one channel:
s= layer (source),d= canvas (destination), both 0..1. Returns 0..1. - composite_
rect - Composite
layer(straight-alpha RGBA, same size asdst) ontodst(opaque canvas) with the given blend mode and global opacity, restricted to the pixel rect [x0, x1) ร [y0, y1) (clamped to the canvas). Pixels with alpha 0 are skipped. - composite_
row - Composite one row of straight-alpha RGBA pixels (
src) onto one row of opaque canvas pixels (dst). Both slices are4 * nbytes;opacityis 0..1. Canvas alpha stays 255. - div255 ๐
- x / 255 rounded, for x <= 255*255.