Draw and gradient opacity

Fridrich Strba fridrich.strba at graduateinstitute.ch
Thu Aug 2 12:51:38 PDT 2012


On 30/07/12 22:47, Christina Roßmanith wrote:
> I've created a rectangle in Draw (manually - no svg import this time),
> filled it with a linear gradient with a constant 50% opacity and saved
> the file as fodg. Then I saw that opacity is stored at two places in the
> file:
> 1. in the gradient definition (draw:start-intensity="50%"
> draw:end-intensity="50%")

No, this is not the opacity it is intensity of the colour which is how
big percentage of the colour is mixed with 100-percentage of black.

The opacity gradient is a draw:opacity _element_
that has draw:start and draw:end percentage. It is referred to from the
style with its draw:opacity-name like a normal colour gradient.

> 2. in the rectangle style (draw:opacity="50%")

This is the draw:opacity _attribute_ that characterizes a constant
opacity of the shape. According to the standard, the draw:opacity-name
overrides this attribute.

> 
> If I remove it in the rectangle style and re-open the fodg file the
> rectangle isn't filled transparently anymore, i.e. the opacity in the
> gradient definition is ignored. So my question is: Which code is
> responsible for reading fodg files (to check if start-intensity and
> end-intensity are processed at all) and which code does the painting?

Cheers

F.



More information about the LibreOffice mailing list