Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Should RGBA have got 4 arguments constructor?
Re: Should RGBA have got 4 arguments constructor? [message #43410 is a reply to message #43397] |
Fri, 25 July 2014 20:26   |
 |
Klugier
Messages: 1100 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Mirek,
Quote:
OK, but premultiplied alpha issue is still there... Should we add ASSERT
RGBA(byte r, byte g, byte b, byte a) {
ASSERT(r <= a && g <= a && b <= a);
this->r = r;
this->g = g;
this->b = b;
this->a = a;
}
or perform conversion?
I don't know anything about "premultiplied alpha issue", but personally I think that implicit conversion would be safer for U++ users.
Moreover, I would like to noticed that it will be fine if we will have unit tests for RGBA. Each time the test failed we will know that something isn't ok in RGBA.
Sincerely,
Klugier
U++ - one framework to rule them all.
|
|
|
 |
 |
Should RGBA have got 4 arguments constructor?
By: Klugier on Sat, 03 May 2014 20:59
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: unodgs on Sat, 03 May 2014 21:44
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: mirek on Thu, 29 May 2014 11:18
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: mirek on Thu, 29 May 2014 11:32
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: Klugier on Thu, 24 July 2014 22:32
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: mirek on Fri, 25 July 2014 07:46
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: Klugier on Fri, 25 July 2014 20:26
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: mirek on Mon, 04 August 2014 14:21
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: Klugier on Tue, 05 August 2014 21:25
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: mirek on Wed, 06 August 2014 17:56
|
 |
|
Re: Should RGBA have got 4 arguments constructor?
By: Klugier on Sat, 09 August 2014 19:35
|
Goto Forum:
Current Time: Mon Jul 07 03:50:45 CEST 2025
Total time taken to generate the page: 0.03601 seconds
|