Files
gio-patched/op/paint/doc.go
T
Egon Elbre 21ef492cc9 all: use color.NRGBA in public API
color.RGBA has two problems with regards to using it.

First the color values need to be premultiplied, whereas most APIs
have non-premultiplied values. This is mainly to preserve color components
with low alpha values.

Second there are two ways to premultiply with sRGB. One is to premultiply
after sRGB conversion, the other is before. This makes using the API more
confusing.

Using color.NRGBA in sRGB makes it align with CSS.e

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
2020-11-19 11:30:11 +01:00

15 lines
424 B
Go

// SPDX-License-Identifier: Unlicense OR MIT
/*
Package paint provides drawing operations for 2D graphics.
The PaintOp operation fills the current clip with the current brush,
taking the current transformation into account.
The current brush is set by either a ColorOp for a constant color, or
ImageOp for an image, or LinearGradientOp for gradients.
All color.NRGBA values are in the sRGB color space.
*/
package paint