Tools::SetColor

 

This method assign an RGB value to the tool.color variable.

 

 

Syntax

 

void  Set_Color(

          unsigned char r,

          unsigned char g,

          unsigned char b

) ;

 

 

Parameters

 

r, g, b

          The 3 components of the color that will be assigned to the tool.color variable. the acceptable values are between 0 and 255.

 

 

Return value

 

This method does not return a value.

 

 

Remarks

 

 

Requirements

 

Header:

          TomoVision_Util.hpp

          TomoVision_Tools.hpp

 

Library:

          TomoVision_Util.lib

          TomoVision_Tools.lib

 

 

Example

 

static          Boxs          box_box ;

 

extern "C" __declspec(dllexport) int          Ctrl_Create( HWND wnd, int width, int height )

{

char          *Title_Font_Name =          (char *) Fct_Variable_Value( "$INTERFACE_TITLE_FONT_NAME" ) ;

char          *Title_Font_Weight =          (char *) Fct_Variable_Value( "$INTERFACE_TITLE_FONT_WEIGHT" ) ;

short           Title_Font_Scale =          (short)  Fct_Variable_Value( "$INTERFACE_TITLE_FONT_SCALE" ) ;

short           Border_Dim =          (short)  Fct_Variable_Value( "$INTERFACE_BORDER_DIM" ) ;

 

          box_box.Name = "------- Tool Test Sliders -------" ;

          box_box.Flag      = OUTIL_DISABLE | OUTIL_NO_3D ;

          box_box.Pos_X     = 1 ;

          box_box.Pos_Y     = 1 ;

          box_box.Dim_X     = width - 2 ;

          box_box.Dim_Y     = height - 2 ;

          box_box.border    = Border_Dim;

          box_box.color.set( WINDOW_COLOR_TOOL_R,

                                        WINDOW_COLOR_TOOL_G,

                                        WINDOW_COLOR_TOOL_B ) ;

          box_box.Font_Name   = Title_Font_Name ;

          box_box.Font_Scale  = Title_Font_Scale ;

          box_box.Font_Weight = Title_Font_Weight ;

          box_box.Init( wnd ) ; 

 

          return( 1 ) ;

}

 

See also