Commit Graph

6 Commits

Author SHA1 Message Date
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
Elias Naur 23fa3480c6 op/paint: update documentation to match the removal of PaintOp.Rect
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-11-16 12:54:58 +01:00
Elias Naur 8b5c0d8b0c op/paint: document that color.RGBA values are in the sRGB color space
Updates gio#169

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-11-08 19:31:38 +01:00
Elias Naur b7ba809517 op/paint: rename material to brush
The "material" name clashes with the theme of the same name.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-05-14 13:19:15 +02:00
Elias Naur e864ac3fc3 op/clip: split clip operations into its own package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 19:07:00 +01:00
Elias Naur beaec661d2 op/paint: move paint package below the op package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00