# DrawRect ( positionX ; positionY ; sizeX ; sizeY ; downOrAcross ; quantity )

This topic is 5604 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

Name & Parameters: [color:red][big] DrawRect ( positionX ; positionY ; sizeX ; sizeY ; downOrAcross ; quantity ) [/big]

Description: Returns strings for drawing the specified quantity of rectangles of sizeX, sizeY starting from positionX, positionY, either "Down" or "Across".

This produces strings that can be used by the xmChart plugin.

This is a sub function of RectCoordinatesSub(), located here:

http://www.fmforums.com/forum/showtopic.php?tid/179078/

Sample Input:

DrawRect(0;0;12;12;"Across";2)

Results:

Recursive: yes

Formula:

```//DrawRect ( positionX; positionY; sizeX; sizeY; downOrAcross; quantity )

/*

Returns strings for drawing the specified quantity of rectangles of sizeX, sizeY starting from positionX, positionY, either "Down" or "Across".

This produces strings that can be used by the xmChart plugin, in the form:

Sub function of: RectCoordinatesSub()

CFs Required: None

7-29-2006

By Mike Hackett

*/

Case(quantity > 0;

"AddRect( " & positionX & ";" & positionY & ";" & sizeX & ";" & sizeY & ";white)

¶AddFrame(" & positionX & ";" & positionY & ";" & sizeX & ";" & sizeY & ";1;black)¶" &

Case(downOrAcross = "Across";

DrawRect( positionX + sizeX; positionY; sizeX; sizeY; downOrAcross; quantity - 1 );

DrawRect( positionX; positionY + sizeY ; sizeX; sizeY; downOrAcross; quantity - 1 )

)

) ```

Required Functions:

Author(s) Ender

Date: 07/29/06

Credits: Based on the discussion in this thread: http://www.fmforums.com/forum/showtopic.php?tid/170643/

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

##### Share on other sites

This topic is 5604 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account