Skip to content

Commit e7be7fc

Browse files
committed
Adding TPath wrapper
1 parent 18dff6c commit e7be7fc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Source/fmx/WrapFmxShapes.pas

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ TPyDelphiCustomPath = class(TPyDelphiShape)
110110
property DelphiObject: TCustomPath read GetDelphiObject write SetDelphiObject;
111111
end;
112112

113+
TPyDelphiPath = class(TPyDelphiCustomPath)
114+
function GetDelphiObject: TPath;
115+
procedure SetDelphiObject(const Value: TPath);
116+
public
117+
class function DelphiObjectClass : TClass; override;
118+
// Properties
119+
property DelphiObject: TPath read GetDelphiObject write SetDelphiObject;
120+
end;
121+
113122
implementation
114123

115124
uses
@@ -151,6 +160,7 @@ procedure TShapesRegistration.RegisterWrappers(
151160
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPie);
152161
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiArc);
153162
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomPath);
163+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiPath);
154164
end;
155165

156166
{ TPyDelphiShape }
@@ -341,6 +351,23 @@ procedure TPyDelphiCustomPath.SetDelphiObject(const Value: TCustomPath);
341351
inherited DelphiObject := Value;
342352
end;
343353

354+
{ TPyDelphiPath }
355+
356+
class function TPyDelphiPath.DelphiObjectClass: TClass;
357+
begin
358+
Result := TPath
359+
end;
360+
361+
function TPyDelphiPath.GetDelphiObject: TPath;
362+
begin
363+
Result := TPath(inherited DelphiObject);
364+
end;
365+
366+
procedure TPyDelphiPath.SetDelphiObject(const Value: TPath);
367+
begin
368+
inherited DelphiObject := Value;
369+
end;
370+
344371
initialization
345372
RegisteredUnits.Add(TShapesRegistration.Create);
346373

0 commit comments

Comments
 (0)