DxDrawRectangle: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 6: | Line 6: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool dxDrawRectangle ( int startX, startY, float width, float height [, int color] ) | bool dxDrawRectangle ( int startX, startY, float width, float height [, int color = white] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 14: | Line 14: | ||
* '''width:''' An float representing the width of the rectangle, drawn in a ''right'' direction from the origin. | * '''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. | * '''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=== |
Revision as of 13:49, 5 March 2008
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
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsSize
- dxGetPixelsFormat
- dxGetStatus
- dxGetTextSize
- dxGetTextWidth
- dxGetTexturePixels
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderValue
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource