Bug 442442 - Deprecate ScaledGraphics, make native scaling the default
Summary: Deprecate ScaledGraphics, make native scaling the default
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 470334 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-24 10:48 EDT by Alexander Nyßen CLA
Modified: 2022-06-15 10:25 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nyßen CLA 2014-08-24 10:48:56 EDT
According to SWT FAQ, Advanced Graphics is supported by SWT in the following cases:
- SWT for Windows uses GDI+ for advanced graphics, which is installed on Windows XP and newer. Windows 2000 users can download and install a Microsoft package containing GDI+.
- SWT for GTK+ and Motif use Cairo for advanced graphics, which is installed on systems with GTK+ 2.8 or newer (for example RHEL 5).
- SWT for OS X uses Quartz for advanced graphics, which is installed on all supported OS X versions.

It seems this holds for all Luna supported platforms (http://www.eclipse.org/projects/project-plan.php?planurl=eclipse/development/plans/eclipse_project_plan_4_4.xml#target_environments).

As such, there does not seem to be need for an explicit ScaledGraphics anymore, as SWTGraphics could instead be used. We should thus deprecate ScaledGraphics and replace its usages with direct scaling of the underlying SWTGraphics.
Comment 1 Denis Roy CLA 2014-08-25 07:31:31 EDT
*** Bug 442443 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Nyßen CLA 2015-06-17 16:14:57 EDT
*** Bug 470334 has been marked as a duplicate of this bug. ***
Comment 3 Alois Zoitl CLA 2021-04-21 02:51:31 EDT
After searching for a long time we found that that problem was causing quite an issue in our GEF Legacy application. The fix from Bug #470334 works like a charm. 

As I've seen other projects duplicating that fix: What can I do to get this into the official GEF code base?
Comment 4 Phil Beauvoir CLA 2022-06-15 07:53:07 EDT
We stopped using ScaledGraphics in our RCP app, Archi.

However, there is a side-effect of using zoom levels other than 100% if a font uses styling with underline or strikeout, where the font is not displayed.

See https://github.com/archimatetool/archi/issues/851

This is just a heads up, not a request to fix the issue.
Comment 5 Alois Zoitl CLA 2022-06-15 10:21:49 EDT
In Eclipse 4diac we did the same (inspired by what you did in Archi). We see less issues then what you have. But I'm not sure why. Especially under Linux GEF Classic editors look now much better.  

You know that we are revamping GEF Classic. If you have things that should be fixed in the GEF Classic classes I would be happy to have your pull-requests in the new GEF Classic git hub repo: https://github.com/eclipse/gef-classic/
Comment 6 Phil Beauvoir CLA 2022-06-15 10:25:48 EDT
(In reply to Alois Zoitl from comment #5)
> In Eclipse 4diac we did the same (inspired by what you did in Archi). We see
> less issues then what you have. But I'm not sure why. Especially under Linux
> GEF Classic editors look now much better.  
> 
> You know that we are revamping GEF Classic. If you have things that should
> be fixed in the GEF Classic classes I would be happy to have your
> pull-requests in the new GEF Classic git hub repo:
> https://github.com/eclipse/gef-classic/

Hi Alois, thanks for the heads up. I'm already trying to contribute to GEF Classic:

https://github.com/eclipse/gef-classic/pull/38