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 164812 Details for
Bug 309089
[GC] drawImage never respects z-index
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]
fix / workaround
DrawImageZIndex.txt (text/plain), 2.29 KB, created by
Tim Buschtoens
on 2010-04-14 05:52:51 EDT
(
hide
)
Description:
fix / workaround
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2010-04-14 05:52:51 EDT
Size:
2.29 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/org/eclipse/swt/graphics/GC.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/graphics/GC.js,v >retrieving revision 1.1 >diff -u -r1.1 GC.js >--- js/org/eclipse/swt/graphics/GC.js 7 Apr 2010 14:56:07 -0000 1.1 >+++ js/org/eclipse/swt/graphics/GC.js 14 Apr 2010 09:44:26 -0000 >@@ -310,12 +310,9 @@ > var context = this._context; > var alpha = this._context.globalAlpha; > var image = new Image(); >- image.onload = function() { >- // [if] As drawImage is delayed by the onload event, we have to draw >- // it with correct context parameters (alpha). >- // TODO [tb] : The z-order will be wrong in any case. >- context.save(); >- context.globalAlpha = alpha; >+ image.src = imageSrc; >+ // On (native) canvas, only loaded images can be drawn: >+ if( image.complete || qx.core.Variant.isSet( "qx.client", "mshtml" ) ) { > if( simple ) { > context.drawImage( image, destX, destY ); > } else { >@@ -328,10 +325,30 @@ > destY, > destWidth, > destHeight ); >- } >- context.restore(); >- }; >- image.src = imageSrc; >+ }; >+ } else { >+ image.onload = function() { >+ // TODO [tb] : The z-order will be wrong in this case. >+ // [if] As drawImage is delayed by the onload event, we have to draw >+ // it with correct context parameters (alpha). >+ context.save(); >+ context.globalAlpha = alpha; >+ if( simple ) { >+ context.drawImage( image, destX, destY ); >+ } else { >+ context.drawImage( image, >+ srcX, >+ srcY, >+ srcWidth, >+ srcHeight, >+ destX, >+ destY, >+ destWidth, >+ destHeight ); >+ } >+ context.restore(); >+ }; >+ } > }, > > _stroke : function( fill ) {
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 309089
: 164812