Jump to content

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


This topic is 6452 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:

AddRect( 0;0;12;12;white)¶

AddFrame(0;0;12;12;1;black)¶

AddRect( 12;0;12;12;white)¶

AddFrame(12;0;12;12;1;black)¶

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:



AddRect( 0;0;12;12;white)¶

AddFrame(0;0;12;12;1;black)¶





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.

Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.