 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Acegikmo
Joined: 19 Jul 2008 Posts: 15
|
Posted: Thu Jul 24, 2008 4:36 pm Post subject: How do you write the color in drawLineScreen()? |
|
|
Yeah, I don't know what way to write the color.
drawLineScreen(ax, ay, bx, by, ??? );
So, for example, how do I draw a white line that's not transparent with this? |
|
| Back to top |
|
 |
Smong
Joined: 04 Sep 2007 Posts: 82
|
Posted: Fri Jul 25, 2008 1:25 am Post subject: |
|
|
I looked at graphics.h from luaplayer source and color is just an int like this: 0xAABBGGRR. There seem to be some macros available too, they work like this:
| Code: | Color color;
color = A(0x00) | B(0xFF) | G(0xFF) | R(0xFF);
drawLineScreen(x1, y1, x2, y2, color);
// or just
drawLineScreen(x1, y1, x2, y2, 0x00FFFFFF); |
That will get you white, but I don't know if the alpha is meant to be 0x00 or 0xFF for opaque. _________________ (+[__]%) |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Fri Jul 25, 2008 1:52 am Post subject: |
|
|
apha should be FF for opaque. _________________ Ciao! from Italy |
|
| Back to top |
|
 |
Acegikmo
Joined: 19 Jul 2008 Posts: 15
|
Posted: Fri Jul 25, 2008 5:07 am Post subject: |
|
|
| Thanks, I'll try that |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|