Numer of the color white for created objects.
Hello,
My name is Guilherme and I am have created a macro that creates objects, like a line or a Name, with different collors, depending on the background.
See part of it below.
barra = 12632256
ret = IpAnCreateObj(GO_OBJ_TEXT)
ret = IpAnMove(0, MLx, MLy)
ret = IpAnText("TECMETAL")
ret = IpAnSet(GO_ATTR_FONTSIZE, 17)
ret = IpAnSet(GO_ATTR_FONTBOLD, 1)
ret = IpAnSet(GO_ATTR_TEXTCENTERED, 1)
ret = IpAnSet(GO_ATTR_FONTUNDERLINE, 0)
ret = IpAnSet(GO_ATTR_TEXTCOLOR , barra)
What I need is to create a white object, but I didnt find the number that represents the white color. The number that I used (12632256) gives me a gray object.
Somebody knows which number gives me a white object?
My name is Guilherme and I am have created a macro that creates objects, like a line or a Name, with different collors, depending on the background.
See part of it below.
barra = 12632256
ret = IpAnCreateObj(GO_OBJ_TEXT)
ret = IpAnMove(0, MLx, MLy)
ret = IpAnText("TECMETAL")
ret = IpAnSet(GO_ATTR_FONTSIZE, 17)
ret = IpAnSet(GO_ATTR_FONTBOLD, 1)
ret = IpAnSet(GO_ATTR_TEXTCENTERED, 1)
ret = IpAnSet(GO_ATTR_FONTUNDERLINE, 0)
ret = IpAnSet(GO_ATTR_TEXTCOLOR , barra)
What I need is to create a white object, but I didnt find the number that represents the white color. The number that I used (12632256) gives me a gray object.
Somebody knows which number gives me a white object?
0
Answers
The correct number for pure white in decimal is 16777215 or FFFFFF in hex. An easier method of specifying color values is to use QColor() and RGB() functions that provide the values to use as shown below that generate the same number for white. These functions are documented in the IPBasic help file for reference.
barra = RGB(255,255,255)
barra = QBColor(15)
here is the example
Yuri