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 284710 Details for
Bug 568641
[GTK] IAE in GC.drawImage when switching screen DPI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Reproducing snippet
Bug568641_GC_drawImage_IAE.java (text/plain), 1.50 KB, created by
Alexandr Miloslavskiy
on 2020-11-09 08:08:05 EST
(
hide
)
Description:
Reproducing snippet
Filename:
MIME Type:
Creator:
Alexandr Miloslavskiy
Created:
2020-11-09 08:08:05 EST
Size:
1.50 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2020 Syntevo and others. > * > * This program and the accompanying materials > * are made available under the terms of the Eclipse Public License 2.0 > * which accompanies this distribution, and is available at > * https://www.eclipse.org/legal/epl-2.0/ > * > * SPDX-License-Identifier: EPL-2.0 > * > * Contributors: > * Syntevo - initial API and implementation > *******************************************************************************/ > >import org.eclipse.swt.custom.CLabel; >import org.eclipse.swt.graphics.*; >import org.eclipse.swt.layout.*; >import org.eclipse.swt.widgets.*; > >public class Bug568641_GC_drawImage_IAE { > public static void main(String[] args) { > final Display display = new Display(); > > final Shell shell = new Shell(display); > shell.setLayout(new GridLayout(1, true)); > > Label hint = new Label(shell, 0); > hint.setText( > "1) Go to your OS system settings and change Display DPI to 200%\n" + > "2) Start this snippet\n" + > "3) Change Display DPI to 100%\n" + > "4) Snippet will crash with IllegalArgumentException in GC.drawImage()" > ); > > Image image = new Image(display, 13, 13); > ImageDataProvider imageProvider = zoom -> image.getImageData(zoom); > > CLabel label = new CLabel(shell, 0); > label.setImage(new Image(display, imageProvider)); > > shell.pack(); > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > display.dispose(); > } >}
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 568641
:
284710
|
284877
|
284887
|
284888