Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 263185 Details for
Bug 498062
[HiDPI] autoScale wrongly applies to Printer devices on Windows
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Reproduction
bug498062.java (text/plain), 1000 bytes, created by
Philippe Detournay
on 2016-07-19 09:50:33 EDT
(
hide
)
Description:
Reproduction
Filename:
MIME Type:
Creator:
Philippe Detournay
Created:
2016-07-19 09:50:33 EDT
Size:
1000 bytes
patch
obsolete
>import org.eclipse.swt.printing.Printer; >import org.eclipse.swt.widgets.Display; > >public class Bug498062 { > public static void main(String[] args) throws Exception { > System.setProperty("swt.autoScale","quarter"); > Printer printer=new Printer(Printer.getDefaultPrinterData()); > > System.out.println(printer.getDPI()); // Point {600, 600} > System.out.println(printer.getBounds()); // Rectangle {0, 0, 4961, 7016} > System.out.println(Math.round(25.4f*printer.getBounds().width/printer.getDPI().x)); // 210 > System.out.println(Math.round(25.4f*printer.getBounds().height/printer.getDPI().y)); // 297 > > Display.getDefault(); > > System.out.println(printer.getDPI()); // Point {600, 600} > System.out.println(printer.getBounds()); // Rectangle {0, 0, 3307, 4677} > System.out.println(Math.round(25.4f*printer.getBounds().width/printer.getDPI().x)); // 140 > System.out.println(Math.round(25.4f*printer.getBounds().height/printer.getDPI().y)); // 198 > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 498062
:
263185
|
263236