Skip to content

Commit c0417d9

Browse files
committed
Adding TRoundRect wrapper
1 parent d739bec commit c0417d9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Source/fmx/WrapFmxShapes.pas

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ TPyDelphiCaretRectangle = class(TPyDelphiRectangle)
4646
property DelphiObject: TCaretRectangle read GetDelphiObject write SetDelphiObject;
4747
end;
4848

49+
TPyDelphiRoundRect = class(TPyDelphiShape)
50+
private
51+
function GetDelphiObject: TRoundRect;
52+
procedure SetDelphiObject(const Value: TRoundRect);
53+
public
54+
class function DelphiObjectClass : TClass; override;
55+
// Properties
56+
property DelphiObject: TRoundRect read GetDelphiObject write SetDelphiObject;
57+
end;
58+
4959
implementation
5060

5161
uses
@@ -80,6 +90,7 @@ procedure TShapesRegistration.RegisterWrappers(
8090
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine);
8191
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRectangle);
8292
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCaretRectangle);
93+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRoundRect);
8394
end;
8495

8596
{ TPyDelphiShape }
@@ -150,6 +161,23 @@ procedure TPyDelphiCaretRectangle.SetDelphiObject(const Value: TCaretRectangle);
150161
inherited DelphiObject := Value;
151162
end;
152163

164+
{ TPyDelphiRoundRect }
165+
166+
class function TPyDelphiRoundRect.DelphiObjectClass: TClass;
167+
begin
168+
Result := TRoundRect;
169+
end;
170+
171+
function TPyDelphiRoundRect.GetDelphiObject: TRoundRect;
172+
begin
173+
Result := TRoundRect(inherited DelphiObject);
174+
end;
175+
176+
procedure TPyDelphiRoundRect.SetDelphiObject(const Value: TRoundRect);
177+
begin
178+
inherited DelphiObject := Value;
179+
end;
180+
153181
initialization
154182
RegisteredUnits.Add(TShapesRegistration.Create);
155183

0 commit comments

Comments
 (0)