In direct2d there is the base of all brushes ID2D1Brush
which has an opacity set with SetOpacity
and there is a solid color brush that uses floating point RGBA colors with alpha channel. There are other brushes but I didn't use them yet. If I set the opacity of the brush and used a color with alpha channel less than 1, how the resulting opacity will be determined? Will one of them override the other? Or the opacity will be the product of opacity value and alpha?
@IInspectable is correct (adding an answer to add photos).
From my complex brush editor:
Red picked with full opacity:
Red picked with 50% opacity (D2D1_COLOR_F 1,1,1,0.5f)
Opacity set per ID2D1Brush also set to 50%
So, they are multiplied. The idea is to have a global setting for brushes that contain many colors (linear, radial and bitmap). For a solid brush of course, there is not much meaning.