Shape
命名空间:FairyGUI
源码:Assets/Scripts/Core/Shape.cs (行 9)
public class Shape : DisplayObject
继承:EventDispatcher → DisplayObject → Shape
继承成员
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
构造函数
Shape()
public Shape();
源码:Core/Shape.cs (行 14)
方法
Clear()
public void Clear();
源码:Core/Shape.cs (行 221)
DrawEllipse(Color)
public void DrawEllipse(Color fillColor);
| 参数 | 类型 | 说明 |
|---|---|---|
fillColor | Color |
源码:Core/Shape.cs (行 100)
DrawEllipse(float, Color, Color, Color, float, float)
public void DrawEllipse(float lineSize, Color centerColor, Color lineColor, Color fillColor, float startDegree, float endDegree);
| 参数 | 类型 | 说明 |
|---|---|---|
lineSize | float | |
centerColor | Color | |
lineColor | Color | |
fillColor | Color | |
startDegree | float | |
endDegree | float |
源码:Core/Shape.cs (行 122)
DrawPolygon(IList<Vector2>, Color)
public void DrawPolygon(IList<Vector2> points, Color fillColor);
| 参数 | 类型 | 说明 |
|---|---|---|
points | IList<Vector2> | |
fillColor | Color |
源码:Core/Shape.cs (行 144)
DrawPolygon(IList<Vector2>, Color, float, Color)
public void DrawPolygon(IList<Vector2> points, Color fillColor, float lineSize, Color lineColor);
| 参数 | 类型 | 说明 |
|---|---|---|
points | IList<Vector2> | |
fillColor | Color | |
lineSize | float | |
lineColor | Color |
源码:Core/Shape.cs (行 179)
DrawPolygon(IList<Vector2>, Color32[])
public void DrawPolygon(IList<Vector2> points, Color32[] colors);
| 参数 | 类型 | 说明 |
|---|---|---|
points | IList<Vector2> | |
colors | Color32[] |
源码:Core/Shape.cs (行 161)
DrawRect(float, Color, Color)
public void DrawRect(float lineSize, Color lineColor, Color fillColor);
| 参数 | 类型 | 说明 |
|---|---|---|
lineSize | float | |
lineColor | Color | |
fillColor | Color |
源码:Core/Shape.cs (行 44)
DrawRect(float, Color32[])
public void DrawRect(float lineSize, Color32[] colors);
| 参数 | 类型 | 说明 |
|---|---|---|
lineSize | float | |
colors | Color32[] |
源码:Core/Shape.cs (行 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);
| 参数 | 类型 | 说明 |
|---|---|---|
sides | int | |
lineSize | float | |
centerColor | Color? | |
lineColor | Color | |
fillColor | Color | |
rotation | float | |
distances | float[] |
源码:Core/Shape.cs (行 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);
| 参数 | 类型 | 说明 |
|---|---|---|
lineSize | float | |
lineColor | Color | |
fillColor | Color | |
topLeftRadius | float | |
topRightRadius | float | |
bottomLeftRadius | float | |
bottomRightRadius | float |
源码:Core/Shape.cs (行 80)
HitTest()
protected override DisplayObject HitTest();
源码:Core/Shape.cs (行 234)
属性
color
public Color color { get; set; }
源码:Core/Shape.cs (行 25)
isEmpty
public bool isEmpty { get; }
源码:Core/Shape.cs (行 229)