# UIGraphic Graphic component

# Overview

UIGraphic is the basic graphic rendering component, specifically the ability to draw pure-color graphics of rectangle and circle.

# Graphics rendering type

Graphics rendering and size attributes will use different rules according to the type of shape.

# In Rect Mode

At this time, the graphics are rendered according to the Transform2D size and anchor position of the node where the UIGraphic component is located.

# Circle mode

At this time, the graphics are rendered according to the radius, angle, and section inside the UIGraphic component.

# Static attribute description

Properties Functions
Shape UIGraphic's graphic type enumeration value
// engine.UIGraphic.Shape
enum Shape {
  Rect = 0,
  Circle = 1,
}

# Property description

Property name Type Default value Description
shape Shape Shape.Rect UIGraphic image type
radius number 100 The radius of the circle, only valid in Circle mode
angle number 100 The angle of the circle, only valid in Circle mode
section number 64 The number of sections of the circle, valid only in Circle mode