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 » U++ Core » Color and RGBA
Re: Color and RGBA [message #35506 is a reply to message #35505] Fri, 24 February 2012 08:06 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Tom1 wrote on Thu, 23 February 2012 16:49

Hi,
I like double coordinates on Painter, but I would still like to preserve integers on Draw :

- Storing doubles takes twice as much memory.
- I have an impression (dating years back though) that computing with doubles is slower than with integers.
- GDI and X are mapped directly to integer


I like integers too, but the common resolution for different "Painters" is double. But having doubles is not something I going to insist on.
Quote:


How about offering Painter interface to Ctrls as an option to the
Draw version?:
void Paint(Painter &painter);


And which one should be chosen by CtrlPaint ? (if CtrlPaint would be a part of rainbow then it could make sense) IMO there should be only one Paint to keep things simple. Besides I prefer Draw as its much simpler to implement.

Quote:


Slightly off-topic: I have recently found that the 2D performance offered by Windows GDI can be attained by software rendering. (Maybe because on Windows Vista/7 GDI is more or less software rendering anyway.) So I have started to render with BufferPainter + SetSurface(). Also having Wayland on its way to Linux, I expect applications will end up rendering display buffers on their own without much support from specific hardware. It seems to me Upp::Painter interface is a nice and clean way to do what is inevitable in not so far future, so why not having a "void Paint(Painter &painter);"?


Mirek tried to replace GDI with software rendering some time ago but at that time WinXP was an os king and GDI was faster on many machines. But maybe it's a good time to look at it one more time. But as I said I'm not fun of Painter to be a common interface for every renderer (or maybe I need to take a closer look at it Smile.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: division by zero check
Next Topic: Problem with Sys() [SOLVED]
Goto Forum:
  


Current Time: Tue May 14 15:37:08 CEST 2024

Total time taken to generate the page: 0.01871 seconds