SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
color.h
Go to the documentation of this file.
1 // Copyright 2013 Trimble Inc., All rights reserved.
2 
3 #ifndef SKETCHUP_COLOR_H_
4 #define SKETCHUP_COLOR_H_
5 
7 
8 #pragma pack(push, 8)
9 #ifdef __cplusplus
10 extern "C" {
11 #endif // __cplusplus
12 
17 typedef unsigned char SUByte;
18 
23 typedef struct {
24  SUByte red;
25  SUByte green;
26  SUByte blue;
27  SUByte alpha;
28 } SUColor;
29 
45 SU_RESULT SUColorBlend(const SUColor color1, const SUColor color2,
46  const double weight, SUColor* blended_color);
47 
57 SU_RESULT SUColorGetNumNames(size_t *size);
58 
69 SU_RESULT SUColorGetNames(SUStringRef names[], const size_t size);
70 
82 SU_RESULT SUColorSetByName(SUColor *color, const char *name);
83 
96 SU_RESULT SUColorSetByValue(SUColor *color, const size_t value);
97 
98 #ifdef __cplusplus
99 } // end extern "C"
100 #endif // __cplusplus
101 #pragma pack(pop)
102 
103 #endif // SKETCHUP_COLOR_H_