Skip to content

fillGradientRectangle() needs to be refactored #319

@arunjose696

Description

@arunjose696

Description

While looking into the the method fillGradientRectangle() in org.eclipse.swt.graphics.ImageData appears to require refactoring.

Currently, this method:

  • Creates an ImageData instance with a fixed width and height.
  • Constructs an Image at 100% zoom scale.
  • Repeatedly scales it up/down using DPIUtil.autoScaleDown() in GC.drawImage() calls.

Expected Behavior
This method should be refactored for completenes to avoid Image constructors with ImageData (as a part of #199 )and the current impleementation is problematic as it scales images created at 100x zoom based on conditions. Since this method is part of the SWT common layer and used on all platforms (Windows, Linux, macOS), this would have to be tested on all platforms once the refactoring is complete

Metadata

Metadata

Assignees

No one assigned

    Labels

    HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

    Type

    No type

    Projects

    Status

    👀 In Review

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions