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 » Painter bug?
Re: Painter bug? [message #31551 is a reply to message #31548] Sun, 13 March 2011 11:55 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Mindtraveller wrote on Sat, 12 March 2011 23:14

Thank you for the replies. The problem is clear now.
Currently I see the only solution, and I'm not really shure you want it. Smile
Anyway. We could use temporary surface which stores color + alpha for a sequence of operations. On writing a pixel, it's color is calculated in usual way, but alpha is added to the current alpha value. E.g. we will have alpha = 256 in previous Mirek's example. Rendering this temporary surface to actual image will give solid black color which is absolutely right result.
This could look like this:
painter
    .BeginComplex()
    ./*draw polygon 1*/
    ./*fill polygon 1*/
    ./*draw polygon 2*/
    ./*fill polygon 2*/
    ./*draw polygon 3*/
    ./*fill polygon 3*/
    .EndComplex()
;




Pavel, What about just round your values and draw with integers coordinates for do not use sub-pixel?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How does CtrlCore Image::Data::PaintImp work?
Next Topic: Loading 16 bits per channel Tiff files
Goto Forum:
  


Current Time: Wed May 22 05:35:16 CEST 2024

Total time taken to generate the page: 0.01490 seconds