 # Making Geometrical forms

Hi,

I have been trying to make some forms to huds, and just to learn how I can make them and I been trying to make this forms:

Can someone tell me how I can make them ? ( I know I need to use DrawPoly but I really cant understand how to do it )

Question 2 : What is the size of a gmod screen ( X = ??? Y = ???/Height = ??? Width = ??? )

If I get the X and Y/Height and Width of the Gmod Screen I could try to make a template to know the X and Y and would be probably easier to make rectangles and other forms.

GMod renders from top left corner down to the lower right corner.
So:

You can get the screen resolution by calling ScrW() to get width, and ScrH() to get height.

``````

x = 0
y = 0
Width = ScrW()
Height = ScrH()

``````

Here’s an example from the wiki, so I don’t understand what it is you don’t understand.

surface.DrawPoly takes a table of vertices, for example:

``````

surface.DrawPoly( { -- Triangle covering the upper half diagonal side of the screen.

{ x = 0, y = 0 },
{ x = ScrW(), y = 0 },
{ x = 0, y = ScrH() }

} )

``````

But How would I get the ScrW and the ScrH in numbers ??

ScrW() and ScrH() already return a number, the width, and height, respectively.