Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Best way to call new API method Image#getImageData(int zoom) ?
Best way to call new API method Image#getImageData(int zoom) ? [message #1775368] Sat, 28 October 2017 12:56 Go to next message
Phil Beauvoir is currently offline Phil BeauvoirFriend
Messages: 32
Registered: October 2012
Member
I've been using the SWT Image method Image#getImageDataAtCurrentZoom() which is now deprecated in Eclipse Oxygen. It is replaced by Image#getImageData(int zoom)

What's the best way to get the current zoom level for the zoom argument? One way I found is:

image.getImageData(DPIUtil.getDeviceZoom());

However, DPIUtil.getDeviceZoom() is marked as internal and is not API. Is there a better way?

[Updated on: Mon, 27 November 2017 11:47]

Report message to a moderator

Re: Best way to call new API method Image#getImageData(int zoom) ? [message #1776089 is a reply to message #1775368] Fri, 10 November 2017 15:01 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 694
Registered: January 2012
Senior Member

My recollection is that you can provide an ImageDataProvider that is called into by SWT with the appropriate zoom required.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Adding lable to swt table header
Next Topic:Is it possible to make a dropdown SWT Menu scrollable?
Goto Forum:
  


Current Time: Sun Dec 17 13:50:01 GMT 2017

Powered by FUDForum. Page generated in 0.01918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software