> ## 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 غير مدعوم ترفع 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>
