> ## 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는 the required rendering environment is active가 true일 때만 이 API를 등록합니다. 이 검사가 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 name입니다. 지원되는 값은 "Line", "Text", "Circle", "Square", "Quad", "Triangle", "Image"입니다.
  </ParamField>

  ## 반환값

  <ResponseField name={"object"} type={"DrawingObject"}>
    Drawing object type이 있는 생성된 Drawing object입니다.
  </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>
