> ## 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

> Crea un nuevo Drawing object del tipo solicitado y lo agrega a Real tracked Drawing object list. El type string debe ser uno de los nombres exactos admitidos: "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image". Los valores faltantes, non-string o type values no admitidos generan un Lua error. the Drawing API registra esta API solo cuando the required rendering environment is active es true; cuando esa comprobacion es false, el initializer vuelve antes de crear estos globals.

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

  ## Argumentos

  <ParamField path={"objectType"} type={"\"Image\" | \"Line\" | \"Text\" | \"Circle\" | \"Square\" | \"Quad\" | \"Triangle\""} required>
    Nombre exacto de Drawing type a crear. Los valores admitidos son "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image".
  </ParamField>

  ## Retornos

  <ResponseField name={"object"} type={"DrawingObject"}>
    Drawing object creado con Drawing object type.
  </ResponseField>

  ## Ejemplo

  Crea un cuadrado visible y configura sus propiedades básicas de dibujo.

  ```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>
