I'm trying to get a color value and adjust it by xx% (darken or lighten
the color)
Is there any build in classes for this like:
Color NewColor = AdjustColor(Color.Red, -10%);
OR better, Is there a FillRectangle function that looks like a sylinder
with lighting effect but without the rounded top and bottom
Vitaly Zayko - 20 Dec 2005 08:26 GMT
Try to use DirectX or OpenGL instead.
> I'm trying to get a color value and adjust it by xx% (darken or lighten
> the color)
> Is there any build in classes for this like:
> Color NewColor = AdjustColor(Color.Red, -10%);
> OR better, Is there a FillRectangle function that looks like a sylinder
> with lighting effect but without the rounded top and bottom

Signature
Vit Zayko
GTi - 20 Dec 2005 08:29 GMT
Tx Vit,
However I'n not familar with OpenGL.
Do you have any samples available using it?
I don't want to use DirectX - (IHI)
Best regards
GTi
Vitaly Zayko - 20 Dec 2005 08:50 GMT
Sorry, I'm not an OpenGL expert either. But this is what I found:
http://www.codeproject.com/csharp/csopengl.asp
http://csgl.sourceforge.net/
Hope this help.
> Tx Vit,
> However I'n not familar with OpenGL.
[quoted text clipped - 3 lines]
> Best regards
> GTi

Signature
Vit Zayko
GTi - 20 Dec 2005 09:45 GMT
> Sorry, I'm not an OpenGL expert either. But this is what I found:
> http://www.codeproject.com/csharp/csopengl.asp
[quoted text clipped - 11 lines]
> --
> Vit Zayko
Thanks for the link Vit,
But I think it is a litle overkill for my application.
I only want to generate some simple bars on a webpage.
Putting on a lighting effect was only to make it nice-looking.
Regards,
GTi
Bob Powell [MVP] - 20 Dec 2005 10:57 GMT
See the article on RGB and HSL in the GDI+ FAQ.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
> I'm trying to get a color value and adjust it by xx% (darken or lighten
> the color)
> Is there any build in classes for this like:
> Color NewColor = AdjustColor(Color.Red, -10%);
> OR better, Is there a FillRectangle function that looks like a sylinder
> with lighting effect but without the rounded top and bottom
GTi - 20 Dec 2005 14:59 GMT
> See the article on RGB and HSL in the GDI+ FAQ.
>
[quoted text clipped - 20 lines]
> > OR better, Is there a FillRectangle function that looks like a sylinder
> > with lighting effect but without the rounded top and bottom
Bob,
Excelent site.
Tx