You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/08/20 13:15:58 UTC

[Bug 120607] Rotated gradient is scaled, but should not

https://issues.apache.org/ooo/show_bug.cgi?id=120607

Armin Le Grand <Ar...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Armin.Le.Grand@me.com

--- Comment #1 from Armin Le Grand <Ar...@me.com> ---
ALG: I fear I have to tell you that it is not an error, it is just how the old
gradients were made/layouted. I do not know who initially did them, but when
you look at the code in VCL you can see that it is pretty 'hand-crafted' and
just there to show gradients at all. Look for OutputDevice::DrawGradient and
ImplDrawLinearGradient/ImplDrawComplexGradient to see what I'm talking about.
This is still there and used, except for edit views where I use primitives now.
I already fixed some bugs for the primitive visualisation e.g. the number of
steps for linear produce unequal numbers for that vcl methods. I spent a *lot*
of work to get that pixel-based, hand-crafted stuff to work with primitive
gradients, one of the hardest parts was that 'expansion' to the object bound
rect when the gradient is rotated.
No, the vcl gradients do not smoothly rotate with the objects, see the code I
pointed to above. The problem is always the same; it was there before UNO API
and ODF were done (and most definitions were just copied without thinking about
it). The point is that the visualisation of existing files is not allowed to
change. This was the argument before ODF and UNO API and is now, too.
Thus, the cx and cy were never designed (if it was designed at all) to
correspond to the object's size (even when it is rotated).
We can and will do it better with other gradients, but we should not change the
visualisation/definition of the old ones, how crude they may seem to be from
today's view. Don't forget that these were implemented when 640K were standard
(not an excuse, but an explanation that it's old).

-- 
You are receiving this mail because:
You are the assignee for the bug.