July 29, 200619 yr 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.
Create an account or sign in to comment