Difference: CDShapeSetNextPoint (1 vs. 2)

Revision 22012-02-25 - JeanNeron

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="CDChartDirectorDesignerAPI"
>
>
META TOPICPARENT name="CDChartDirectorXYChartRoutines"
 

.SHAPE SET NEXT POINT

This subroutine is called to create a custom shape.

Revision 12011-10-20 - JeanNeron

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

.SHAPE SET NEXT POINT

This subroutine is called to create a custom shape.


Usage:

      PASS         <x_point>        FIELD            SHARE? N
      PASS         <y_point>        FIELD            SHARE? N
      GOSUB    OCD .SHAPE SET NEXT POINT
      *        Check for error
      IF       OCD .SHAPE SET NEXT POINT          NE

Description:

This subroutine allows you to define the shape of a custom shape by specifying the X/Y coordinates of the points. You must have initialized the shape as a customShape via .SHAPE INITIALIZE.

Both the <x_point> and <y_point> parameters are required, and the subroutine will cancel if they are not received.

In Chart Director, custom shapes are specified as an array of integers x0, y0, x1, y1, x2, y2 ... representing the coordinates of the vertices of the custom polygonal shape.

The polygon is a bounding square of 1000 x 1000 units, in which the x-axis is from -500 to 500 going from left to right, and the y-axis is from 0 to 1000 going from bottom to top.

When the chart is rendered, Chart Director will automatically scale the polygon to fit your chart.

As an example, the shape of the standard diamond shape in Chart Director can be represented by the following pairs of coordinates:

0, 0
500, 500
0, 1000
-500, 500

You would call this routine 4 times, passing it a pair of the above coordindates each time.

Comments:

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


<--/commentPlugin-->

-- JeanNeron - 2011-10-20

 
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