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 » RGBA ctor
RGBA ctor [message #20463] Thu, 19 March 2009 20:52 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

I think it will be good to have uniform ctor for RGBA. This will unify constructing colours on different platforms:
//Color.h
//add to each platform` implementation:
struct RGBA : Moveable<RGBA> {
RGBA (byte R, byte G, byte B, byte A = 0xFF) :r(R),g(G),b(B),a(A) {}
...
Re: RGBA ctor [message #20468 is a reply to message #20463] Fri, 20 March 2009 08:44 Go to previous message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
It is sort of supposed to be constructed as:

RGBA c = alpha * Color(....);

or

RGBA c = Color(...);

Note that construction of RGBA really is not that simple because not all { r, g, b, a } combinations are valid - RGBA has to be in premultiplied format.

Mirek

[Updated on: Fri, 20 March 2009 08:45]

Report message to a moderator

Previous Topic: DrawOpWin32.cpp, line 96 q != ERROR
Next Topic: Drawing rectangles question
Goto Forum:
  


Current Time: Wed Nov 20 15:18:45 CET 2019

Total time taken to generate the page: 0.01546 seconds