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 » Paint problems when using transparency
Paint problems when using transparency [message #41462] Thu, 19 December 2013 23:57 Go to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi all,

I have a problem that is driving me nuts Dead Dead

I am trying to make my GraphCtrl package as fast as possible and to do so I am trying to take advantage of the fast drawing of images when directly draw with native Draw instance passed to Ctrls.

The speed difference is very high (80 times faster) and everything works fine until:
  • transparency comes in
  • SUBPIXEL is used


So I made a test case hoping that someone could help me.
The test case basically does the following for each Ctrl
  • create a BufferPainter
  • fill the buffer painter with transparent background (in case you want to see behind the Ctrl)
  • Paint a white rectagle on upper half of the Ctrl
  • Paint an image containg green circle : half opaque, and half transparent (partially transparent)
  • draw a red line accross the Ctrl
  • draw the resulting image on the Ctrl area

There are 4 different flavors (testCtrl_1,2,3,4) and 4 different Painter modes used (antialiased, ...)
The defaults encountered are the following:
  • Transparent green becomes violet when overlapping the white rectangle
  • red line is not drawn properly when overlapping transparent area AND in SUBPIXEL mode


I know that a Premultiply() will probably correct the violet issue, but I can't find where to put it.
For the other problem ... I have no Idea what is going wrong

The result is in the following image
index.php?t=getfile&id=4376&private=0

The code of the test case is joined

Hopping to get some help
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BufferPainter::Fill(Image,...) optimization question
Next Topic: What is the U++ way to replace a missing font glyph?
Goto Forum:
  


Current Time: Thu Apr 25 02:11:12 CEST 2024

Total time taken to generate the page: 1.00810 seconds