New(number type, number radius, number x, number y, number outline_width | number blur_density, blur_quality)
- number type =
CIRCLE_FILLED
- The type of circle to make. Valid options are CIRCLE_FILLED, CIRCLE_OUTLINED, and CIRCLE_BLURRED.
- number radius =
8
- The radius of the circle.
- number x =
0
- The X position of the centre of the circle.
- number y =
0
- The Y position of the centre of the circle.
-
- [CIRCLE_OUTLINED] number outline_width =
10
- The outline width of CIRCLE_OUTLINED type circles.
- [CIRCLE_BLURRED] number blur_layers =
3
- The amount of layers of blur for CIRCLE_BLURRED type circles.
- [CIRCLE_OUTLINED] number outline_width =
- [CIRCLE_BLURRED] number blur_density =
2
- The density of the blur for CIRCLE_BLURRED type circles.
- table circle
- The newly created Circle object.
RotateVertices(table vertices, number origin_x, number origin_y, number rotation, boolean rotate_uv)
- table vertices =
nil
- Vertices that you want to be rotate.
- number origin_x =
nil
- X position you want the vertices to be rotated around.
- number origin_y =
nil
- Y position you want the vertices to be rotated around.
- number rotation =
nil
- Amount of degrees to rotate the vertices by. Positive = clockwise.
- boolean rotate_uv =
nil
- Whether or not to rotate the UV coordinates too.
- table vertices
- The rotated vertices.
- number x =
0
- The X position of the centre of the circle.
- number y =
0
- The Y position of the centre of the circle.
- number radius =
16
- Radius of the circle.
- number rotation =
0
- Amount of degrees to rotate the vertices by. Positive = clockwise.
- number start_angle =
0
- Start angle of the circle.
- number end_angle =
360
- End angle of the circle.
- number distance =
10
- Distance between calculated vertices.
- Smaller means a smoother circle but more vertices. Larger means a sharper circle but less vertices.
- Usually you'd use a smaller distance for larger circles, e.g. circles used in 3D2D, and a smaller distance for smaller circles, e.g. circles used in 2D.
- boolean rotate_uv =
nil
- Whether or not to rotate the UV coordinates too.
- table vertices
- The newly calculated circle vertices.
Methods marked with an asterisk (*) are accessors meaning they have Set and Get equivalents.
- table color =
false
- The colour the circle should be. If not set then the previous colour set with surface.SetDrawColor will be used.
- IMaterial material =
false
- The material the circle should have. If not set then the previous material set with surface.SetMaterial will be used. Set to
true
or calldraw.NoTexture
before rendering a circle if you don't want it to have a material.
- The material the circle should have. If not set then the previous material set with surface.SetMaterial will be used. Set to
- boolean accept_rads =
false
- Converts function inputs to degrees. Functions affected by this are Rotate, SetRotation, SetStartAngle, SetEndAngle, and SetAngles.
- boolean rotate =
true
- Whether or not the UV coordinated should be rotated when the Rotate method is used.
- boolean clip =
false
- Whether or not the circle should be clipped when it's rendered. Use this if you render the circle in a vgui element or partially off-screen.
- number type =
CIRCLE_FILLED
- The type of the circle. Valid options are CIRCLE_FILLED, CIRCLE_OUTLINED, and CIRCLE_BLURRED.
- number x =
0
- The X position of the centre of the circle.
- number y =
0
- The Y position of the centre of the circle.
- number radius =
8
- The circle's radius.
- number rotation =
0
- The absolute rotation, in degrees, of the circle.
- number start_angle =
0
- The start angle of the circle.
- number end_angle =
360
- The end angle of the circle.
- number distance =
10
- The distance between the circle's vertices.
- number density =
3
- The density of the blur for CIRCLE_BLURRED type circles.
- number quality =
2
- The quality of the blur for CIRCLE_BLURRED type circles.
- number width =
10
- The outline width for CIRCLE_OUTLINED type circles.
- number x =
0
- The X position of the centre of the circle.
- number y =
0
- The Y position of the centre of the circle.
- number start_angle =
0
- The start angle of the circle.
- number end_angle =
360
- The end angle of the circle.
- table circle
- The copied circle.
- number x =
0
- The X distance to translate the current X position.
- number y =
0
- The Y distance to translate the current Y position.
- number scale =
1
- How much to scale the circle's vertices, e.g. a scale of
2
would double the circle's radius.
- How much to scale the circle's vertices, e.g. a scale of
- number degrees =
0
- How many degrees to rotate the circle relative to the current rotation.