|
||
|
|||||||
| Ultima SDK Support for the Ultima SDK. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) | |
|
Forum Expert
Join Date: Mar 2005
Location: Firmly Seated Infront of the Computer.
Age: 25
Posts: 429
|
Im trying to get the hue's to display in a selectable chart in Vb.net, but not having much luck at the moment, anyone able to point me into the right direction? (i have not done that much work with array's before - which is what im assuming you would use)
__________________
![]() Quote:
|
|
|
|
|
|
|
#2 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,762
|
I know this isnt VB but for my GDK program I had to draw hue chart stuff and made this method.
Code:
public static Color Convert555ToARGB(short hue)
{
int red = (((short)(hue >> 10)) & 0x1f) * 8;
int green = (((short)(hue >> 5)) & 0x1f) * 8;
int blue = (hue & 0x1f) * 8;
return Color.FromArgb(red, green, blue);
}
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
|
Quote:
Code:
Public Shared Function GetColorFromHue(ByVal hue As Short) As Color
Return Color.FromArgb(((hue And &H7C00) >> 7), ((hue And &H3E0) >> 2), ((hue And &H1F) << 3))
End Function
__________________
|
|
|
|
|
|
|
#4 (permalink) | |
|
Forum Expert
Join Date: Mar 2005
Location: Firmly Seated Infront of the Computer.
Age: 25
Posts: 429
|
Thankyou arul! - and jeff
![]() I dont think i would have figured that one out :P EDIT: Thats used for a vectorial graphic draw right? im reading up on those now, definatly have not coded these before :s Edit 2: Thankyou i have gotten it to work, sortof haha.
__________________
![]() Quote:
Last edited by Marak; 11-12-2007 at 03:14 PM. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|