Re: Offset uniqueness in vector of ColorSteps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am currently working on how to specify gradient stops in the ODF standard. My first draft simply uses the "color" type included in ODF. This is an RGB color without alpha. I could imagine to introduce additionally a keyword for a color type. You could then group type and color definition and offer different such groups for choice, see below. Is something similar possible for UNO?

<rng:define name="draw-gradient-color">
  <rng:element name="draw:gradient-color">
    <rng:choice>
      <rng:group>
        <rng:attribute name="draw:color-type">
          <rng:value>color</rng:value>
        </rng:attribute>
        <rng:attribute name="draw:stop-color">
            <rng:ref name="color" />
        <rng:empty/>
      </rng:group>
      <rng:group>
        <rng:attribute name="draw:color-type">
          <rng:value>theme</rng:value>
        </rng:attribute>
        <rng:ref name="loext-fill-color-theme-reference" />
      </rng:group>
    </rng:choice>
  </rng:element>
</rng:define>

Kind regards,
Regina

Tomaž Vajngerl schrieb am 22.03.2023 um 09:08:
Hi Armin and Regina,

On Wed, Mar 15, 2023 at 7:08 AM Regina Henschel <rb.henschel@xxxxxxxxxxx <mailto:rb.henschel@xxxxxxxxxxx>> wrote:

    Hi Armin,

    A further remark: We have in the meantime "Theme Colors". LO7.6 does
    not
    yet save theme colors to <draw:gradient>. But you can already have a
    solid fill with a theme color combined with a transparency gradient. Do
    you have already ideas about "Theme Colors" in gradients? Such is
    needed
    for roundtrip with OOXML.


Yes, a gradient stop would need to have a theme color associated. Currently in UNO I am adding a new property that has a css::util::XThemeColor for every color property that I want to be theme-able, but the colors in OOXML are much more powerful - where a color can be RGB, HSL, a scheme color, which each can also have a list of color transformations (used to specify alpha transparency for a color among other things). If we want better fidelity with OOXML, we probably need to add a more powerful color UNO API than just a simple RGB color definition (clearly missing at least alpha).

Looking at the com::sun::star::awt::ColorStop I would prefer it to be more easily extendable - probably best to be an XInterface or something. I will quite soon have to add at least a XThemeColor element to the ColorStop, so I can add theme colors support for the gradients. Another missing thing is alpha support, which is missing but supported in OOXML and MSO office supports setting that on the UI.

Thoughts?

    Kind regards,
    Regina


Tomaž




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux