cpp-io2d / io2dts

The P0267 proposal drafts
21 stars 1 forks source link

Constant opacity #158

Open carewolf opened 6 years ago

carewolf commented 6 years ago

A feature missing that most 2D renders have is painting with a constant opacity.

In the simplest API it is an additional global state setOpacity, which is multiplied on any sources painted before compositioned. A more flexible API would have the ability to make a new sub-surface and set an opacity on that surface, that make more compositions possible, and makes it possible to buffer sets of paint instructions and repaint them later perfectly. The latter for instance is not possible in QPainter and Skia because they only have global opacity state.