Skip to content

Commit

Permalink
Multi zoom level support of GC for win32
Browse files Browse the repository at this point in the history
This commit contributes to multi zoom level support of GC which can be extended by other resources and widgets.

Contributes to
#62 and #131
  • Loading branch information
amartya4256 committed May 22, 2024
1 parent b3fcc17 commit 7722383
Show file tree
Hide file tree
Showing 27 changed files with 472 additions and 332 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ private void drag(Event dragEvent) {
hwndDrag = 0;
topControl = null;
if (image != null) {
imagelist = new ImageList(SWT.NONE);
imagelist = new ImageList(SWT.NONE, DPIUtil.getZoomForAutoscaleProperty(nativeZoom));
imagelist.add(image);
topControl = control.getShell();
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.win32.*;

/**
Expand Down Expand Up @@ -300,7 +301,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
} else {
ImageData mask = source.getTransparencyMask();
long [] result = Image.init(this.device, null, source, mask);
long [] result = Image.init(this.device, null, source, mask, DPIUtil.getDeviceZoom());
hBitmap = result[0];
hMask = result[1];
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public final class GCData {
public float[] lineDashes;
public float lineMiterLimit = 10;
public int alpha = 0xFF;
public int nativeDeviceZoom;

public Image image;
public PAINTSTRUCT ps;
Expand Down
Loading

0 comments on commit 7722383

Please sign in to comment.