Difference: CDColorSetGradient (1 vs. 2)

Revision 22012-02-22 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="CDChartDirectorColorRoutines"

.COLOR SET GRADIENT

Revision 12012-01-19 - JeanNeron

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CDChartDirectorColorRoutines"

.COLOR SET GRADIENT

Changes the "current" color object to have a two-point linear gradient color.


Usage:

      PASS         <start_x>                  FIELD            SHARE? N
      PASS         <start_y>                  FIELD            SHARE? N
      PASS         <end_x>                    FIELD            SHARE? N
      PASS         <end_y>                    FIELD            SHARE? N
      PASS         <start_color>              FIELD            SHARE? N
      PASS         <end_color>                FIELD            SHARE? N
      PASS         <periodic>                 FIELD            SHARE? N
      GOSUB    0CD .COLOR SET GRADIENT
      *        Check for error
      IF       0CD .COLOR SET GRADIENT        NE

Description:

Changes the "current" color object to have a two-point linear gradient color. All parameters except for <periodic> are required. If any are missing, the routine will CANCEL with an error message.

<start_x> The x coordinate of the starting point of the reference gradient line segment, 0-999.

<start_y> The y coordinate of the starting point of the reference gradient line segment, 0-999.

<end_x> The x coordinate of the ending point of the reference gradient line segment, 0-999.

<end_y> The y coordinate of the ending point of the reference gradient line segment, 0-999.

<start_color> The color at the starting point of the reference gradient line segment. This must refer to one of the valid color values as explained on the ColorSpec page.

<end_color> The color at the ending point of the reference gradient line segment. This must refer to one of the valid color values as explained on the ColorSpec page.

<periodic> On or True to activate it, or Off or False to turn it off. Specifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie beyond the end points of the gradient line segment will assume the colors of the end points. Default is off.

This only modifies an existing color spec to be a gradient color, so you will have to assign a color to an object using the appropriate API first, then use this routine to change that color to be a gradient. For example, to create a gradient background on your chart, you would first assign a background color to the chart using .CHART SET BG COLOR, then immediately use this routine to change the background color to a gradient color. In this case, it doesn't matter what the initial background color will be, since you're going to immediately change it to a gradient color.

See ColorSpec for more information on working with colors.

Comments:

Read what other users have said about this page or add your own comments.


<--/commentPlugin-->

-- JeanNeron - 2012-01-19

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback