> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: Render
icon: brush
sidebar_position: 1
---

# <ApiPageIcon icon="brush" />Render

<ApiExposes data="[{&#x22;k&#x22;:&#x22;NAMESPACE&#x22;,&#x22;c&#x22;:&#x22;fn&#x22;,&#x22;s&#x22;:&#x22;render&#x22;,&#x22;h&#x22;:&#x22;#render-1&#x22;},{&#x22;k&#x22;:&#x22;OBJECT&#x22;,&#x22;c&#x22;:&#x22;method&#x22;,&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;h&#x22;:&#x22;#image&#x22;},{&#x22;k&#x22;:&#x22;OBJECT&#x22;,&#x22;c&#x22;:&#x22;method&#x22;,&#x22;s&#x22;:&#x22;Shader&#x22;,&#x22;h&#x22;:&#x22;#shader&#x22;},{&#x22;k&#x22;:&#x22;OBJECT&#x22;,&#x22;c&#x22;:&#x22;method&#x22;,&#x22;s&#x22;:&#x22;render.ShaderOptions&#x22;,&#x22;h&#x22;:&#x22;#rendershaderoptions&#x22;},{&#x22;k&#x22;:&#x22;OBJECT&#x22;,&#x22;c&#x22;:&#x22;method&#x22;,&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;h&#x22;:&#x22;#font&#x22;}]" />

<Heading level={2} id="render-1">
  render

  <ApiTag label="global table" />
</Heading>

Draws shapes, images and text on the screen.

Call the drawing functions only inside the `render` event. If you call one anywhere else, it
throws an error. Coordinates are in screen pixels. The point `Vector2D(0, 0)` is the top left
corner of the screen.

