Tags:
create new tag
view all tags

.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.


-- JeanNeron - 2011-10-20

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2012-02-25 - JeanNeron
 
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