Skip to content

[Mac] GC#fillGradientRectangle don't color for y < 0 #1652

Open
@csa-smt

Description

@csa-smt

Describe the bug

When using GC#fillGradientRectangle with y < 0, color is not applied between y and 0.

By example, this causes a bug in the Eclipse Graphiti library, where you can create diagrams with elements with negative coordinates
https://gitlab.eclipse.org/eclipse/graphiti/graphiti

To Reproduce

In Eclipse SDK :

  1. Help -> Install New Software
  2. Select Graphiti Examples and install it
  3. File -> New -> Other... -> Graphiti Example Diagram
  4. Open the diagram created, and add EClass inside.
  5. Move the EClass higher and scroll so that its y is < 0

Expected behavior

GC#fillGradientRectangle should also color with a y < 0, which is the case on Windows and Linux

Screenshots

In the above screenshot,

  • the y of A is < 0 for its entire height
  • the y of B is < 0 at the beginning then is > 0
  • the y of C is > 0 for its entire height
    Screenshot

Environment:

    • All OS
    • Windows
    • Linux
    • macOS

Additional context

This bug was introduced by commit 4f5f2dc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions