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/17 11:47:20 UTC

[Bug 120604] New: curious colors in gradients, when using small step-count

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

          Priority: P3
            Bug ID: 120604
          Assignee: ooo-issues@incubator.apache.org
           Summary: curious colors in gradients, when using small
                    step-count
          Severity: normal
        Issue Type: DEFECT
    Classification: Application
                OS: Windows XP
          Reporter: rb.henschel@t-online.de
          Hardware: All
            Status: UNCONFIRMED
           Version: AOO350-dev
         Component: viewing
           Product: drawing

Created attachment 78992
  --> https://issues.apache.org/ooo/attachment.cgi?id=78992&action=edit
Testcases for axial gradient

Open attached document. It shows some test cases.

I expect, that an axial gradient is a mirrored linear gradient. So a linear
filling of 10cm height should be the same as the half of an axial gradient in
20cm height. This works well with a step count of 256 (max possible value in
UI). But when you set the step count to 5, you see these errors:
- The number of steps in the axial fill is not 2*5=10 but 8
- The inner color does not come near enough to the center color.

Compared to a square filling all is good in maximal step count 256. Setting the
step count to 5 you can see these errors (or at least inconsistencies)
- The colors of the linear gradient have a different scale than the colors in
the square gradient. The square gradient reaches the end color, the linear
gradient does not reach it.
- The colors of the axial gradient reach neither the start not the end color.
- The colors of an axial gradient are reversed in comparison to a square
gradient. A square gradient has the end color in center, but the axial gradient
has the start color in center. 

Show the axial gradient in presentation mode or print it (I have used image
writer), then the gradient is totally wrong. (This is an old error, but I have
not fount an issue, that tracks it already.)

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #3 from Regina Henschel <rb...@t-online.de> ---
Created attachment 79324
  --> https://issues.apache.org/ooo/attachment.cgi?id=79324&action=edit
History of axial filling

The attached picture collects screenshots of several versions. From SO 5.2 to
OOo2.4.3 (at least) the axial gradient uses the color step count n as given in
the UI. OOo3.2.1 uses 2n-1 steps and AOO3.4.1 uses 2n-2 steps. The ODF does
specify how many steps to use in axial gradients.

The colors in OOo3.2.1 and AOO3.4.1 are different.

The axial gradient has still the old step count, when the shape is in
presentation mode in Impress or when it is converted or exported to bitmap or
when it is exported to pdf or flash.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #4 from Regina Henschel <rb...@t-online.de> ---
Created attachment 79492
  --> https://issues.apache.org/ooo/attachment.cgi?id=79492&action=edit
Calculate colors using a macro

I have written issue 120604 for the export error of gradient style axial.

So this issue can track the errors in edit mode. Those are:
Gradient style linear does not use the end color.
Gradient style axial does not use the start color, does not use the end color,
and has a wrong number of steps.

This defects can be best seen when using step counts smaller than 10.
The gradient style square shows the correct colors and can be used for
comparison.

I think, the issue can be used for both errors, because the same file is
effected.

The attachment contains a spreadsheet with macro. The macro takes the
RGB-values left from the selected cell and fills the selected cell with that
color. You can use it to examine color calculations.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |AOO 4.0

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #12 from Armin Le Grand <Ar...@me.com> ---
ALG: Needed to adapt coordinate back mappers (3D gradients) a little bit. There
was the wrong color when using axial and a border, and the bottom/right of
rectangles with gradient mapping were suspect. Also adapted and made basegfx
smarter in some parts. Committed with revision 1394141.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ACCEPTED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Armin Le Grand <Ar...@me.com> ---
ALG: Okay, committed adaptions for coordinate back mappers for texture
transformations. Should be done.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

Regina Henschel <rb...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79636|                            |review?(rb.henschel@t-onlin
              Flags|                            |e.de)

--- Comment #6 from Regina Henschel <rb...@t-online.de> ---
Created attachment 79636
  --> https://issues.apache.org/ooo/attachment.cgi?id=79636&action=edit
suggestions for texture (2D) and gradienttools (3D)

In gradienttools.hxx there is currently a case
 "if(nSteps > 2L && nSteps < 128L)"
Why "> 2L"?

Is there something else needed for linear and axial gradients?

The other gradient styles have a little bit false colors too. The step to the
end color is too large. But before I will adapt them too, I need to know
whether you agree with the colors in linear and axial gradient, and if yes,
whether square/rectangular and circle/ellipsoid should be adapted to the new
blending of linear/axial.

Tip for testing: Using "Chart 12" and "Yellow" gives steps, which can be
clearly distinguished.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ACCEPTED
     Ever confirmed|0                           |1

--- Comment #7 from Armin Le Grand <Ar...@me.com> ---
ALG: Took the time to completely redefine this one, esp. under the aspect to
make things safer. There are no longer two vectors, one for transformation and
one for colors, where size of colors should be size of transformation + 1 (for
start color); changed to use an explicit struct combining both and creating
both in one loop; start color is isolated and used extra. Made some more
adjustments for safety and runtime. Doing some more tests (AA, non-AA,
XOr-Paint (old non-AA modes)), ...

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

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

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

--- Comment #2 from Armin Le Grand <Ar...@me.com> ---
ALG: Adding myself to CC.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #9 from Armin Le Grand <Ar...@me.com> ---
ALG: I decided to change all to use a unit geometry (rectangle and circle
currently only) all being defined from (-1,-1,1,1), thus it is now unified and
the meaning is no lnger dependent of the gradient type (which only brings
dangers).

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #8 from Regina Henschel <rb...@t-online.de> ---
Fine :)
I need some time to find the comment in fillgradientprimitive2d.cxx, which
tells me, why it does not work (=crash) to simple increase the number of
transformations.
BTW, the fact that aUnitPolygon for axial gradient is starting in -1,-1 is
unexpected too, though it is a nice trick to get the mirroring with fabs(y).
Perhaps you can add a comment?

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

Regina Henschel <rb...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |120957

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #10 from Armin Le Grand <Ar...@me.com> ---
ALG: COmmited those basic changes. Need to check for 3D now (still looking
wrong)...

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #1 from Regina Henschel <rb...@t-online.de> ---
I suggest to make the steps consistent over all gradient styles. If the
interval [0;1] has the end color on scale position 1 and the start color on
scale position 0 and ]a;b] in one of the subintervals, then draw this interval
in the color of scale position b, the upper border of the interval. Reasoning:
Users can always force to see the start color (scale position 0) in there
drawing by setting an appropriate border. That is not possible for the end
color.

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

[Bug 120604] curious colors in gradients, when using small step-count

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120604

--- Comment #5 from Regina Henschel <rb...@t-online.de> ---
I've started working on this issue.

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