Description: This statement changes one color within a region to another color.
Returns: Nothing
Usage: Steady State
Format: ZColorChange(Left, Bottom, Right, Top, Original, New)
Parameters: Left { numeric } { required } { no default: }
Any numeric expression for the left side coordinate of the change region.
Bottom { numeric } { required } { no default: }
Any numeric expression for the bottom side coordinate of the change region.
Right { numeric } { required } { no default: }
Any numeric expression for the right side coordinate of the change region.
Top { numeric } { required } { no default: }
Any numeric expression for the top side coordinate of the change region.
Original { numeric } { required } { no default: }
Any numeric expression for the original color to change from.
New { numeric } { required } { no default: }
Any numeric expression for the color to change it to or it may be a brush to replace the color with
Comments: Although this is a layered graphic, it cannot be edited using the toolbar. It is for use within text mode editing only. A solid pattern should be used if you wish to change the color back to its original color.
The order of graphics statements are an important factor in determining which objects will have their color changed. The ZColorChange function affects all objects underneath it, which means, any object whose graphic statement is before the ZColorChange statement (including bitmaps that are displayed using a Load statement). Any object whose statement follows the ZColorChange statement will be unaffected. The background color will also be affected by ZColorChange.
Example:
ZBar(100, 500, 500, 40, 12 { Draws a large red bar });
ZColorChange(10, 210, 210, 10 { Bounding box for change },
12, 14 { Change all red in to yellow });
ZBar(20, 60, 60, 20, 12 { Draws a small red bar });
The ZColorChange statement here will cause the upper left corner of the first large bar to be yellow, while the rest of the bar (outside the bounding box for ZColorChange) will remain red. The second bar, although drawn inside of the ZColorChange's bounding box, will be drawn in red, not yellow, because its statement follows the statement that effects the color change.
See Also: