Skip to content

Sharp rendering of SVGs passed as filename to Image constructor when drawing at arbitrary size #566

@HeikoKlare

Description

@HeikoKlare

On Windows, an image based on an SVG passed as filename to Image(Device, String) will be drawn sharply at arbitrary size when using the new GC#drawImage(image, x, y, width, height) method. On MacOS and Linux the image will be blurry scaled. This is caused by the the filename being wrapped into an ImageFileNameProvider on Windows, for which sharp rendering support is implemented, whereas on MacOS and Linux the image is initialized based on the filename and no ImageFileNameProvider is stored for the later rendering at other sizes.

It should be possible to streamline the behavior by simply making the Image(Device, String) constructor on MacOS and Linux delegate to the one accepting an ImageFileNameProvider as well.

See eclipse-platform/eclipse.platform.swt#2917

Metadata

Metadata

Assignees

Labels

HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions