Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Correct Implementation for HiDPI

Currently, we set the system property "swt.autoScale" to "false" before creating the Display on non-macOS systems. Unfortunately, on Linux the zoom level can't be detected any more and I have the feeling some controls like checkboxes are a little bit too small.

--
Best regards,
Thomas Singer
=============
syntevo GmbH
https://www.syntevo.com
https://www.syntevo.com/blog



On 2018-05-15 11:49, Tom Schindl wrote:
Yes the GC implementation simply multiplies the value it gets.

A problem with that approach although is that if you draw at the outline
of a canvas half of your line is drawn outside.

The only possibility to fix that is that you apply a transform because
everything is multiplied by eg 2.0 you can't offset the line 1px, this
leads to the problem that you can't stroke a rectangle but need to do
that line by line (top-line offset down, right line offet left, bottom
line offet top, left line offset right).

While HiDPI works very well on OS-X we have had major problems on Win32.

Tom

On 15.05.18 11:35, Sravan K Lakkimsetti wrote:
Hi,

SWT scales automatically on Windows and Linux. Application won't have
access to the screen coordinates. SWT does call a callback to the
application for a new image when required (SWT supplies scale factor
when it requests). If you use imageproviders(or imagedescriptor) you'll
get sharper images otherwise the images and drawing gets scaled
automatically will result in slightly blurred images.

Thanks and Regards,
Sravan

Sravan Kumar Lakkimsetti
IBM India Pvt Ltd,
Embassy Golf Links Business Park, D Block,
Off Indiranagar-Kormangla Inner Ring Road,
Bangalore - 560071, India
Phone: 91-80-41776858

-----Original Message-----
From: Thomas Singer [mailto:ts-swt@xxxxxxxxxxx]
Sent: Tuesday, May 15, 2018 2:28 PM
To: platform-swt-dev@xxxxxxxxxxx
Subject: Re: [platform-swt-dev] Correct Implementation for HiDPI

According to my understanding on macOS the zooming is handled
transparently - for the application it looks like it does not have to
perform any scaling itself, images are drawn scaled automatically by
macOS and all paint operations are scaled automatically, too, with an
unscaled coordinate-system. Is this right?

If using SWT as designed now, should SWT scale automatically, too, on
Windows and Linux. Or is the application able to (and has to) access the
full screen coordinates, thus painting each pixel even at 200% zoom?

--
Best regards,
Thomas Singer
=============
syntevo GmbH
https://www.syntevo.com
https://www.syntevo.com/blog


On 2018-05-03 16:50, Thomas Singer wrote:
Hi all,

For our application SmartGit (et al) we are using HiDPI support since
it first was supported in SWT by adding workarounds where necessary.
In the mean-time the SWT-API has changed significantly in this area
and I only adapted our SWT use to get it working. Though I have the
feeling we are not using it as designed according to the current API,
especially on Linux the HiDPI detection does not work reliable for us.

Is there a documentation how to implement image handling and paint
operations correctly on HiDPI screens (we are just supporting 100% and
200% zoom level)? Thanks in advance.

--
Best regards,
Thomas Singer
=============
syntevo GmbH
INVALID URI REMOVED
=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=BbJ1i82pNJnkXoEbqK7sZDkJsrJ7wkY_no7
y0H4rMzE&m=UPJdqJ9podCgvknQhS14jIiQIzf-KSSDLvoiF-boCaQ&s=Eutp3m4zZhWUZ
BClxYGREH9303GwuOl9E0Oe8pqQgRw&e=
INVALID URI REMOVED
log&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=BbJ1i82pNJnkXoEbqK7sZDkJsrJ7wk
Y_no7y0H4rMzE&m=UPJdqJ9podCgvknQhS14jIiQIzf-KSSDLvoiF-boCaQ&s=xHVxdDyO
7KbzO875Nk6J1tBzgA6w2k7MiAEy-U8d2xw&e=
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
INVALID URI REMOVED
ailman_listinfo_platform-2Dswt-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg
&r=BbJ1i82pNJnkXoEbqK7sZDkJsrJ7wkY_no7y0H4rMzE&m=UPJdqJ9podCgvknQhS14j
IiQIzf-KSSDLvoiF-boCaQ&s=8bsjKEygspK_VjtYt4h04K9QjvGzpdYUtv39sXUz2Rc&e
=

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev




_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top