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 183605 Details for
Bug 289968
Thumbnail-ThumbnailUpdater No of tiles calculation should be done according to the source figure size
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.
[patch]
Proposed patch based on my patch for 330856
Thumbnail.patch (text/plain), 1.73 KB, created by
Wayne
on 2010-11-22 16:14:38 EST
(
hide
)
Description:
Proposed patch based on my patch for 330856
Filename:
MIME Type:
Creator:
Wayne
Created:
2010-11-22 16:14:38 EST
Size:
1.73 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.draw2d >Index: src/org/eclipse/draw2d/parts/Thumbnail.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/parts/Thumbnail.java,v >retrieving revision 1.34 >diff -u -r1.34 Thumbnail.java >--- src/org/eclipse/draw2d/parts/Thumbnail.java 19 May 2010 20:28:20 -0000 1.34 >+++ src/org/eclipse/draw2d/parts/Thumbnail.java 22 Nov 2010 21:04:55 -0000 >@@ -42,7 +42,8 @@ > * several tiles and updating each tile individually. > */ > class ThumbnailUpdater implements Runnable { >- static final int MAX_BUFFER_SIZE = 256; >+ private static final int NUMBER_OF_TILES = 16; >+ int maxHBufferSize = 256, maxVBufferSize = 256; > private int currentHTile, currentVTile; > private int hTiles, vTiles; > private boolean isActive = true; >@@ -109,14 +110,18 @@ > * tile size and current tile index. > */ > public void resetTileValues() { >+ maxHBufferSize = Math.max(1, getSourceRectangle().width >+ / NUMBER_OF_TILES); >+ maxVBufferSize = Math.max(1, getSourceRectangle().width >+ / NUMBER_OF_TILES); >+ > hTiles = (int) Math.ceil((float) getSourceRectangle().width >- / (float) MAX_BUFFER_SIZE); >+ / (float) maxHBufferSize); > vTiles = (int) Math.ceil((float) getSourceRectangle().height >- / (float) MAX_BUFFER_SIZE); >+ / (float) maxVBufferSize); > >- tileSize = new Dimension( >- (int) Math.ceil((float) getSourceRectangle().width >- / (float) hTiles), >+ tileSize = new Dimension((int) Math >+ .ceil((float) getSourceRectangle().width / (float) hTiles), > (int) Math.ceil((float) getSourceRectangle().height > / (float) vTiles)); >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 289968
:
183605