|
SAGA API v9.10
|
#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) |
| CSG_Colors (const CSG_String &Palette, int nColors=0, bool bRevert=false) | |
| bool | Create (const CSG_String &Palette, int nColors=0, 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=0) |
| bool | Set_Predefined (const CSG_String &Name, bool bRevert=false, int nColors=0) |
| bool | Set_Palette (int Index, bool bRevert=false, int nColors=0) |
| bool | Set_Palette (const CSG_String &Name, bool bRevert=false, int nColors=0) |
| 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 Index, bool bWithIndex=true) |
Definition at line 1411 of file api_core.h.
| CSG_Colors::CSG_Colors | ( | void | ) |
Definition at line 172 of file api_colors.cpp.
References Create().
Referenced by Assign(), Assign(), Create(), CSG_Colors(), operator=(), and Set_Count().
| CSG_Colors::CSG_Colors | ( | const CSG_Colors & | Colors | ) |
Definition at line 180 of file api_colors.cpp.
References Create(), and CSG_Colors().
| CSG_Colors::CSG_Colors | ( | int | nColors, |
| int | Palette = SG_COLORS_DEFAULT, | ||
| bool | bRevert = false ) |
Definition at line 188 of file api_colors.cpp.
References Create().
| CSG_Colors::CSG_Colors | ( | const CSG_String & | Palette, |
| int | nColors = 0, | ||
| bool | bRevert = false ) |
Definition at line 196 of file api_colors.cpp.
References Create().
|
virtual |
Definition at line 204 of file api_colors.cpp.
References Destroy().
| bool CSG_Colors::Assign | ( | const CSG_Colors & | Colors | ) |
Definition at line 1243 of file api_colors.cpp.
References Create(), and CSG_Colors().
| bool CSG_Colors::Assign | ( | CSG_Colors * | pSource | ) |
Definition at line 1249 of file api_colors.cpp.
References Create(), and CSG_Colors().
| bool CSG_Colors::Create | ( | const CSG_Colors & | Colors | ) |
Definition at line 221 of file api_colors.cpp.
References CSG_Colors(), and SG_Realloc().
| bool CSG_Colors::Create | ( | const CSG_String & | Palette, |
| int | nColors = 0, | ||
| bool | bRevert = false ) |
Definition at line 243 of file api_colors.cpp.
References Set_Palette(), and SG_COLORS_DEFAULT.
| bool CSG_Colors::Create | ( | int | nColors, |
| int | Palette = SG_COLORS_DEFAULT, | ||
| bool | bRevert = false ) |
Definition at line 237 of file api_colors.cpp.
References Set_Palette(), and SG_COLORS_DEFAULT.
| bool CSG_Colors::Create | ( | void | ) |
Definition at line 215 of file api_colors.cpp.
References Create().
Referenced by CSG_Parameters::Add_Colors(), CSG_Parameters::Add_Colors(), Assign(), Assign(), Create(), CSG_Colors(), CSG_Colors(), CSG_Colors(), CSG_Colors(), CSG_Tool::DataObject_Set_Colors(), and operator=().
| void CSG_Colors::Destroy | ( | void | ) |
| bool CSG_Colors::from_Text | ( | const CSG_String & | String | ) |
Definition at line 1466 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 1446 of file api_core.h.
References Get_Color(), and SG_GET_B.
Referenced by Get_Brightness(), Get_Interpolated(), Invert(), Serialize(), Set_Brightness(), Set_Green(), Set_Red(), and to_Text().
|
inline |
Definition at line 1447 of file api_core.h.
References Get_Blue(), Get_Green(), and Get_Red().
Referenced by Greyscale().
|
inline |
Definition at line 1443 of file api_core.h.
Referenced by Get_Blue(), Get_Green(), Get_Red(), CSG_Parameter::is_Value_Equal(), and Revert().
|
inline |
Definition at line 1431 of file api_core.h.
Referenced by from_Text(), Greyscale(), Invert(), CSG_Parameter::is_Value_Equal(), Random(), Revert(), Serialize(), Set_Count(), Set_Ramp(), Set_Ramp(), Set_Ramp_Brighness(), Set_Ramp_Brighness(), and to_Text().
|
inline |
Definition at line 1445 of file api_core.h.
References Get_Color(), and SG_GET_G.
Referenced by Get_Brightness(), Get_Interpolated(), Invert(), Serialize(), Set_Blue(), Set_Brightness(), Set_Red(), and to_Text().
|
inline |
Definition at line 1449 of file api_core.h.
References Get_Blue(), Get_Green(), Get_Red(), and SG_GET_RGB.
Referenced by Set_Count().
|
static |
Definition at line 436 of file api_colors.cpp.
References SG_COLORS_COUNT.
Referenced by CSG_Parameter_Colors::_Set_Value().
|
static |
Definition at line 442 of file api_colors.cpp.
References _TL, MAKE_NAME, 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_BLUE_GREY_RED, SG_COLORS_BLUE_RED, SG_COLORS_BLUE_WHITE_RED, SG_COLORS_BLUE_YELLOW_RED, SG_COLORS_CYAN_WHITE, SG_COLORS_DEFAULT, SG_COLORS_DEFAULT_BRIGHT, SG_COLORS_GREEN_BLUE, SG_COLORS_GREEN_GREY_BLUE, SG_COLORS_GREEN_GREY_RED, SG_COLORS_GREEN_RED, SG_COLORS_GREEN_RED_BLUE, SG_COLORS_GREEN_WHITE_BLUE, SG_COLORS_GREEN_WHITE_RED, SG_COLORS_GREEN_YELLOW_BLUE, SG_COLORS_GREEN_YELLOW_RED, SG_COLORS_MAGENTA_WHITE, SG_COLORS_NEON, SG_COLORS_PRECIPITATION_1, SG_COLORS_PRECIPITATION_2, SG_COLORS_PRECIPITATION_3, SG_COLORS_PRECIPITATION_4, SG_COLORS_PRECIPITATION_5, SG_COLORS_RAINBOW, SG_COLORS_RAINBOW_2, SG_COLORS_RED_BLUE_GREEN, SG_COLORS_RED_GREEN_BLUE, SG_COLORS_RED_GREY_BLUE, SG_COLORS_RED_GREY_GREEN, SG_COLORS_RED_YELLOW_GREEN, SG_COLORS_SPECTRUM_1, SG_COLORS_SPECTRUM_2, SG_COLORS_SPECTRUM_3, SG_COLORS_THERMAL_1, SG_COLORS_THERMAL_2, SG_COLORS_TOPOGRAPHY, SG_COLORS_TOPOGRAPHY_2, SG_COLORS_TOPOGRAPHY_3, SG_COLORS_TOPOGRAPHY_4, SG_COLORS_VEGETATION, 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_COLORS_YELLOW_WHITE.
Referenced by Set_Predefined(), and SG_Colors_Get_Name().
|
inline |
Definition at line 1444 of file api_core.h.
References Get_Color(), and SG_GET_R.
Referenced by Get_Brightness(), Get_Interpolated(), Invert(), Serialize(), Set_Blue(), Set_Brightness(), Set_Green(), and to_Text().
| bool CSG_Colors::Greyscale | ( | void | ) |
Definition at line 1217 of file api_colors.cpp.
References Get_Brightness(), Get_Count(), and Set_Color().
| bool CSG_Colors::Invert | ( | void | ) |
Definition at line 1193 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 1264 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().
Referenced by CSG_Parameter_Colors::_Set_Value().
| CSG_Colors & CSG_Colors::operator= | ( | const CSG_Colors & | Colors | ) |
Definition at line 1235 of file api_colors.cpp.
References Create(), and CSG_Colors().
|
inline |
Definition at line 1434 of file api_core.h.
| bool CSG_Colors::Random | ( | void | ) |
Definition at line 1178 of file api_colors.cpp.
References Get_Count(), and Set_Color().
| bool CSG_Colors::Revert | ( | void | ) |
Definition at line 1204 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 1345 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 1374 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 343 of file api_colors.cpp.
References Get_Green(), Get_Red(), and Set_Color().
| bool CSG_Colors::Set_Brightness | ( | int | Index, |
| int | Value ) |
Definition at line 349 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 325 of file api_colors.cpp.
References Set_Color(), and SG_GET_RGB.
| bool CSG_Colors::Set_Color | ( | int | Index, |
| long | Color ) |
Definition at line 312 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 265 of file api_colors.cpp.
References CSG_Colors(), Get_Count(), Get_Interpolated(), Set_Default(), and SG_Realloc().
Referenced by from_Text(), Load(), Serialize(), and Set_Predefined().
| bool CSG_Colors::Set_Default | ( | int | nColors = 11 | ) |
Definition at line 1049 of file api_colors.cpp.
References 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 337 of file api_colors.cpp.
References Get_Blue(), Get_Red(), and Set_Color().
|
inline |
Definition at line 1468 of file api_core.h.
References Set_Predefined().
|
inline |
Definition at line 1467 of file api_core.h.
References Set_Predefined().
| bool CSG_Colors::Set_Predefined | ( | const CSG_String & | Name, |
| bool | bRevert = false, | ||
| int | nColors = 0 ) |
Definition at line 1028 of file api_colors.cpp.
References CSG_String::asInt(), CSG_String::Cmp(), Get_Predefined_Name(), Set_Predefined(), and SG_COLORS_COUNT.
| bool CSG_Colors::Set_Predefined | ( | int | Index, |
| bool | bRevert = false, | ||
| int | nColors = 0 ) |
Definition at line 523 of file api_colors.cpp.
References 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_BLUE_GREY_RED, SG_COLORS_BLUE_RED, SG_COLORS_BLUE_WHITE_RED, SG_COLORS_BLUE_YELLOW_RED, SG_COLORS_CYAN_WHITE, SG_COLORS_DEFAULT, SG_COLORS_DEFAULT_BRIGHT, SG_COLORS_GREEN_BLUE, SG_COLORS_GREEN_GREY_BLUE, SG_COLORS_GREEN_GREY_RED, SG_COLORS_GREEN_RED, SG_COLORS_GREEN_RED_BLUE, SG_COLORS_GREEN_WHITE_BLUE, SG_COLORS_GREEN_WHITE_RED, SG_COLORS_GREEN_YELLOW_BLUE, SG_COLORS_GREEN_YELLOW_RED, SG_COLORS_MAGENTA_WHITE, SG_COLORS_NEON, SG_COLORS_PRECIPITATION_1, SG_COLORS_PRECIPITATION_2, SG_COLORS_PRECIPITATION_3, SG_COLORS_PRECIPITATION_4, SG_COLORS_PRECIPITATION_5, SG_COLORS_RAINBOW, SG_COLORS_RAINBOW_2, SG_COLORS_RED_BLUE_GREEN, SG_COLORS_RED_GREEN_BLUE, SG_COLORS_RED_GREY_BLUE, SG_COLORS_RED_GREY_GREEN, SG_COLORS_RED_YELLOW_GREEN, SG_COLORS_SPECTRUM_1, SG_COLORS_SPECTRUM_2, SG_COLORS_SPECTRUM_3, SG_COLORS_THERMAL_1, SG_COLORS_THERMAL_2, SG_COLORS_TOPOGRAPHY, SG_COLORS_TOPOGRAPHY_2, SG_COLORS_TOPOGRAPHY_3, SG_COLORS_TOPOGRAPHY_4, SG_COLORS_VEGETATION, SG_COLORS_WHITE_BLUE, SG_COLORS_WHITE_GREEN, SG_COLORS_WHITE_RED, SG_COLORS_YELLOW_BLUE, SG_COLORS_YELLOW_GREEN, SG_COLORS_YELLOW_RED, SG_COLORS_YELLOW_WHITE, and SG_GET_RGB.
Referenced by CSG_Tool::DataObject_Set_Colors(), CSG_Tool::DataObject_Set_Colors(), Set_Palette(), Set_Palette(), and Set_Predefined().
| bool CSG_Colors::Set_Ramp | ( | long | Color_A, |
| long | Color_B ) |
Definition at line 1074 of file api_colors.cpp.
References Get_Count(), and Set_Ramp().
Referenced by Set_Predefined(), and Set_Ramp().
| bool CSG_Colors::Set_Ramp | ( | long | Color_A, |
| long | Color_B, | ||
| int | iColor_A, | ||
| int | iColor_B ) |
Definition at line 1080 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 1129 of file api_colors.cpp.
References Get_Count(), and Set_Ramp_Brighness().
Referenced by Set_Predefined(), and Set_Ramp_Brighness().
| bool CSG_Colors::Set_Ramp_Brighness | ( | int | Brightness_A, |
| int | Brightness_B, | ||
| int | iColor_A, | ||
| int | iColor_B ) |
Definition at line 1135 of file api_colors.cpp.
References Get_Count(), and Set_Brightness().
| bool CSG_Colors::Set_Red | ( | int | Index, |
| int | Value ) |
Definition at line 331 of file api_colors.cpp.
References Get_Blue(), Get_Green(), and Set_Color().
| bool CSG_Colors::to_Text | ( | CSG_String & | String | ) |
Definition at line 1448 of file api_colors.cpp.
References CSG_String::Clear(), CSG_String::Format(), Get_Blue(), Get_Count(), Get_Green(), and Get_Red().