<ApiMembers>
  <ApiMember kind="fn" name="render.DrawLine" summary="Draws a straight line between two points." args="startpos, endpos, color, thickness?" sig="[{&#x22;s&#x22;:&#x22;render.DrawLine&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;startpos&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;endpos&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;startpos&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The start point.&#x22;},{&#x22;n&#x22;:&#x22;endpos&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The end point.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the line.&#x22;},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the line in pixels. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawBezier" summary="Draws a cubic Bézier curve through four control points. The curve starts at `a` and ends at `d`." args="a, b, c, d, color, thickness, segments?" sig="[{&#x22;s&#x22;:&#x22;render.DrawBezier&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;a&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;b&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;c&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;d&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;segments&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;a&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The first control point, where the curve starts.&#x22;},{&#x22;n&#x22;:&#x22;b&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The second control point.&#x22;},{&#x22;n&#x22;:&#x22;c&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The third control point.&#x22;},{&#x22;n&#x22;:&#x22;d&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The fourth control point, where the curve ends.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the curve.&#x22;},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the curve in pixels.&#x22;},{&#x22;n&#x22;:&#x22;segments&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}],&#x22;d&#x22;:&#x22;The number of straight line segments used to draw the curve. Pass `0` or `nil` to choose the number automatically. A value above `512` is treated as `512`, and a value below `0` is treated as `0`. Defaults to `0`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawRect" summary="Draws a filled rectangle from `position` to `position + size`." args="position, size, color, rounding?" sig="[{&#x22;s&#x22;:&#x22;render.DrawRect&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The fill colour.&#x22;},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawRectOutline" summary="Draws the outline of a rectangle from `position` to `position + size`." args="position, size, color, thickness?, rounding" sig="[{&#x22;s&#x22;:&#x22;render.DrawRectOutline&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the outline.&#x22;},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the outline in pixels. Defaults to `1`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels.&#x22;}]" />

  <ApiMember kind="fn" name="render.DrawRectShadow" summary="Draws a soft shadow around a rectangle. The rectangle itself is not drawn." args="position, size, color, rounding?, shadow_size?, offset?" sig="[{&#x22;s&#x22;:&#x22;render.DrawRectShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;shadow_size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;offset&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner of the rectangle.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the shadow.&#x22;},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;shadow_size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The blur radius of the shadow in pixels. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;offset&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;How far the shadow is moved from the rectangle. Defaults to `Vector2D(0, 0)`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawRectGradient" summary="Draws a filled rectangle with a different colour at each corner. The colours blend smoothly across the rectangle." args="position, size, top_left, top_right, bottom_left, bottom_right, rounding?" sig="[{&#x22;s&#x22;:&#x22;render.DrawRectGradient&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;top_left&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;top_right&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;bottom_left&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;bottom_right&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;top_left&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the top left corner.&#x22;},{&#x22;n&#x22;:&#x22;top_right&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the top right corner.&#x22;},{&#x22;n&#x22;:&#x22;bottom_left&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the bottom left corner.&#x22;},{&#x22;n&#x22;:&#x22;bottom_right&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the bottom right corner.&#x22;},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawRectGlow" summary="Draws a glow along the border of a rectangle." args="position, size, color, rounding?" sig="[{&#x22;s&#x22;:&#x22;render.DrawRectGlow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the glow.&#x22;},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      This function uses one radius for all four corners. If you pass an array for `rounding`, only
      its first value is used.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.DrawWindow" summary="Draws a transparent window background with a frosted look and a shadow. It looks the same as the windows of the cheat menu." args="position, size, rounding?, shadow?, alpha?" sig="[{&#x22;s&#x22;:&#x22;render.DrawWindow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;shadow&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;alpha&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;shadow&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The size of the shadow. Defaults to `10` multiplied by the DPI scale of the menu.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;alpha&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The opacity of the background, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      This function uses one radius for all four corners. If you pass an array for `rounding`, only
      its first value is used.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.DrawWindowShadow" summary="Draws the shadow that the windows of the menu use, for a rectangle with the given position and size. The colour, size and offset of the shadow come from the current menu style." args="position, size, rounding?" sig="[{&#x22;s&#x22;:&#x22;render.DrawWindowShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      This function uses one radius for all four corners. If you pass an array for `rounding`, only
      its first value is used.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.DrawCircle" summary="Draws a filled circle. Pass `percentage` to draw only a part of the circle, like a slice of a pie." args="center, color, radius, start_degrees?, percentage?" sig="[{&#x22;s&#x22;:&#x22;render.DrawCircle&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;start_degrees&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;percentage&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The fill colour.&#x22;},{&#x22;n&#x22;:&#x22;radius&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius in pixels.&#x22;},{&#x22;n&#x22;:&#x22;start_degrees&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle in degrees where the arc starts. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;percentage&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How much of the full circle to draw, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawCircleOutline" summary="Draws the outline of a circle. Pass `percentage` to draw only a part of the circle, like a slice of a pie." args="center, color, radius, start_degrees?, percentage?, thickness?" sig="[{&#x22;s&#x22;:&#x22;render.DrawCircleOutline&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;start_degrees&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;percentage&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the outline.&#x22;},{&#x22;n&#x22;:&#x22;radius&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius in pixels.&#x22;},{&#x22;n&#x22;:&#x22;start_degrees&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle in degrees where the arc starts. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;percentage&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How much of the full circle to draw, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the outline in pixels. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawCircleGradient" summary="Draws a filled circle whose colour changes from `outer` at the edge to `inner` at the center." args="center, outer, inner, radius, gradient?, start_degrees?, percentage?" sig="[{&#x22;s&#x22;:&#x22;render.DrawCircleGradient&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;outer&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;inner&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;gradient&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;start_degrees&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;percentage&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;outer&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the edge.&#x22;},{&#x22;n&#x22;:&#x22;inner&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the center.&#x22;},{&#x22;n&#x22;:&#x22;radius&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius in pixels.&#x22;},{&#x22;n&#x22;:&#x22;gradient&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How strongly the two colours blend. Defaults to `1`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;start_degrees&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle in degrees where the arc starts. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;percentage&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How much of the full circle to draw, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawEllipse" summary="Draws a filled ellipse." args="center, color, radius_major, radius_minor, rotation?" sig="[{&#x22;s&#x22;:&#x22;render.DrawEllipse&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius_major&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius_minor&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rotation&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The fill colour.&#x22;},{&#x22;n&#x22;:&#x22;radius_major&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius along the direction of `rotation`, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;radius_minor&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius at a right angle to `rotation`, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;rotation&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle of the major axis in degrees. Defaults to `0`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawEllipseOutline" summary="Draws the outline of an ellipse." args="center, color, radius_major, radius_minor, rotation?, thickness?" sig="[{&#x22;s&#x22;:&#x22;render.DrawEllipseOutline&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius_major&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius_minor&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rotation&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the outline.&#x22;},{&#x22;n&#x22;:&#x22;radius_major&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius along the direction of `rotation`, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;radius_minor&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius at a right angle to `rotation`, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;rotation&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle of the major axis in degrees. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the outline in pixels. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawEllipseGradient" summary="Draws a filled ellipse whose colour changes from `outer` at the edge to `inner` at the center." args="center, outer, inner, radius_major, radius_minor, rotation?, gradient?" sig="[{&#x22;s&#x22;:&#x22;render.DrawEllipseGradient&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;outer&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;inner&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius_major&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius_minor&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;rotation&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;gradient&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;outer&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the edge.&#x22;},{&#x22;n&#x22;:&#x22;inner&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the center.&#x22;},{&#x22;n&#x22;:&#x22;radius_major&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius along the direction of `rotation`, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;radius_minor&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius at a right angle to `rotation`, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;rotation&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle of the major axis in degrees. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;gradient&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How strongly the two colours blend. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawCircleBlur" summary="Blurs everything behind a circular area of the screen." args="center, alpha, radius, start_degrees?, percentage?" sig="[{&#x22;s&#x22;:&#x22;render.DrawCircleBlur&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;alpha&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;start_degrees&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;percentage&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point.&#x22;},{&#x22;n&#x22;:&#x22;alpha&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The opacity of the blur, from `0` to `1`.&#x22;},{&#x22;n&#x22;:&#x22;radius&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius in pixels.&#x22;},{&#x22;n&#x22;:&#x22;start_degrees&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle in degrees where the arc starts. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;percentage&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How much of the full circle to blur, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawCircleShadow" summary="Draws a soft shadow around a circle. The circle itself is not drawn." args="center, color, radius, size, start_degrees?, percentage?, offset?" sig="[{&#x22;s&#x22;:&#x22;render.DrawCircleShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;start_degrees&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;percentage&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;offset&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center point of the circle.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the shadow.&#x22;},{&#x22;n&#x22;:&#x22;radius&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius of the circle in pixels.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The blur radius of the shadow in pixels.&#x22;},{&#x22;n&#x22;:&#x22;start_degrees&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle in degrees where the arc starts. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;percentage&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How much of the full circle to use, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;offset&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;How far the shadow is moved from the circle. Defaults to `Vector2D(0, 0)`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawTriangle" summary="Draws a filled triangle." args="p1, p2, p3, color" sig="[{&#x22;s&#x22;:&#x22;render.DrawTriangle&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;p1&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;p2&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;p3&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;p1&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The first corner.&#x22;},{&#x22;n&#x22;:&#x22;p2&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The second corner.&#x22;},{&#x22;n&#x22;:&#x22;p3&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The third corner.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The fill colour.&#x22;}]" />

  <ApiMember kind="fn" name="render.DrawTriangleOutline" summary="Draws the outline of a triangle." args="p1, p2, p3, color, thickness?" sig="[{&#x22;s&#x22;:&#x22;render.DrawTriangleOutline&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;p1&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;p2&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;p3&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;p1&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The first corner.&#x22;},{&#x22;n&#x22;:&#x22;p2&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The second corner.&#x22;},{&#x22;n&#x22;:&#x22;p3&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The third corner.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the outline.&#x22;},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the outline in pixels. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawPoly" summary="Draws a filled convex polygon. List the corners in order around the edge of the polygon." args="points, color" sig="[{&#x22;s&#x22;:&#x22;render.DrawPoly&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;points&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;points&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;}],&#x22;d&#x22;:&#x22;The corners of the polygon in order. You can pass at most 16000 points. More points throw an error.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The fill colour.&#x22;}]" />

  <ApiMember kind="fn" name="render.DrawPolyline" summary="Draws lines that connect the given points one after another." args="points, color, closed, thickness" sig="[{&#x22;s&#x22;:&#x22;render.DrawPolyline&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;points&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;closed&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;points&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;}],&#x22;d&#x22;:&#x22;The points in order. You can pass at most 16000 points. More points throw an error.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the lines.&#x22;},{&#x22;n&#x22;:&#x22;closed&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}],&#x22;d&#x22;:&#x22;If `true`, a line also connects the last point to the first point.&#x22;},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The thickness of the lines in pixels.&#x22;}]" />

  <ApiMember kind="fn" name="render.DrawPolyGradient" summary="Draws a filled convex polygon whose colour changes from `outer` at the edges to `inner` at `center`. A polygon with fewer than three points is not drawn." args="center?, points, outer, inner, offset?" sig="[{&#x22;s&#x22;:&#x22;render.DrawPolyGradient&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;points&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;outer&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;inner&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;offset&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The point where the colour is `inner`. Defaults to the average position of all points.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;points&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;}],&#x22;d&#x22;:&#x22;The corners of the polygon in order. You can pass at most 16000 points. More points throw an error.&#x22;},{&#x22;n&#x22;:&#x22;outer&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the edges.&#x22;},{&#x22;n&#x22;:&#x22;inner&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour at the center.&#x22;},{&#x22;n&#x22;:&#x22;offset&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How strongly the two colours blend, from `0` to `1`. Values outside this range are clamped. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawPolyShadow" summary="Draws a soft glow around a convex polygon. The polygon itself is not drawn. Use `render.DrawPoly` if you also want to fill it." args="points, color, thickness, offset?" sig="[{&#x22;s&#x22;:&#x22;render.DrawPolyShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;points&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;thickness&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;offset&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;points&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;}],&#x22;d&#x22;:&#x22;The corners of the polygon in order. You can pass at most 1985 points. More points throw an error.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the glow. It fades to transparent over `thickness`.&#x22;},{&#x22;n&#x22;:&#x22;thickness&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How far the glow reaches out from the polygon, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;offset&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;How far the whole glow is moved. Defaults to `Vector2D(0, 0)`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.DrawImage" summary="Draws an image. An image that is not loaded yet, or an empty image such as the avatar of a user who has no avatar, draws nothing." args="image, position, size?, color?, mode?, rounding?" sig="[{&#x22;s&#x22;:&#x22;render.DrawImage&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;image&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;mode&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.ImageMode&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-ImageMode&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;image&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}],&#x22;d&#x22;:&#x22;The image to draw.&#x22;},{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The size to draw the image at, in pixels. Defaults to the size of the image.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;A colour that is multiplied with the image. Defaults to opaque white.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;mode&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.ImageMode&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-ImageMode&#x22;}],&#x22;d&#x22;:&#x22;How the image fills the rectangle. Defaults to `render.ImageMode.kFill`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      If `size` is `nil`, or both of its values are `0` or less, the image is drawn at its own size.
      If only one value is `0` or less, that value is calculated from the other one, so the image
      keeps its proportions.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.LoadImage" summary="Loads an image from the bytes of an image file. The format, such as PNG, JPG, GIF or SVG, is detected from the data." args="bytes, size?" sig="[{&#x22;s&#x22;:&#x22;render.LoadImage&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;bytes&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;bytes&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;The contents of the image file.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The size in pixels to load the image at. Defaults to the size of the image.&#x22;,&#x22;o&#x22;:true}]" nodiscard>
    <ApiNotes>
      Throws an error if the data is shorter than three bytes, or if a value of `size` is not above
      `0` and at most `16384`. A GIF is always loaded at its own size.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.LoadImageRGBA" summary="Loads an image from raw RGBA pixel data that is not compressed." args="bytes, size" sig="[{&#x22;s&#x22;:&#x22;render.LoadImageRGBA&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;bytes&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;bytes&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;The raw RGBA pixel data, with 4 bytes for each pixel.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height of the image in pixels.&#x22;}]" nodiscard>
    <ApiNotes>
      Each value of `size` must be above `0` and at most `16384`. The data must contain at least
      `size.x * size.y * 4` bytes. Otherwise this function throws an error.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.LoadImageFromFile" summary="Loads an image from a file in the folder of the script. Throws an error if the file does not exist or is empty." args="file, size?" sig="[{&#x22;s&#x22;:&#x22;render.LoadImageFromFile&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;file&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;file&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;The path of the file relative to the folder of the script, such as `images/badge.png`.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The size in pixels to load the image at. Defaults to the size of the image.&#x22;,&#x22;o&#x22;:true}]" nodiscard />

  <ApiMember kind="fn" name="render.CreateShader" summary="Compiles a pixel shader from HLSL source with shader model 5.0." args="source, callback?" sig="[{&#x22;s&#x22;:&#x22;render.CreateShader&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;source&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;callback&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;fun&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;ok&#x22;},{&#x22;s&#x22;:&#x22;:&#x22;},{&#x22;s&#x22;:&#x22; &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;,&#x22;},{&#x22;s&#x22;:&#x22; &#x22;},{&#x22;s&#x22;:&#x22;err&#x22;},{&#x22;s&#x22;:&#x22;:&#x22;},{&#x22;s&#x22;:&#x22; &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Shader&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#shader&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Shader&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#shader&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;source&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;The HLSL source that defines `main`.&#x22;},{&#x22;n&#x22;:&#x22;callback&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;fun&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;ok&#x22;},{&#x22;s&#x22;:&#x22;:&#x22;},{&#x22;s&#x22;:&#x22; &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;,&#x22;},{&#x22;s&#x22;:&#x22; &#x22;},{&#x22;s&#x22;:&#x22;err&#x22;},{&#x22;s&#x22;:&#x22;:&#x22;},{&#x22;s&#x22;:&#x22; &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}],&#x22;d&#x22;:&#x22;Called once when the compile finishes. If the compile failed, `err` is the error message. Throws an error if this is not a function or `nil`.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      This function returns at once, and the shader compiles in the background. When it finishes,
      `callback` is called and the shader can be drawn. Shaders compile in the order they were
      requested, so a shader can wait for others to finish first. If you release the shader, or the
      script unloads, before its compile starts, the compile is cancelled.

      The source must define `float4 main(PSInput i) : SV_Target`. It returns **linear** RGB with
      **straight** alpha. A `Color` is in sRGB, so convert it with `nl_srgb_to_linear` first. The
      result is clamped to the range from `0` to `1`, and a pixel with a NaN value is not drawn.

      The following names are already declared for the shader. Do not declare them yourself.

      ```hlsl
      struct PSInput { float4 pos : SV_POSITION; float4 col : COLOR0; float2 uv : TEXCOORD0; };
      // uv runs 0..1 across the drawn rectangle; pos is the pixel on screen.
      float2 nl_resolution;  // screen size in pixels
      float2 nl_mouse;       // cursor position
      float2 nl_pos;         // rectangle position and size, as passed to render.DrawShader
      float2 nl_size;
      float4 nl_rounding;    // corner radii in pixels: top-left, top-right, bottom-right, bottom-left
      float  nl_time;        // seconds since the shader was created
      float  nl_delta;       // seconds since the last frame
      uint   nl_frame;       // frame counter
      float4 nl_params[16];  // the `params` numbers, four to an element: params[1] is nl_params[0].x
      Texture2D nl_image;    // the `image` option
      Texture2D nl_backdrop; // a blurred copy of what is under the draw
      SamplerState nl_linear_clamp, nl_linear_wrap;
      float3 nl_srgb_to_linear(float3 c);  float3 nl_linear_to_srgb(float3 c);
      float4 nl_vertex_color(PSInput i);   // the `color` option, linear
      float2 nl_local_px(PSInput i);       // position inside the rectangle in pixels
      float2 nl_screen_uv(PSInput i);      // position on screen, 0..1
      float4 nl_sample_image(PSInput i);   // nl_image at uv
      float4 nl_sample_backdrop(PSInput i); // nl_backdrop under this pixel
      ```

      The shader can use only these resources. A global variable must be `static`, because the
      script has no constant buffer of its own. Pass values to the shader through `params` instead.
      `#include` is not available.

      Names that start with `nl_`, and the name `PSInput`, belong to the code around the source. If
      the source declares one of them, the compile fails.

      The compile also fails if the shader has more than 8192 instructions, if nested
      `[unroll(n)]` loops unroll to more than 1024 iterations in total, or if the source is larger
      than 1 MB after its macros are expanded. The error message then gives the reason.

      Throws an error if the source is empty or larger than 64 KB, if the script already has 32
      shaders, or if 256 shaders exist across all scripts.
    </ApiNotes>

    <ApiExample title="Animated plasma">
      ```lua luaintelligence=true semantic="lua:cs2:cs2/api_reference/rendering/render:0:fc6d1ac9bf26"
      local plasma = render.CreateShader([[
      float4 main(PSInput i) : SV_Target
      {
          float2 p = nl_local_px(i) / 40.0;
          float v = sin(p.x + nl_time) + sin(p.y + nl_time * 1.3) + sin(p.x + p.y + nl_time * 0.7);
          float3 c = 0.5 + 0.5 * cos(v + float3(0.0, 2.0, 4.0));
          return float4(c, nl_params[0].x);
      }
      ]], function(ok, err) if not ok then print(err) end end)

      events.render:Set(function()
          render.DrawShader(plasma, Vector2D(100, 100), Vector2D(300, 150), { params = { 0.9 }, rounding = 12 })
      end)
      ```
    </ApiExample>
  </ApiMember>

  <ApiMember kind="fn" name="render.DrawShader" summary="Draws a rectangle in which every pixel is calculated by `shader`. A shader that is still compiling, or that failed, draws nothing. Throws an error if the shader was released or belongs to another script." args="shader, position, size, options?" sig="[{&#x22;s&#x22;:&#x22;render.DrawShader&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;shader&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Shader&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#shader&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;options&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.ShaderOptions&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#rendershaderoptions&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;shader&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Shader&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#shader&#x22;}],&#x22;d&#x22;:&#x22;A shader from `render.CreateShader`.&#x22;},{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height in pixels.&#x22;},{&#x22;n&#x22;:&#x22;options&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.ShaderOptions&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#rendershaderoptions&#x22;}],&#x22;d&#x22;:&#x22;Values for the shader. Throws an error if this is not a table or `nil`.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      Rotation from `render.PushRotation` and clip rectangles apply in the same way as for other
      drawing functions.

      Inside a `render.PushTransform` block, the rectangle is drawn on the plane. Then `uv`,
      `nl_local_px` and the rounding follow the plane, and `nl_pos` and `nl_size` are the rectangle
      on the plane as you passed it. `nl_mouse`, `nl_screen_uv` and `nl_backdrop` stay in screen
      space. The backdrop under such a rectangle is not blurred, so do not read it there.

      A script can draw at most 512 shaders in each frame. At most 16 of them can read
      `nl_backdrop`, because each of these blurs the area under it first. A draw over either limit
      throws an error.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.PushSmoothing" summary="Sets the amount of smoothing, also called antialiasing, for everything drawn until the matching `render.PopSmoothing` call." args="smoothing" sig="[{&#x22;s&#x22;:&#x22;render.PushSmoothing&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;smoothing&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;smoothing&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The amount of smoothing.&#x22;}]">
    <ApiNotes>
      If a smoothing, blur, clip rectangle or clip shader is still pushed when your `render` callback
      returns, it is removed for you and a script error is shown.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.PopSmoothing" summary="Removes the smoothing set by `render.PushSmoothing`." args="" sig="[{&#x22;s&#x22;:&#x22;render.PopSmoothing&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" />

  <ApiMember kind="fn" name="render.PushBlur" summary="Starts a blur area. Everything drawn until the matching `render.PopBlur` call is drawn over a blurred copy of the background." args="strength?, is_static?" sig="[{&#x22;s&#x22;:&#x22;render.PushBlur&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;strength&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;is_static&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;strength&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The strength of the blur. Defaults to `1`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;is_static&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}],&#x22;d&#x22;:&#x22;If `true`, the blur is calculated once instead of every frame. Defaults to `true`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.PopBlur" summary="Ends the blur area started by `render.PushBlur`. If no blur area is started, this function does nothing." args="" sig="[{&#x22;s&#x22;:&#x22;render.PopBlur&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" />

  <ApiMember kind="fn" name="render.PushClipRect" summary="Starts a clip rectangle. Everything drawn until the matching `render.PopClipRect` call is cut to this rectangle." args="position, size, intersect?" sig="[{&#x22;s&#x22;:&#x22;render.PushClipRect&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;intersect&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner of the clip rectangle.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height of the clip rectangle.&#x22;},{&#x22;n&#x22;:&#x22;intersect&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}],&#x22;d&#x22;:&#x22;If `true`, the new rectangle is limited to the area of the current clip rectangle. If `false`, it replaces the current clip rectangle. Defaults to `false`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.PopClipRect" summary="Ends the clip rectangle started by `render.PushClipRect`." args="" sig="[{&#x22;s&#x22;:&#x22;render.PopClipRect&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" />

  <ApiMember kind="fn" name="render.PushShadow" summary="Starts recording shapes for a shadow. The matching `render.PopShadow` call draws a shadow for the recorded shapes." args="" sig="[{&#x22;s&#x22;:&#x22;render.PushShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" />

  <ApiMember kind="fn" name="render.PopShadow" summary="Ends the recording started by `render.PushShadow` and draws a soft shadow for the recorded shapes." args="color, size, offset?" sig="[{&#x22;s&#x22;:&#x22;render.PopShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;offset&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the shadow.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The blur radius of the shadow in pixels.&#x22;},{&#x22;n&#x22;:&#x22;offset&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;How far the shadow is moved. Defaults to `Vector2D(0, 0)`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.PushClipShader" summary="Starts a clip shader area. The shapes drawn until the matching `render.PopClipShaderRect` or `render.PopClipShaderCircle` call are cut to the shape given to that call." args="" sig="[{&#x22;s&#x22;:&#x22;render.PushClipShader&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]">
    <ApiNotes>
      If the area is still open when your `render` callback returns, it is closed for you and
      everything drawn inside it is thrown away.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.PopClipShaderRect" summary="Ends the clip shader area started by `render.PushClipShader` and cuts the shapes drawn inside it to a rectangle." args="position, size, color?, rounding?" sig="[{&#x22;s&#x22;:&#x22;render.PopClipShaderRect&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;rounding&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The top left corner of the clip rectangle.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The width and height of the clip rectangle.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;A colour that is applied to the shapes inside the area. Defaults to opaque white.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;rounding&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;}],&#x22;d&#x22;:&#x22;The corner radius of the clip rectangle in pixels. Defaults to no rounding.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.PopClipShaderCircle" summary="Ends the clip shader area started by `render.PushClipShader` and cuts the shapes drawn inside it to a circle or to a part of a circle." args="center, radius, start_degrees?, percentage?" sig="[{&#x22;s&#x22;:&#x22;render.PopClipShaderCircle&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;radius&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;start_degrees&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;percentage&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The center of the clip circle.&#x22;},{&#x22;n&#x22;:&#x22;radius&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The radius in pixels.&#x22;},{&#x22;n&#x22;:&#x22;start_degrees&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The angle in degrees where the arc starts. Defaults to `0`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;percentage&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;How much of the full circle to keep, from `0` to `1`. Defaults to `1`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.PushComplexShadow" summary="Starts recording shapes for a detailed shadow. The matching `render.PopComplexShadow` call draws a high quality shadow that follows the exact outline of the recorded shapes." args="" sig="[{&#x22;s&#x22;:&#x22;render.PushComplexShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]">
    <ApiNotes>
      Recordings cannot be nested. If you start one inside another, its shapes become part of the
      outer recording and do not get a shadow of their own.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.PopComplexShadow" summary="Ends the recording started by `render.PushComplexShadow` and draws the shadow." args="color, only_shadow?, bottom_right_or_top_left?" sig="[{&#x22;s&#x22;:&#x22;render.PopComplexShadow&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;only_shadow&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;bottom_right_or_top_left&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the shadow.&#x22;},{&#x22;n&#x22;:&#x22;only_shadow&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}],&#x22;d&#x22;:&#x22;If `true`, only the shadow is drawn and the recorded shapes are not. Defaults to `false`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;bottom_right_or_top_left&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}],&#x22;d&#x22;:&#x22;The direction of the shadow. Pass `true` to move it to the bottom right, or `false` to move it to the top left. Pass `nil` to not move it. Defaults to `nil`.&#x22;,&#x22;o&#x22;:true}]" />

  <ApiMember kind="fn" name="render.PushRotation" summary="Starts a rotation. Everything drawn until the matching `render.PopRotation` call is rotated by `ang`." args="ang, center?" sig="[{&#x22;s&#x22;:&#x22;render.PushRotation&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;ang&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;center&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;ang&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The rotation angle in degrees.&#x22;},{&#x22;n&#x22;:&#x22;center&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The point to rotate around. Defaults to the center of the area that contains all shapes drawn after this call.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      Only one rotation can be active at a time. If you call this function again before
      `render.PopRotation`, the new rotation replaces the old one.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.PopRotation" summary="Applies and ends the rotation started by `render.PushRotation`. Throws an error if `render.PushRotation` was not called earlier in the same frame." args="" sig="[{&#x22;s&#x22;:&#x22;render.PopRotation&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" />

  <ApiMember kind="fn" name="render.LoadFont" summary="Loads one of the ESP fonts. The size, effect and hinting of these fonts come from the ESP settings. If you pass them, they are ignored." args="builtin" sig="[{&#x22;s&#x22;:&#x22;render.LoadFont&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;builtin&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.EspFont&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-EspFont&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;builtin&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.EspFont&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-EspFont&#x22;}],&#x22;d&#x22;:&#x22;The ESP font to load.&#x22;}]" nodiscard />

  <ApiMember kind="fn" name="render.LoadFont" summary="Loads a font at a given size. Pass the name of a font family, or the path of a font file in the folder of the script. Font files can be `.ttf`, `.otf` or `.ttc` files." id="render-LoadFont-2" args="name, size, effect?, hinting?" sig="[{&#x22;s&#x22;:&#x22;render.LoadFont&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;name&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;effect&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.FontEffect&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-FontEffect&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;hinting&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;render.FontHinting&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-FontHinting&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;name&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;The name of the font family, or the path of a font file relative to the folder of the script.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The font size in pixels, above `0` and at most `512`.&#x22;},{&#x22;n&#x22;:&#x22;effect&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.FontEffect&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-FontEffect&#x22;}],&#x22;d&#x22;:&#x22;The outline or shadow effect. Defaults to `render.FontEffect.kNone`.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;hinting&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;render.FontHinting&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-FontHinting&#x22;}],&#x22;d&#x22;:&#x22;The hinting of the font. Defaults to `render.FontHinting.DirectWriteNatural`.&#x22;,&#x22;o&#x22;:true}]" nodiscard>
    <ApiNotes>
      A name can be the name of a font installed on the system or of a font that comes with the
      cheat. An unknown name throws an error. In the first moments after the game starts, the list of
      installed fonts is still being read. During this time any name is accepted, and the font stays
      not `loaded` until the list is ready. If the name is unknown, a script error is shown at that
      point and the `failed` field of the font becomes `true`.

      A name that contains `/` or `\`, or that ends in `.ttf`, `.otf` or `.ttc`, is a path. The path
      is relative to the folder of the script, in the same way as for `render.LoadImageFromFile`. You
      can also pass a path that `cloud.ReadResource` returned for a file of the script. An absolute
      path works only when it points inside the folder of the script. Any other path throws the same
      error as a missing file.

      The file is read and checked when you call this function. Throws an error if the file is not a
      usable scalable font, or if it is larger than 32 MB. A `.ttc` file loads its first face. Each
      file is read only once. Loading it again at any size uses the same data until the script
      reloads, so you can call this function from a `render` callback without a large cost.

      Throws an error if `size` is not above `0` and at most `512`, or if `effect` or `hinting` is not
      a value of its enum.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.DrawText" summary="Draws text. The values after `flags` are converted to strings with `tostring` and joined to make the text. If the font is not loaded yet, nothing is drawn." args="position, color, font, flags?, ...?" sig="[{&#x22;s&#x22;:&#x22;render.DrawText&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;font&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;flags&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;...&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The position of the text. The flags decide how the text is aligned to it.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the text.&#x22;},{&#x22;n&#x22;:&#x22;font&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}],&#x22;d&#x22;:&#x22;The font to draw with.&#x22;},{&#x22;n&#x22;:&#x22;flags&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;Any combination of `c` to center, `r` to align right and `d` to apply DPI scaling.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;...&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;}],&#x22;d&#x22;:&#x22;The values to draw as text.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      `flags` is a string of letters. Use `c` to center the text on `position`, `r` to align the
      right edge of the text to `position`, and `d` to apply DPI scaling. If you pass both `c` and
      `r`, the text is centered.

      Text is placed on whole pixels. A font with `render.FontHinting.Msdf` keeps the exact position,
      so its text can move smoothly.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.DrawTextEx" summary="Draws text at `size` pixels instead of the size of the font. In all other ways it works like `render.DrawText`." args="position, color, font, size, flags?, ...?" sig="[{&#x22;s&#x22;:&#x22;render.DrawTextEx&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;position&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;color&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;font&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;flags&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;...&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;position&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The position of the text. The flags decide how the text is aligned to it.&#x22;},{&#x22;n&#x22;:&#x22;color&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;}],&#x22;d&#x22;:&#x22;The colour of the text.&#x22;},{&#x22;n&#x22;:&#x22;font&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}],&#x22;d&#x22;:&#x22;The font to draw with.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The size to draw the text at, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;flags&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;Any combination of `c` to center, `r` to align right and `d` to apply DPI scaling.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;...&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;}],&#x22;d&#x22;:&#x22;The values to draw as text.&#x22;,&#x22;o&#x22;:true}]">
    <ApiNotes>
      With a `render.FontHinting.Msdf` font, the text stays sharp at any size and the space between
      the letters stays exact. So you can animate the size without loading more fonts. Other fonts
      are stretched and become blurry at sizes other than their own size. An outline or drop shadow
      is scaled with the text.

      Throws an error if `size` is not above `0` and at most `512`.
    </ApiNotes>

    <ApiExample title="Scalable text">
      ```lua luaintelligence=true semantic="lua:cs2:cs2/api_reference/rendering/render:1:8bcdbd9fb8f1"
      local font = render.LoadFont("Calibri", 24, render.FontEffect.kOutline, render.FontHinting.Msdf)

      events.render:Set(function()
          render.DrawTextEx(Vector2D(200, 200), Color(255, 255, 255), font, 48, "c", "Hello")
      end)
      ```
    </ApiExample>
  </ApiMember>

  <ApiMember kind="fn" name="render.MeasureText" summary="Returns the size in pixels that the text would have if it was drawn with `render.DrawText`. Takes the same `flags` and values as `render.DrawText`. Only the `d` flag changes the result." args="font, flags?, ...?" sig="[{&#x22;s&#x22;:&#x22;render.MeasureText&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;font&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;flags&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;...&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;font&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}],&#x22;d&#x22;:&#x22;The font to measure with.&#x22;},{&#x22;n&#x22;:&#x22;flags&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;Any combination of `c` to center, `r` to align right and `d` to apply DPI scaling.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;...&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;}],&#x22;d&#x22;:&#x22;The values to measure as text.&#x22;,&#x22;o&#x22;:true}]" nodiscard>
    <ApiNotes>
      Returns `Vector2D(0, 0)` if the text is empty or the font is not loaded yet.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.MeasureTextEx" summary="Returns the size in pixels that the text would have if it was drawn with `render.DrawTextEx` at `size`. Returns `Vector2D(0, 0)` if the text is empty or the font is not loaded yet." args="font, size, flags?, ...?" sig="[{&#x22;s&#x22;:&#x22;render.MeasureTextEx&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;font&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;flags&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;, &#x22;},{&#x22;s&#x22;:&#x22;...&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;font&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Font&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#font&#x22;}],&#x22;d&#x22;:&#x22;The font to measure with.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}],&#x22;d&#x22;:&#x22;The size to measure the text at, in pixels.&#x22;},{&#x22;n&#x22;:&#x22;flags&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;Any combination of `c` to center, `r` to align right and `d` to apply DPI scaling.&#x22;,&#x22;o&#x22;:true},{&#x22;n&#x22;:&#x22;...&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;any&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;}],&#x22;d&#x22;:&#x22;The values to measure as text.&#x22;,&#x22;o&#x22;:true}]" nodiscard>
    <ApiNotes>
      Throws an error if `size` is not above `0` and at most `512`.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.LoadImageFromFile" summary="Loads an image from a file. This version adds the formats and the search order of the game to the loader of the framework. The file is searched for in this order." id="render-LoadImageFromFile-2" args="file, size?" sig="[{&#x22;s&#x22;:&#x22;render.LoadImageFromFile&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;file&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;[, &#x22;},{&#x22;s&#x22;:&#x22;size&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;}]]" params="[{&#x22;n&#x22;:&#x22;file&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}],&#x22;d&#x22;:&#x22;The relative path to the image file.&#x22;},{&#x22;n&#x22;:&#x22;size&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}],&#x22;d&#x22;:&#x22;The size to rasterize the image to. Defaults to the original size of the image.&#x22;,&#x22;o&#x22;:true}]" nodiscard>
    <ApiNotes>
      1. A path that ends with `.vsvg_c` or `.vtex_c` is loaded as a compiled game texture.
      2. Other paths are first searched for in the files of the running script.
      3. Then the path is searched for in the working directory of the game.
      4. Then the path is searched for in the search paths of the engine file system.

      For steps 2 to 4, the path must be relative. An absolute path, a path with a drive letter, or a
      path that uses `..` to leave the working directory throws an error. If the file is not found,
      an error is thrown.

      The resources that are available depend on the game content that is installed. Load images
      outside the render event.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="fn" name="render.PushTransform" summary="Starts drawing on a plane in the world. Everything that is drawn before `render.PopTransform` is placed on the plane of `transform` instead of on the screen. The screen position `(x, y)` of a shape is used as a position on the plane. The shape is placed at `origin + left * x - up * y` and then projected to the screen." args="transform" sig="[{&#x22;s&#x22;:&#x22;render.PushTransform&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;transform&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;CTransform&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/transform#ctransform&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" params="[{&#x22;n&#x22;:&#x22;transform&#x22;,&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;CTransform&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/transform#ctransform&#x22;}],&#x22;d&#x22;:&#x22;The transform of the plane in world space. Its scale is the number of world units for each pixel.&#x22;}]">
    <ApiNotes>
      * The forward axis of the transform is the normal of the plane. It points at the viewer. Text
        drawn at `(0, 0)` with the `"c"` flag is centred on the origin and reads from left to right
        when you look at the plane from the front.
      * The scale of the transform is the number of world units for each pixel on the plane. For
        example, with a scale of `0.1`, a font with a size of 12 pixels is about 1.2 units tall.
      * Only one transform can be active at a time. Calling this function again before
        `render.PopTransform` throws an error. Use `render.PushRotation` inside the block to rotate
        shapes on the plane.

      Only the corners of each shape are projected on the CPU. Circles, ellipses, rounded
      rectangles, gradients, images and `render.DrawShader` find the position of each pixel on the
      plane in the shader. Because of this, they keep their shape in perspective. For example, a
      circle that you see at an angle looks like an ellipse. The glyphs of text and the colours of
      simple shapes are interpolated across their triangles instead. At the size of a glyph, you
      cannot see the difference.

      Screen space effects do not follow the plane. Blur, shadows, glows, clip shaders, clip
      rectangles and the `nl_backdrop` of a shader all stay in screen space. Do not use them inside
      the block. A clip rectangle that was pushed before the block still clips the block on the
      screen. Text that is more than 8192 pixels away from the origin of the plane is not drawn.

      Call this function only from the `render` event, and call `render.PopTransform` in the same
      event. If the block is still open when the callback returns, the block is closed and a script
      error is shown. Its shapes are drawn without projection for that frame.
    </ApiNotes>

    <ApiExample title="Text in the world">
      ```lua luaintelligence=true semantic="lua:cs2:cs2/api_reference/rendering/render:2:6bd7517e5b6d"
      local font = render.LoadFont("Verdana", 24)

      events.render:Set(function()
          local origin = Vector(0, 0, 64)
          render.PushTransform(CTransform(origin, QAngle(0, 90, 0), 0.1))
          render.DrawText(Vector2D(0, 0), Color(255, 255, 255), font, "c", "hello")
          render.PopTransform()
      end)
      ```
    </ApiExample>
  </ApiMember>

  <ApiMember kind="fn" name="render.PopTransform" summary="Ends the block that `render.PushTransform` started, and projects it to the screen. Calling this function without an open block throws an error." args="" sig="[{&#x22;s&#x22;:&#x22;render.PopTransform&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" returns="[{&#x22;t&#x22;:[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}],&#x22;d&#x22;:&#x22;`false` if the block was dropped.&#x22;}]">
    <ApiNotes>
      If any vertex of the block is behind the camera, the whole block is dropped. A triangle that
      reaches behind the eye cannot be projected.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="type" name="render.Rounding" summary="The rounding of the corners of a rectangle. Pass one number to round all four corners by the same radius. Pass an array of up to four numbers to give each corner its own radius." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;|&#x22;},{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;}]]" />

  <ApiMember kind="type" name="render.ImageMode" summary="How an image fills the rectangle it is drawn in. Used by `render.DrawImage` and `group:AddImage`." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]">
    <ApiEnum name="render.ImageMode" values="[[&#x22;kFill&#x22;,&#x22;0&#x22;,&#x22;Stretch the image to fill the rectangle.&#x22;],[&#x22;kRepeat&#x22;,&#x22;1&#x22;,&#x22;Repeat the image across the rectangle.&#x22;]]" />
  </ApiMember>

  <ApiMember kind="type" name="render.EspFont" summary="The fonts that the ESP uses." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]">
    <ApiEnum name="render.EspFont" values="[[&#x22;kRegular&#x22;,&#x22;0&#x22;,&#x22;Verdana, 9px at base DPI&#x22;],[&#x22;kSmall&#x22;,&#x22;1&#x22;,&#x22;Small Fonts, 7px&#x22;],[&#x22;kBold&#x22;,&#x22;2&#x22;,&#x22;Verdana Bold, 9px at base DPI&#x22;]]" />
  </ApiMember>

  <ApiMember kind="type" name="render.FontEffect" summary="An outline or shadow that is added to every character of a font." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]">
    <ApiEnum name="render.FontEffect" values="[[&#x22;kNone&#x22;,&#x22;0&#x22;,&#x22;No effect.&#x22;],[&#x22;kDropshadow&#x22;,&#x22;1&#x22;,&#x22;A drop shadow behind each character.&#x22;],[&#x22;kOutline&#x22;,&#x22;2&#x22;,&#x22;An outline around each character.&#x22;]]" />
  </ApiMember>

  <ApiMember kind="type" name="render.FontHinting" summary="The hinting of a font. Hinting decides how the outlines of the characters are fitted to the pixel grid, and so it also decides the width of the text." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]">
    <ApiEnum name="render.FontHinting" values="[[&#x22;None&#x22;,&#x22;0&#x22;,&#x22;No hinting. Characters keep their exact scaled outlines and widths.&#x22;],[&#x22;DirectWriteNatural&#x22;,&#x22;1&#x22;,&#x22;ClearType hinting with natural DirectWrite widths. This is the default.&#x22;],[&#x22;DirectWriteGdiClassic&#x22;,&#x22;2&#x22;,&#x22;ClearType hinting with GDI Classic widths, rounded to whole pixels.&#x22;],[&#x22;DirectWriteGdiNatural&#x22;,&#x22;3&#x22;,&#x22;ClearType hinting on the vertical axis only, with GDI Natural widths.&#x22;],[&#x22;DirectWriteAliased&#x22;,&#x22;4&#x22;,&#x22;Black and white hinting on both axes, with GDI Classic widths. Text has hard pixel edges. Fonts made for ClearType, such as Segoe UI, look thin and uneven with this value.&#x22;],[&#x22;AutoHint&#x22;,&#x22;5&#x22;,&#x22;The FreeType autohinter with normal hinting.&#x22;],[&#x22;AutoHintLight&#x22;,&#x22;6&#x22;,&#x22;The FreeType autohinter with light hinting on the vertical axis only.&#x22;],[&#x22;AutoHintMono&#x22;,&#x22;7&#x22;,&#x22;The FreeType autohinter with strong hinting made for black and white pixels.&#x22;],[&#x22;Msdf&#x22;,&#x22;8&#x22;,&#x22;No hinting. Characters are stored as multichannel distance fields, so text stays sharp when it is scaled or drawn inside `render.PushTransform`. At small sizes the text is a little softer than with the other values, and the font takes longer to load the first time. Colour emoji are still normal images.&#x22;]]" />

    <ApiNotes>
      All values except `DirectWriteAliased` draw text with smooth grayscale edges from FreeType.

      The `DirectWrite` values follow the hinting instructions of the font in the same way as
      DirectWrite. The font and the size still decide whether the outlines are drawn natural,
      symmetric or without hinting.

      The `AutoHint` values ignore the hinting instructions of the font and use the FreeType
      autohinter.
    </ApiNotes>
  </ApiMember>
</ApiMembers>

## Image<ApiTag label="object type" />

An image that you can draw with `render.DrawImage` or show in the menu.

Images are decoded in the background after the load function returns. Until `loaded` is
`true`, `size` can be `0x0` or the size that you asked for. An SVG image and an image made from
an RGBA buffer have their size at once.

An empty image, such as the avatar of a user who has no avatar, has the size `0x0`, its `loaded`
field is `false` and its `failed` field is `true`.

<ApiMembers>
  <ApiMember kind="prop" name="Image.failed" summary="Whether the image will never load. This is `true` if the data could not be decoded or if there is no image at all. This field is read only." ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="prop" name="Image.loaded" summary="Whether the image is decoded and can be drawn. Until it is `true`, `render.DrawImage` draws nothing. This field is read only." ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="prop" name="Image.size" summary="The width and height of the image in pixels. Check `loaded` before you use this value." ret="[[{&#x22;s&#x22;:&#x22;Vector2D&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/vector2#vector2d&#x22;}]]" />
</ApiMembers>

## Shader<ApiTag label="object type" />

A pixel shader that the script writes in HLSL. Create it with `render.CreateShader` and draw it
with `render.DrawShader`.

The shader is compiled in the background, so it is not ready at once. Until it is ready,
drawing it draws nothing.

A script can keep at most 32 shaders. A shader that failed to compile still counts toward
this limit until you release it. All shaders of a script are released when the script unloads.

<ApiMembers>
  <ApiMember kind="method" name="Shader:IsValid" summary="Returns `true` if the shader still exists. Returns `false` after `Release` is called." args="" sig="[{&#x22;s&#x22;:&#x22;Shader:IsValid&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="method" name="Shader:IsReady" summary="Returns `true` if the shader is compiled and can be drawn." args="" sig="[{&#x22;s&#x22;:&#x22;Shader:IsReady&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="method" name="Shader:GetError" summary="Returns the error message if the shader failed. Line numbers in the message are counted from the first line of the source that the script passed." args="" sig="[{&#x22;s&#x22;:&#x22;Shader:GetError&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;},{&#x22;s&#x22;:&#x22;: &#x22;},{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]" ret="[[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]">
    <ApiNotes>
      If the shader compiled but the graphics device could not create it, the message says so.
      Returns `nil` while the shader compiles and after it is created successfully.
    </ApiNotes>
  </ApiMember>

  <ApiMember kind="method" name="Shader:Release" summary="Releases the shader now, before the script unloads. If you draw the shader after this, it throws an error. Calling this function on a shader that is already released does nothing." args="" sig="[{&#x22;s&#x22;:&#x22;Shader:Release&#x22;},{&#x22;s&#x22;:&#x22;(&#x22;},{&#x22;s&#x22;:&#x22;)&#x22;}]" />
</ApiMembers>

## render.ShaderOptions<ApiTag label="object type" />

Options for `render.DrawShader`. If a field has the wrong type, `render.DrawShader` throws an
error.

<ApiMembers>
  <ApiMember kind="prop" name="render.ShaderOptions.blur" summary="How strongly `nl_backdrop` is blurred. `0` gives an almost sharp copy. Must be `0` or more. Defaults to `1`." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]" />

  <ApiMember kind="prop" name="render.ShaderOptions.color" summary="The vertex colour that the shader reads with `nl_vertex_color`. Defaults to opaque white." ret="[[{&#x22;s&#x22;:&#x22;Color&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/mathlib/color#color-1&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]" />

  <ApiMember kind="prop" name="render.ShaderOptions.image" summary="The image that the shader reads as `nl_image`." ret="[[{&#x22;s&#x22;:&#x22;Image&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#image&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]" />

  <ApiMember kind="prop" name="render.ShaderOptions.params" summary="Up to 64 numbers that the shader reads as `nl_params`. Missing numbers are `0`. More than 64 numbers, or a NaN or infinite number, throw an error." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;},{&#x22;s&#x22;:&#x22;[&#x22;},{&#x22;s&#x22;:&#x22;]&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]" />

  <ApiMember kind="prop" name="render.ShaderOptions.rounding" summary="The corner radius in pixels. The output of the shader is cut to these corners. Each radius is limited to half of the shorter side of the rectangle. A NaN or infinite number throws an error." ret="[[{&#x22;s&#x22;:&#x22;render.Rounding&#x22;,&#x22;k&#x22;:&#x22;class&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/rendering/render#render-Rounding&#x22;},{&#x22;s&#x22;:&#x22;?&#x22;}]]" />
</ApiMembers>

## Font<ApiTag label="object type" />

A font that you can use with `render.DrawText` and `render.MeasureText`.

Fonts load in the background. While a font is not loaded, `render.DrawText` draws nothing with
it and `render.MeasureText` returns `Vector2D(0, 0)`. Check `loaded` before you draw. The
`loaded` field is `false` both while the font is loading and after it failed. Use `failed` to
tell these two cases apart, for example to switch to another font.

A font family name can match several font files. The `file` and `face` fields tell you which
file and which face were chosen.

Only `size` can be changed. Assigning to any other field does nothing.

<ApiMembers>
  <ApiMember kind="prop" name="Font.face" summary="The index of the face inside the font file. A `.ttc` file holds several faces, and the named styles of a variable font also use this index. This field is read only." ret="[[{&#x22;s&#x22;:&#x22;integer&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#integer&#x22;}]]" />

  <ApiMember kind="prop" name="Font.failed" summary="Whether the font cannot load at its current size. This is `true` if the font name is not installed or if the size could not be loaded. Always `false` for a font from `render.EspFont`. A font file is checked when you load it, so a font loaded from a file does not fail later because the file cannot be read. This field is read only." ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="prop" name="Font.file" summary="The file name of the font file that was chosen, without its folder. For a font loaded from a file, this is the file name from the path that you passed. Empty for a font from `render.EspFont` and for a font that is not loaded yet. This field is read only." ret="[[{&#x22;s&#x22;:&#x22;string&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#string&#x22;}]]" />

  <ApiMember kind="prop" name="Font.loaded" summary="Whether the font is ready to draw. A new size is ready one frame or more after it is set. This field is read only." ret="[[{&#x22;s&#x22;:&#x22;boolean&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#boolean&#x22;}]]" />

  <ApiMember kind="prop" name="Font.size" summary="The font size in pixels. You can assign a new size from above `0` to `512`. Other values throw an error. Assigning a new size loads the font again and resets `failed`. For a font from `render.EspFont`, an assigned size is ignored." ret="[[{&#x22;s&#x22;:&#x22;number&#x22;,&#x22;k&#x22;:&#x22;prim&#x22;,&#x22;h&#x22;:&#x22;/cs2/api_reference/lua/base#number&#x22;}]]" />
</ApiMembers>
