graphics.drawRectangle: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "{{ScriptItem |endpoint = client |type = function |name = graphics.drawRectangle |usage = draw a rectangle in 2D space |parameters = Vec2 position, Vec2 size, [ int colour1 = C...")
 
No edit summary
Line 4: Line 4:
|name = graphics.drawRectangle
|name = graphics.drawRectangle
|usage = draw a rectangle in 2D space
|usage = draw a rectangle in 2D space
|parameters = Vec2 position, Vec2 size, [ int colour1 = COLOUR_WHITE ], [ int colour2 = COLOUR_WHITE ], [ int colour3 = COLOUR_WHITE ], [ int colour4 = COLOUR_WHITE ], [ float rotation = 0.0 ], [ Vec2 center = Vec2(0.0,0.0) ], [ Vec2 sourcePos = Vec2(0.0,0.0) ], [ Vec2 sourceSize = Vec2(1.0,1.0) ], [ Vec2 scale = Vec2(1.0,1.0) ]
|parameters = Surface surface, Vec2 position, Vec2 size, [ int colour1 = COLOUR_WHITE ], [ int colour2 = COLOUR_WHITE ], [ int colour3 = COLOUR_WHITE ], [ int colour4 = COLOUR_WHITE ], [ float rotation = 0.0 ], [ Vec2 center = Vec2(0.0,0.0) ], [ Vec2 sourcePos = Vec2(0.0,0.0) ], [ Vec2 sourceSize = Vec2(1.0,1.0) ], [ Vec2 scale = Vec2(1.0,1.0) ]
|parameter1 = Vec3 position The 2D position for the rectangle.
|parameter1 = Surface surface The surface object, which can be null.
|parameter2 = Vec3 size The 2D size for the rectangle.
|parameter2 = Vec3 position The 2D position for the rectangle.
|parameter3 = int colour1 optional COLOUR_WHITE The 1st colour for the rectangle.
|parameter3 = Vec3 size The 2D size for the rectangle.
|parameter4 = int colour2 optional COLOUR_WHITE The 2nd colour for the rectangle.
|parameter4 = int colour1 optional COLOUR_WHITE The 1st colour for the rectangle.
|parameter5 = int colour3 optional COLOUR_WHITE The 3rd colour for the rectangle.
|parameter5 = int colour2 optional COLOUR_WHITE The 2nd colour for the rectangle.
|parameter6 = int colour4 optional COLOUR_WHITE The 4th colour for the rectangle.
|parameter6 = int colour3 optional COLOUR_WHITE The 3rd colour for the rectangle.
|parameter7 = float rotation optional 0.0 The rotation of the rectangle.
|parameter7 = int colour4 optional COLOUR_WHITE The 4th colour for the rectangle.
|parameter8 = Vec2 center optional Vec2(0.0,0.0) The center of the rectangle.
|parameter8 = float rotation optional 0.0 The rotation of the rectangle.
|parameter9 = Vec2 sourcePos optional Vec2(0.0,0.0) The source position of the rectangle.
|parameter9 = Vec2 center optional Vec2(0.0,0.0) The center of the rectangle.
|parameter10 = Vec2 sourceSize optional Vec2(1.0,1.0) The source size of the rectangle.
|parameter10 = Vec2 sourcePos optional Vec2(0.0,0.0) The source position of the rectangle.
|parameter11 = Vec2 scale optional Vec2(1.0,1.0) The scale of the rectangle.
|parameter11 = Vec2 sourceSize optional Vec2(1.0,1.0) The source size of the rectangle.
|parameter12 = Vec2 scale optional Vec2(1.0,1.0) The scale of the rectangle.
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
}}
}}
6,834

edits

Navigation menu