DxDrawRectangle

From Multi Theft Auto: Wiki
Revision as of 13:49, 5 March 2008 by Arc (talk | contribs)
Jump to navigation Jump to search

This function draws a 2D rectangle across the screen - rendered for one frame. This should be used in conjunction with onClientRender in order to display continuously.


Syntax

bool dxDrawRectangle ( int startX, startY, float width, float height [, int color = white] )

Required Arguments

  • startX: An integer representing the absolute origin X position of the rectangle, represented by pixels on the screen.
  • startY: An integer representing the absolute origin Y position of the rectangle, represented by pixels on the screen.
  • width: An float representing the width of the rectangle, drawn in a right direction from the origin.
  • height: An float representing the height of the rectangle, drawn in a downwards direction from the origin.

Optional Arguments

  • color: the color of the rectangle.

Returns

Returns a true if the operation was successful, false otherwise.

Example

--TODO

See Also