Transparencies ignored on GTPU-2
Hello,
I have recently started to test my application on the new Flexpendant, and I have realized that some .gif's with a transparent background, which were displayed correctly in the former version of the Flexpendant, appear opaque when the application is executed on the new hardware.
The little 16x16 icon displayed on the button in the taskbar, for instance, appears now in a white square!!
I could use some help on that subject...
Thanks!
Comments
-
The Gif transparancy property has never been supported by WinCE and the Compact Framework. In earlier versions it looked like it was functioning although all non correct colors was replaced with white. Since the FlexPendant interface is very much white it seemed to be OK. But in the Compact Framework 2.0 this has changed. Instead you must use the setcolorkey property of the image, see below.
(The flexpendant team learnt this during the migration themselves and all images had to be updated to Magenta.)private System.Drawing.Imaging.ImageAttributes _imageAttribute;
_imageAttribute = new System.Drawing.Imaging.ImageAttributes();
_imageAttribute.SetColorKey(Color.Magenta, Color.Magenta);
e.Graphics.DrawImage(img,rect,0,0,img.Width, img.Height, GraphicsUnit.Pixel, _imageAttribute);Example of such an image from the FlexPendant:
John
Developer Center0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings