> For the complete documentation index, see [llms.txt](https://ditoland-utplus.gitbook.io/ditoland/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/image.md).

# Image

## Image

클라이언트에서 사용되는 Widget Image 객체.

### **속성**

<br>

| **ImageID** |
| ----------- |

이미지에 설정된 아이디 값이에요.

\-- 샘플 --

```lua
local Image = Workspace.ScreenUI.Image
local ResourceID = 6800

Image.ImageID = ResourceID
```

<br>

| **ImageDrawType** |
| ----------------- |

이미지의 DrawType을 설정하고 얻을 수 있어요 (None, Tile, Slice, Border).

\-- 샘플 --

```lua
local image = Workspace.ScreenUI.Image

image.ImageDrawType = Enum.ImageDrawType.Image
```

<br>

| **ImageSliceLeftRight** |
| ----------------------- |

이미지의 DrawType이 Slice, Border일 때의 Slice 좌우영역(각각 0부터 1사이)을 정하고 얻을 수 있어요(Left, Right).

\-- 샘플 --

```lua
local image = Workspace.ScreenUI.Image

image.ImageDrawType = Enum.ImageDrawType.Slice
image.SliceLeftRight = Vector.new(0.5, 0.5, 0) --X : 좌 / Y : 우
```

<br>

| **ImageSliceTopBottm** |
| ---------------------- |

이미지의 DrawType이 Slice, Border일 때의 Slice 좌우영역(각각 0부터 1사이)을 정하고 얻을 수 있어요(Top, Bottom).

\-- 샘플 --

```lua
local image = Workspace.ScreenUI.Image

image.ImageDrawType = Enum.ImageDrawType.Slice
image.SliceTopBottom = Vector.new(0.5, 0.5, 0) --X : 상 / Y : 하
```

<br>

| **ImageTiling** |
| --------------- |

이미지의 DrawType이 Tile일 때의 옵션값을 설정하고 얻을 수 있어요 (NoTile, Horizontal, Vertical, Both)

\-- 샘플 --

```lua
local image = Workspace.ScreenUI.Image

image.ImageDrawType = Enum.ImageDrawType.Image
image.ImageTiling = Enum.ImageTilingType.Both
```

### **함수**

<br>

| **void SetBackgroundColor(Color color)** |
| ---------------------------------------- |

이미지 위젯의 배경 색을 설정할 수 있어요. (변경할 색)

\-- 샘플 --

```lua
local image = Workspace.ScreenUI.Image
image:SetBackgroundColor(Color.new(0, 0, 255, 255))
```

<br>

| **Color GetBackgroundColor()** |
| ------------------------------ |

이미지 위젯의 배경 색을 가져올 수 있어요.

\-- 샘플 --

```lua
local image = Workspace.ScreenUI.Image
print(image:GetBackgroundColor())
```

<br>

| **void SetImage(number ImageID)** |
| --------------------------------- |

(deprecated) 키값으로 이미지를 설정 할 수 있어요.

<br>

| **Vector GetNativeSize()** |
| -------------------------- |

이미지의 원본 크기를 얻을 수 있습니다.

\-- 샘플 --

```lua
local Image = Workspace.ScreenUI.Image
local ImageNativeSize = Image:GetNativeSize()
```

<br>

| **void SetNativeSize()** |
| ------------------------ |

이미지를 원본 크기로 되돌립니다.

\-- 샘플 --

```lua
local Image = Workspace.ScreenUI.Image
Image:SetNativeSize()
```

<br>

| **void SetImageUrl\_OtherPlatform()** |
| ------------------------------------- |

image:SetImageUrl\_OtherPlatform(download url)

\ <br>

## **사용 가능한 부모 오브젝트 기능들**

### **속성**

| **이름**                                                                                         | **설명**                                   |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------- |
| [**Location**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)    | **위젯의 위치를 변경할 수 있어요. (X좌표 값, Y좌표 값, 0)** |
| [**Rotation**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)    | **위젯의 회전을 설정할 수 있어요. (설정할 값)**           |
| [**Scale**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)       | **위젯의 스케일을 설정할 수 있어요. (설정할 값)**          |
| [**Size**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)        | **위젯의 크기를 설정할 수 있어요. (가로값, 세로값, 0)**     |
| [**ZOrder**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)      | **위젯의 그리는 순서를 설정할 수 있어요.**               |
| [**Visible**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)     | **UI 위젯의 표시 여부를 설정할 수 있어요. (위젯 표시 여부)**  |
| [**Interaction**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase) | **UI 위젯의 반응 여부를 설정할 수 있어요. (위젯 반응 여부)**  |
| [**Opacity**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)     | **위젯의 투명 값을 설정할 수 있어요. (설정할 값)**         |
| [**AnchorType**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)  | **위젯의 고정 여부를 설정할 수 있어요. (설정할 타입)**       |
| [**IsFill**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)      | **위젯의 채우기를 설정할 수 있어요.**                  |

### **이벤트**

| **이름**                                                                                               | **설명**                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**OnVisibleEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)    | <p><strong>widget이 보여질 때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function(widget), widget 은 보여지는 widget 객체 입니다.</strong></p>                                                            |
| [**OnInVisibleEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)  | <p><strong>widget이 안 보여질 때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function(widget), widget 은 안 보여지는 widget 객체 입니다.</strong></p>                                                        |
| [**OnBeginDragEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)  | <p><strong>widget의 드래그가 시작 될 때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function(widget, vector2D), widget은 클릭한 객체, vector2D는 마우스 위치에요.</strong></p>                                     |
| [**OnCancelDragEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase) | <p><strong>widget의 드래그가 취소될 때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function(widget, vector2D), widget은 클릭한 객체, vector2D는 마우스 위치에요.</strong></p>                                      |
| [**OnEndDragEvent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)    | <p><strong>widget의 드래그가 드랍될 때 호출되는 이벤트에요.</strong><br><strong>연결함수 형식은 function(widget, vector2D, dragwidget), widget은 드랍한 객체, vector2D는 마우스 위치, dragwidget는 드래그한 widget에요.</strong></p> |

### **함수**

| **이름**                                                                                             | **설명**                                        |
| -------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| [**AddChildUIScene**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase) | **(deprecate) AddChildUIWidget 함수로 이용하세요.**   |
| [**AddChildWidget**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)  | **자식 UI 위젯을 추가할 수 있어요. (자식으로 추가할 UI 위젯)**     |
| [**SetParentWidget**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase) | **부모 UI 위젯을 설정할 수 있어요. (부모로 설정할 UI 위젯)**      |
| [**Delete**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)          | **위젯을 제거할 수 있어요.**                            |
| [**GetTypeString**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)   | **위젯의 타입을 문자열로 얻을 수 있어요.**                    |
| [**GetType**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)         | **위젯의 타입을 Enum 형식으로 얻을 수 있어요.**               |
| [**SetDragWidget**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)   | **위젯의 DragEvent 발생 시 복사되어 보여질 widget을 세팅해요.** |
| [**SetDragOffset**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/widgetbase)   | **위젯의 DragWidget에 적용될 Offset 이에요.**           |
