SAGA API
v9.6
|
#include <api_core.h>
Public Member Functions | |
CSG_Colors (void) | |
bool | Create (void) |
CSG_Colors (const CSG_Colors &Colors) | |
bool | Create (const CSG_Colors &Colors) |
CSG_Colors (int nColors, int Palette=SG_COLORS_DEFAULT, bool bRevert=false) | |
bool | Create (int nColors, int Palette=SG_COLORS_DEFAULT, bool bRevert=false) |
virtual | ~CSG_Colors (void) |
void | Destroy (void) |
bool | Set_Count (int nColors) |
int | Get_Count (void) const |
CSG_Colors & | operator= (const CSG_Colors &Colors) |
long & | operator[] (int Index) |
bool | Set_Color (int Index, long Color) |
bool | Set_Color (int Index, int Red, int Green, int Blue) |
bool | Set_Red (int Index, int Value) |
bool | Set_Green (int Index, int Value) |
bool | Set_Blue (int Index, int Value) |
bool | Set_Brightness (int Index, int Value) |
long | Get_Color (int Index) const |
long | Get_Red (int Index) const |
long | Get_Green (int Index) const |
long | Get_Blue (int Index) const |
long | Get_Brightness (int Index) const |
long | Get_Interpolated (double Index) const |
bool | Set_Predefined (int Index, bool bRevert=false, int nColors=11) |
bool | Set_Palette (int Index, bool bRevert=false, int nColors=11) |
bool | Set_Default (int nColors=11) |
bool | Set_Ramp (long Color_A, long Color_B) |
bool | Set_Ramp (long Color_A, long Color_B, int iColor_A, int iColor_B) |
bool | Set_Ramp_Brighness (int Brightness_A, int Brightness_B) |
bool | Set_Ramp_Brighness (int Brightness_A, int Brightness_B, int iColor_A, int iColor_B) |
bool | Random (void) |
bool | Invert (void) |
bool | Revert (void) |
bool | Greyscale (void) |
bool | Assign (const CSG_Colors &Colors) |
bool | Assign (CSG_Colors *pSource) |
bool | Load (const CSG_String &File_Name) |
bool | Save (const CSG_String &File_Name, bool bBinary) |
bool | Serialize (CSG_File &Stream, bool bSave, bool bBinary) |
bool | to_Text (CSG_String &String) |
bool | from_Text (const CSG_String &String) |
Static Public Member Functions | |
static int | Get_Predefined_Count (void) |
static CSG_String | Get_Predefined_Name (int Identifier) |
Definition at line 1337 of file api_core.h.
CSG_Colors::CSG_Colors | ( | void | ) |
Definition at line 172 of file api_colors.cpp.
References Create().
CSG_Colors::CSG_Colors | ( | const CSG_Colors & | Colors | ) |
Definition at line 181 of file api_colors.cpp.
References Create().
CSG_Colors::CSG_Colors | ( | int | nColors, |
int | Palette = SG_COLORS_DEFAULT , |
||
bool | bRevert = false |
||
) |
Definition at line 190 of file api_colors.cpp.
References Create().
|
virtual |
Definition at line 199 of file api_colors.cpp.
References Destroy().
bool CSG_Colors::Assign | ( | const CSG_Colors & | Colors | ) |
Definition at line 1037 of file api_colors.cpp.
References Create().
Referenced by CSG_Parameter_Colors::_Assign().
bool CSG_Colors::Assign | ( | CSG_Colors * | pSource | ) |
Definition at line 1043 of file api_colors.cpp.
References Create().
bool CSG_Colors::Create | ( | const CSG_Colors & | Colors | ) |
Definition at line 216 of file api_colors.cpp.
References SG_Realloc().
bool CSG_Colors::Create | ( | int | nColors, |
int | Palette = SG_COLORS_DEFAULT , |
||
bool | bRevert = false |
||
) |
Definition at line 232 of file api_colors.cpp.
References Set_Count(), and Set_Palette().
bool CSG_Colors::Create | ( | void | ) |
Definition at line 210 of file api_colors.cpp.
Referenced by CSG_Parameter_Colors::_Set_Value(), CSG_Parameters::Add_Colors(), Assign(), CSG_Colors(), and operator=().
void CSG_Colors::Destroy | ( | void | ) |
bool CSG_Colors::from_Text | ( | const CSG_String & | String | ) |
Definition at line 1260 of file api_colors.cpp.
References CSG_String::asInt(), Get_Count(), CSG_String::Length(), CSG_String::Mid(), Set_Color(), and Set_Count().
|
inline |
Definition at line 1369 of file api_core.h.
References SG_GET_B.
Referenced by CSG_Parameter_Colors::_Serialize(), Invert(), Serialize(), Set_Brightness(), Set_Green(), Set_Red(), and to_Text().
|
inline |
Definition at line 1370 of file api_core.h.
Referenced by Greyscale().
|
inline |
Definition at line 1366 of file api_core.h.
Referenced by CSG_Parameter::is_Value_Equal(), and Revert().
|
inline |
Definition at line 1354 of file api_core.h.
Referenced by CSG_Parameter_Colors::_asInt(), CSG_Parameter_Colors::_Serialize(), CSG_Parameter_Colors::_Set_String(), CSG_Parameter_Colors::_Set_Value(), from_Text(), Greyscale(), Invert(), CSG_Parameter::is_Value_Equal(), Random(), Revert(), Serialize(), Set_Count(), Set_Default(), Set_Ramp(), Set_Ramp_Brighness(), and to_Text().
|
inline |
Definition at line 1368 of file api_core.h.
References SG_GET_G.
Referenced by CSG_Parameter_Colors::_Serialize(), Invert(), Serialize(), Set_Blue(), Set_Brightness(), Set_Red(), and to_Text().
|
inline |
|
static |
Definition at line 435 of file api_colors.cpp.
References SG_COLORS_COUNT.
Referenced by CSG_Parameter_Colors::_Set_Value().
|
static |
Definition at line 441 of file api_colors.cpp.
References _TL, SG_COLORS_ASPECT_1, SG_COLORS_ASPECT_2, SG_COLORS_ASPECT_3, SG_COLORS_BLACK_BLUE, SG_COLORS_BLACK_GREEN, SG_COLORS_BLACK_RED, SG_COLORS_BLACK_WHITE, SG_COLORS_DEFAULT, SG_COLORS_DEFAULT_BRIGHT, SG_COLORS_GREEN_BLUE, SG_COLORS_GREEN_GREY_BLUE, SG_COLORS_GREEN_RED, SG_COLORS_GREEN_RED_BLUE, SG_COLORS_NEON, SG_COLORS_PRECIPITATION, SG_COLORS_RAINBOW, SG_COLORS_RED_BLUE, SG_COLORS_RED_BLUE_GREEN, SG_COLORS_RED_GREEN, SG_COLORS_RED_GREEN_BLUE, SG_COLORS_RED_GREY_BLUE, SG_COLORS_RED_GREY_GREEN, SG_COLORS_TOPOGRAPHY, SG_COLORS_TOPOGRAPHY_2, SG_COLORS_TOPOGRAPHY_3, SG_COLORS_WHITE_BLUE, SG_COLORS_WHITE_GREEN, SG_COLORS_WHITE_RED, SG_COLORS_YELLOW_BLUE, SG_COLORS_YELLOW_GREEN, and SG_COLORS_YELLOW_RED.
Referenced by SG_Colors_Get_Name().
|
inline |
Definition at line 1367 of file api_core.h.
References SG_GET_R.
Referenced by CSG_Parameter_Colors::_Serialize(), Invert(), Serialize(), Set_Blue(), Set_Brightness(), Set_Green(), and to_Text().
bool CSG_Colors::Greyscale | ( | void | ) |
Definition at line 1011 of file api_colors.cpp.
References Get_Brightness(), Get_Count(), and Set_Color().
bool CSG_Colors::Invert | ( | void | ) |
Definition at line 987 of file api_colors.cpp.
References Get_Blue(), Get_Count(), Get_Green(), Get_Red(), and Set_Color().
bool CSG_Colors::Load | ( | const CSG_String & | File_Name | ) |
Definition at line 1058 of file api_colors.cpp.
References B, COLORS_SERIAL_VERSION__ASCII, COLORS_SERIAL_VERSION_BINARY, CSG_String::Find(), CSG_File::Length(), CSG_File::Open(), CSG_File::Read(), CSG_File::Seek_Start(), Serialize(), Set_Color(), Set_Count(), SG_FILE_R, SG_Free(), and SG_Malloc().
CSG_Colors & CSG_Colors::operator= | ( | const CSG_Colors & | Colors | ) |
Definition at line 1029 of file api_colors.cpp.
References Create().
|
inline |
Definition at line 1357 of file api_core.h.
bool CSG_Colors::Random | ( | void | ) |
Definition at line 972 of file api_colors.cpp.
References Get_Count(), and Set_Color().
Referenced by Set_Predefined().
bool CSG_Colors::Revert | ( | void | ) |
Definition at line 998 of file api_colors.cpp.
References Get_Color(), Get_Count(), and Set_Color().
Referenced by Set_Predefined().
bool CSG_Colors::Save | ( | const CSG_String & | File_Name, |
bool | bBinary | ||
) |
Definition at line 1139 of file api_colors.cpp.
References COLORS_SERIAL_VERSION__ASCII, COLORS_SERIAL_VERSION_BINARY, CSG_File::Open(), Serialize(), SG_FILE_W, and CSG_File::Write().
bool CSG_Colors::Serialize | ( | CSG_File & | Stream, |
bool | bSave, | ||
bool | bBinary | ||
) |
Definition at line 1168 of file api_colors.cpp.
References CSG_String::AfterFirst(), CSG_String::AfterLast(), CSG_String::asInt(), Get_Blue(), Get_Count(), Get_Green(), Get_Red(), CSG_String::is_Empty(), CSG_File::is_Open(), CSG_File::Printf(), CSG_File::Read(), CSG_File::Read_Line(), Set_Color(), Set_Count(), and CSG_File::Write().
Referenced by Load(), Save(), and CSG_Parameters::Serialize_Compatibility().
bool CSG_Colors::Set_Blue | ( | int | Index, |
int | Value | ||
) |
Definition at line 342 of file api_colors.cpp.
References Get_Green(), Get_Red(), and Set_Color().
Referenced by CSG_Parameter_Colors::_Serialize().
bool CSG_Colors::Set_Brightness | ( | int | Index, |
int | Value | ||
) |
Definition at line 348 of file api_colors.cpp.
References Get_Blue(), Get_Green(), Get_Red(), and Set_Color().
Referenced by Set_Ramp_Brighness().
bool CSG_Colors::Set_Color | ( | int | Index, |
int | Red, | ||
int | Green, | ||
int | Blue | ||
) |
Definition at line 324 of file api_colors.cpp.
References Set_Color(), and SG_GET_RGB.
bool CSG_Colors::Set_Color | ( | int | Index, |
long | Color | ||
) |
Definition at line 311 of file api_colors.cpp.
Referenced by from_Text(), Greyscale(), Invert(), Load(), Random(), Revert(), Serialize(), Set_Blue(), Set_Brightness(), Set_Color(), Set_Default(), Set_Green(), Set_Predefined(), Set_Ramp(), and Set_Red().
bool CSG_Colors::Set_Count | ( | int | nColors | ) |
Definition at line 264 of file api_colors.cpp.
References Get_Count(), Get_Interpolated(), Set_Default(), and SG_Realloc().
Referenced by CSG_Parameter_Colors::_Serialize(), Create(), from_Text(), Load(), Serialize(), and Set_Predefined().
bool CSG_Colors::Set_Default | ( | int | nColors = 11 | ) |
Definition at line 843 of file api_colors.cpp.
References Get_Count(), M_PI, Set_Color(), and SG_Realloc().
Referenced by Set_Count(), and Set_Predefined().
bool CSG_Colors::Set_Green | ( | int | Index, |
int | Value | ||
) |
Definition at line 336 of file api_colors.cpp.
References Get_Blue(), Get_Red(), and Set_Color().
Referenced by CSG_Parameter_Colors::_Serialize().
|
inline |
Definition at line 1389 of file api_core.h.
Referenced by Create().
bool CSG_Colors::Set_Predefined | ( | int | Index, |
bool | bRevert = false , |
||
int | nColors = 11 |
||
) |
Definition at line 481 of file api_colors.cpp.
References Random(), Revert(), Set_Color(), Set_Count(), Set_Default(), Set_Ramp(), Set_Ramp_Brighness(), SG_COLORS_ASPECT_1, SG_COLORS_ASPECT_2, SG_COLORS_ASPECT_3, SG_COLORS_BLACK_BLUE, SG_COLORS_BLACK_GREEN, SG_COLORS_BLACK_RED, SG_COLORS_BLACK_WHITE, SG_COLORS_COUNT, SG_COLORS_DEFAULT, SG_COLORS_DEFAULT_BRIGHT, SG_COLORS_GREEN_BLUE, SG_COLORS_GREEN_GREY_BLUE, SG_COLORS_GREEN_RED, SG_COLORS_GREEN_RED_BLUE, SG_COLORS_NEON, SG_COLORS_PRECIPITATION, SG_COLORS_RAINBOW, SG_COLORS_RED_BLUE, SG_COLORS_RED_BLUE_GREEN, SG_COLORS_RED_GREEN, SG_COLORS_RED_GREEN_BLUE, SG_COLORS_RED_GREY_BLUE, SG_COLORS_RED_GREY_GREEN, SG_COLORS_TOPOGRAPHY, SG_COLORS_TOPOGRAPHY_2, SG_COLORS_TOPOGRAPHY_3, SG_COLORS_WHITE_BLUE, SG_COLORS_WHITE_GREEN, SG_COLORS_WHITE_RED, SG_COLORS_YELLOW_BLUE, SG_COLORS_YELLOW_GREEN, SG_COLORS_YELLOW_RED, and SG_GET_RGB.
bool CSG_Colors::Set_Ramp | ( | long | Color_A, |
long | Color_B | ||
) |
Definition at line 868 of file api_colors.cpp.
References Get_Count().
Referenced by Set_Predefined().
bool CSG_Colors::Set_Ramp | ( | long | Color_A, |
long | Color_B, | ||
int | iColor_A, | ||
int | iColor_B | ||
) |
Definition at line 874 of file api_colors.cpp.
References Get_Count(), Set_Color(), SG_GET_B, SG_GET_G, and SG_GET_R.
bool CSG_Colors::Set_Ramp_Brighness | ( | int | Brightness_A, |
int | Brightness_B | ||
) |
Definition at line 923 of file api_colors.cpp.
References Get_Count().
Referenced by Set_Predefined().
bool CSG_Colors::Set_Ramp_Brighness | ( | int | Brightness_A, |
int | Brightness_B, | ||
int | iColor_A, | ||
int | iColor_B | ||
) |
Definition at line 929 of file api_colors.cpp.
References Get_Count(), and Set_Brightness().
bool CSG_Colors::Set_Red | ( | int | Index, |
int | Value | ||
) |
Definition at line 330 of file api_colors.cpp.
References Get_Blue(), Get_Green(), and Set_Color().
Referenced by CSG_Parameter_Colors::_Serialize().
bool CSG_Colors::to_Text | ( | CSG_String & | String | ) |
Definition at line 1242 of file api_colors.cpp.
References CSG_String::Clear(), CSG_String::Format(), Get_Blue(), Get_Count(), Get_Green(), and Get_Red().