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 |
|
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 .
|
|
|
|
|
Color and RGBA
By: unodgs on Wed, 22 February 2012 12:24
|
|
|
Re: Color and RGBA
By: mirek on Thu, 23 February 2012 20:52
|
|
|
Re: Color and RGBA
By: unodgs on Thu, 23 February 2012 22:40
|
|
|
Re: Color and RGBA
By: Tom1 on Thu, 23 February 2012 22:49
|
|
|
Re: Color and RGBA
By: unodgs on Fri, 24 February 2012 08:06
|
|
|
Re: Color and RGBA
By: Tom1 on Fri, 24 February 2012 13:32
|
|
|
Re: Color and RGBA
By: mirek on Fri, 24 February 2012 14:03
|
|
|
Re: Color and RGBA
By: mirek on Fri, 24 February 2012 14:05
|
|
|
Re: Color and RGBA
By: Tom1 on Fri, 24 February 2012 14:57
|
|
|
Re: Color and RGBA
By: mirek on Fri, 24 February 2012 15:40
|
|
|
Re: Color and RGBA
By: mirek on Sun, 04 March 2012 00:29
|
Goto Forum:
Current Time: Tue May 14 15:37:08 CEST 2024
Total time taken to generate the page: 0.01871 seconds
|