FireMonkey

TLine、TEllipse、TCircle、TPie、TArc、TRectangle、TRoundRect、TCalloutRectangle

它们都是继承自 TShape 类, 共同拥有如下属性:
Fill            : TBrush;      //填充
Stroke          : TBrush;      //边线(画笔)
StrokeThickness : Single;      //厚度(边线宽度)
StrokeCap       : TStrokeCap;  //线帽样式, TStrokeCap (枚举)类型
StrokeDash      : TStrokeDash; //虚线样式, TStrokeDash(枚举)类型
StrokeJoin      : TStrokeJoin; //拐点结合样式, TStrokeJoin(枚举)类型
ShapeRect       : TRectF;      //可填充范围的矩形(相对于当前图形)

TLine 用不着 Fill, 但增加了 LineType 属性(TLineType 枚举类型);


procedure TForm1.Button1Click(Sender: TObject);
begin
  Line1.LineType := TLineType.ltDiagonal; //斜线
  Line2.LineType := TLineType.ltTop;      //横线
  Line3.LineType := TLineType.ltLeft;     //竖线
end;

TElipse 和 TCircle 没有新属性, 应该也用不着 StrokeCap、StrokeJoin.


procedure TForm1.Button1Click(Sender: TObject);
begin
  Ellipse1.StrokeDash := TStrokeDash.sdDot; //虚线样式
  Circle1.Fill.Kind := TBrushKind.bkNone;   //取消填充
end;

TArc 和 TPie 增加了 StartAngle、EndAngle 属性.



TRectangle 增加了控制圆角的 XRadius、YRadius 属性、控制边线的 Sides 属性、控制四个角的 Corners、CornerType 属性;
TRoundRect 只加了 Corners 属性; 看来要做更随意的圆角矩形得用 TRectangle 而不是 TRoundRect.

 TFmxObject = class(TComponent, IFreeNotification, IActionClient)

  property Parent: TFmxObject read FParent write SetParent; //说明所有FmxObject对象都可以做为容器。

end;  
原文地址:https://www.cnblogs.com/khzide/p/4489121.html