Shape
Namespace:FairyGUI
Source:Assets/Scripts/Core/Shape.cs (line 9)
public class Shape : DisplayObject
Inheritance:EventDispatcher → DisplayObject → Shape
Inherited members
onPaint, _contentRect, _flags, _paintingInfo, _paintingMode, _vertexMatrix, gOwner, id, name, AddToBatch, CreateGameObject, DestroyGameObject, Dispose, EnsureSizeCorrect, EnterPaintingMode, GetBounds, GetScreenShot, GlobalToLocal, InvalidateBatchingState, LeavePaintingMode, LocalToGlobal, LocalToWorld, OnSizeChanged, RemoveFromParent, SetGameObject, SetLayer, SetPosition, SetRenderingOrder, SetScale, SetSize, SetXY, TransformPoint, TransformRect, TransformRectPoint, Update, WorldToLocal, alpha, blendMode, cacheAsBitmap, cachedTransform, cursor, filter, focalLength, focusable, focused, gameObject, graphics, grayed, height, home, isDisposed, layer, location, material, onAddedToStage, onClickLink, onClick, onFocusIn, onFocusOut, onKeyDown, onMouseWheel, onRemovedFromStage, onRightClick, onRollOut, onRollOver, onTouchBegin, onTouchEnd, onTouchMove, paintingGraphics, paintingMode, parent, perspective, pivot, pixelPerfect, position, renderingOrder, rotationX, rotationY, rotation, scaleX, scaleY, scale, shader, size, skew, stage, tabStop, topmost, touchDisabled, touchable, visible, width, worldSpaceContainer, xy, x, y, z
AddCapture, AddEventListener, BroadcastEvent, BubbleEvent, DispatchEvent, RemoveCapture, RemoveEventListener, RemoveEventListeners, hasEventListeners, isDispatching
Constructors
Shape()
public Shape();
Source:Core/Shape.cs (line 14)
Methods
Clear()
public void Clear();
Source:Core/Shape.cs (line 221)
DrawEllipse(Color)
public void DrawEllipse(Color fillColor);
| Parameter | Type | Description |
|---|---|---|
fillColor | Color |
Source:Core/Shape.cs (line 100)
DrawEllipse(float, Color, Color, Color, float, float)
public void DrawEllipse(float lineSize, Color centerColor, Color lineColor, Color fillColor, float startDegree, float endDegree);
| Parameter | Type | Description |
|---|---|---|
lineSize | float | |
centerColor | Color | |
lineColor | Color | |
fillColor | Color | |
startDegree | float | |
endDegree | float |
Source:Core/Shape.cs (line 122)
DrawPolygon(IList<Vector2>, Color)
public void DrawPolygon(IList<Vector2> points, Color fillColor);
| Parameter | Type | Description |
|---|---|---|
points | IList<Vector2> | |
fillColor | Color |
Source:Core/Shape.cs (line 144)
DrawPolygon(IList<Vector2>, Color, float, Color)
public void DrawPolygon(IList<Vector2> points, Color fillColor, float lineSize, Color lineColor);
| Parameter | Type | Description |
|---|---|---|
points | IList<Vector2> | |
fillColor | Color | |
lineSize | float | |
lineColor | Color |
Source:Core/Shape.cs (line 179)
DrawPolygon(IList<Vector2>, Color32[])
public void DrawPolygon(IList<Vector2> points, Color32[] colors);
| Parameter | Type | Description |
|---|---|---|
points | IList<Vector2> | |
colors | Color32[] |
Source:Core/Shape.cs (line 161)
DrawRect(float, Color, Color)
public void DrawRect(float lineSize, Color lineColor, Color fillColor);
| Parameter | Type | Description |
|---|---|---|
lineSize | float | |
lineColor | Color | |
fillColor | Color |
Source:Core/Shape.cs (line 44)
DrawRect(float, Color32[])
public void DrawRect(float lineSize, Color32[] colors);
| Parameter | Type | Description |
|---|---|---|
lineSize | float | |
colors | Color32[] |
Source:Core/Shape.cs (line 61)
DrawRegularPolygon(int, float, Color?, Color, Color, float, float[])
public void DrawRegularPolygon(int sides, float lineSize, Color? centerColor, Color lineColor, Color fillColor, float rotation, float[] distances);
| Parameter | Type | Description |
|---|---|---|
sides | int | |
lineSize | float | |
centerColor | Color? | |
lineColor | Color | |
fillColor | Color | |
rotation | float | |
distances | float[] |
Source:Core/Shape.cs (line 203)
DrawRoundRect(float, Color, Color, float, float, float, float)
public void DrawRoundRect(float lineSize, Color lineColor, Color fillColor, float topLeftRadius, float topRightRadius, float bottomLeftRadius, float bottomRightRadius);
| Parameter | Type | Description |
|---|---|---|
lineSize | float | |
lineColor | Color | |
fillColor | Color | |
topLeftRadius | float | |
topRightRadius | float | |
bottomLeftRadius | float | |
bottomRightRadius | float |
Source:Core/Shape.cs (line 80)
HitTest()
protected override DisplayObject HitTest();
Source:Core/Shape.cs (line 234)
Properties
color
public Color color { get; set; }
Source:Core/Shape.cs (line 25)
isEmpty
public bool isEmpty { get; }
Source:Core/Shape.cs (line 229)