www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - awt.Color.getHSBColor to DWT ?

reply yidabu <yidabu.spam gmail.com> writes:
SWT:
java.awt.Color color = java.awt.Color.getHSBColor(0.2f, 1.0f, 1.0f);
Color myColor = new Color(display, color.getRed(), color.getGreen(),
color.getBlue());

How do thing like this in DWT? 
Does have a method like getHSBColor in DWT?



-- 
yidabu <yidabu.spam gmail.com>
http://www.dsource.org/projects/dwin

D -(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/
Jun 22 2008
parent yidabu <yidabu.spam gmail.com> writes:
On Mon, 23 Jun 2008 09:03:33 +0800
yidabu <yidabu.spam gmail.com> wrote:

 SWT:
 java.awt.Color color = java.awt.Color.getHSBColor(0.2f, 1.0f, 1.0f);
 Color myColor = new Color(display, color.getRed(), color.getGreen(),
color.getBlue());
 
 How do thing like this in DWT? 
 Does have a method like getHSBColor in DWT?

I got it, to DWT, should be: auto rgb = new RGB(0.2f * 360, 1.0f, 1.0f); Color myColor = new Color(display, rgb.red, rgb,green, rgb.blue); or auto myColor = new Color(display, new RGB(0.2f * 360, 1.0f, 1.0f)); -- yidabu <yidabu.spam gmail.com> http://www.dsource.org/projects/dwin D -(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
Jun 22 2008