OBJSetColorGradientΒΆ
OBJSetColorGradient sets the color for a color gradient for a drawing object or a diagram.
- bool = OBJSetColorGradient(hobj, rvRGB1, rvRGB2)
- bool = OBJSetColorGradient(hobj, rvARGB1, rvARGB2)
Return Value
If the function succeeds, the return value bool is TRUE (1); otherwise it is FALSE (0).
Parameters
- hobj
hobj identifies a line, text, rectangle, ellipse or layer (diagram) object.
- rvRGB1
is a vector with 3 elements:
Value
Meaning
rvRGB1[1]
(Bottom) Red (0 to 255)
rvRGB1[2]
(Bottom) Green (0 to 255)
rvRGB1[3]
(Bottom) Blue (0 to 255)
- rvRGB2
is a vector with 3 elements:
Value
Meaning
rvRGB2[1]
(Top) Red (0 to 255)
rvRGB2[2]
(Top) Green (0 to 255)
rvRGB2[3]
(Top) Blue (0 to 255)
- rvARGB1
rvARGB1 is a vector with 4 elements for the bottom color:
Value
Meaning
rvARGB1[1]
Alpha: 0 = Transparent, 255 = Opaque
rvARGB1[2]
Red (0-255)
rvARGB1[3]
Green (0-255)
rvARGB1[4]
Blue (0-255)
- rvARGB2
rvARGB2 is a vector with 4 elements for the top color:
Value
Meaning
rvARGB1[1]
Alpha: 0 = Transparent, 255 = Opaque
rvARGB2[2]
Red (0-255)
rvARGB3[3]
Green (0-255)
rvARGB4[4]
Blue (0-255)
Example
hRB = RBCreate(); // Create Rectangle
OBJSetBkMode(hRB, OPAQUE);
OBJSetFillMode(hRB, 1); // Color Gradient
OBJSetColorGradient(hRB, [0,0,0], [255,255,255]);
History
Version |
Description |
---|---|
R2018.2 |
Transparency. |
See also
id-824681