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