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 262126 Details for
Bug 495008
GC#getClipping returns an empty rectangle on the latest version of CentOS 6
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.
Test case for GC#getClipping bug
GetClippingBug.java (text/x-java), 1.17 KB, created by
Peter Severin
on 2016-05-31 07:52:12 EDT
(
hide
)
Description:
Test case for GC#getClipping bug
Filename:
MIME Type:
Creator:
Peter Severin
Created:
2016-05-31 07:52:12 EDT
Size:
1.17 KB
patch
obsolete
>package org.eclipse.swt.snippets; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.graphics.GC; >import org.eclipse.swt.graphics.Image; >import org.eclipse.swt.graphics.ImageData; >import org.eclipse.swt.graphics.PaletteData; >import org.eclipse.swt.graphics.Rectangle; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class GetClippingBug { > public static void main(String[] args) { > final Display display = new Display(); > > final PaletteData palette = new PaletteData(0x00FF0000, 0x0000FF00, 0x000000FF); > int width = 100, height = 100; > ImageData imageData = new ImageData(width, height, 32, palette); > Image image = new Image(display, imageData); > > GC gc = new GC(image); > Rectangle clip = gc.getClipping(); > gc.setClipping(clip); > gc.setBackground(display.getSystemColor(SWT.COLOR_RED)); > gc.fillRectangle(0, 0, width, height); > gc.dispose(); > > Shell shell = new Shell(display); > shell.addPaintListener(e -> { > GC gc1 = e.gc; > gc1.drawImage(image, 0, 0); > }); > > shell.setSize(350, 550); > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > image.dispose(); > 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 495008
: 262126