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

> Создает новый Drawing object запрошенного типа и добавляет его в Real tracked Drawing object list. type string должен быть одним из точных поддерживаемых имен: "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image". Отсутствующие, non-string или неподдерживаемые type values вызывают Lua error. the Drawing API регистрирует эту API только когда the required rendering environment is active имеет значение true; если эта проверка false, initializer возвращается до создания этих globals.

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

  ## Аргументы

  <ParamField path={"objectType"} type={"\"Image\" | \"Line\" | \"Text\" | \"Circle\" | \"Square\" | \"Quad\" | \"Triangle\""} required>
    Точное имя Drawing type для создания. Поддерживаемые значения: "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image".
  </ParamField>

  ## Возвраты

  <ResponseField name={"object"} type={"DrawingObject"}>
    Созданный Drawing object с Drawing object type.
  </ResponseField>

  ## Пример

  Создайте видимый квадрат и настройте его основные свойства рисования.

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