Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Transparent Background - Image control
Re: Transparent Background - Image control [message #42328 is a reply to message #42327] Fri, 07 March 2014 16:03 Go to previous messageGo to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Looks like DrawPainter is missing initialization of an image buffer.

I also stumbled on this kind of issue some time ago when using ImageBuffer and didn't initialize it : if there is no init of the whole buffer then alpha management does not work ==> and you get those black corners

Here is sample code showing the initialization of the ImageBuffer :
RGBA bckgColor;   bckgColor.r = 0; bckgColor.g = 0; bckgColor.b = 0; bckgColor.a = 0;
ImageBuffer ib(_plotRect.Size());
Upp::Fill( ib.Begin(), bckgColor, ib.GetLength() );
BufferPainter bp(ib, _drawMode);
PaintPlotData(bp, scale);
dw.DrawImage(0, 0, ib);


NB : using painter to draw images is useless (and slower), so if you don't draw anything else : do not use Painter

[Updated on: Fri, 07 March 2014 16:07]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Wy StyleNormal().Write() is global?
Next Topic: Flipped image in clipboard
Goto Forum:
  


Current Time: Mon Apr 29 09:18:42 CEST 2024

Total time taken to generate the page: 0.04128 seconds