> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Drawing.new

> Tworzy nowe Drawing object zadanego typu i dodaje je do Real tracked Drawing object list. type string musi byc jedna z dokladnie obslugiwanych nazw: "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image". Brakujace wartosci, non-string lub nieobslugiwane type values powoduja Lua error. the Drawing API rejestruje te API tylko wtedy, gdy the required rendering environment is active ma wartosc true; gdy ten check ma wartosc false, initializer wraca przed utworzeniem tych globals.

<div className="real-function-page">
  ```lua theme={null}
  Drawing.new(objectType: "Image" | "Line" | "Text" | "Circle" | "Square" | "Quad" | "Triangle"): DrawingObject
  ```

  ## Argumenty

  <ParamField path={"objectType"} type={"\"Image\" | \"Line\" | \"Text\" | \"Circle\" | \"Square\" | \"Quad\" | \"Triangle\""} required>
    Dokladna nazwa Drawing type do utworzenia. Obslugiwane wartosci to "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image".
  </ParamField>

  ## Zwroty

  <ResponseField name={"object"} type={"DrawingObject"}>
    Utworzone Drawing object z Drawing object type.
  </ResponseField>

  ## Przykład

  Utwórz widoczny kwadrat i skonfiguruj jego podstawowe właściwości rysunku.

  ```lua theme={null}
  local square = Drawing.new("Square")
  square.Position = Vector2.new(120, 120)
  square.Size = Vector2.new(220, 120)
  square.Color = Color3.fromRGB(120, 170, 255)
  square.Filled = true
  square.Visible = true
  ```
</div>
