File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ TPyDelphiLine = class(TPyDelphiShape)
2626 property DelphiObject: TLine read GetDelphiObject write SetDelphiObject;
2727 end ;
2828
29+ TPyDelphiRectangle = class (TPyDelphiShape)
30+ private
31+ function GetDelphiObject : TRectangle;
32+ procedure SetDelphiObject (const Value : TRectangle);
33+ public
34+ class function DelphiObjectClass : TClass; override;
35+ // Properties
36+ property DelphiObject: TRectangle read GetDelphiObject write SetDelphiObject;
37+ end ;
38+
2939implementation
3040
3141uses
@@ -58,6 +68,7 @@ procedure TShapesRegistration.RegisterWrappers(
5868 inherited ;
5969 APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiShape);
6070 APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiLine);
71+ APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRectangle);
6172end ;
6273
6374{ TPyDelphiShape }
@@ -94,6 +105,23 @@ procedure TPyDelphiLine.SetDelphiObject(const Value: TLine);
94105 inherited DelphiObject := Value ;
95106end ;
96107
108+ { TPyDelphiRectangle }
109+
110+ class function TPyDelphiRectangle.DelphiObjectClass : TClass;
111+ begin
112+ Result := TRectangle;
113+ end ;
114+
115+ function TPyDelphiRectangle.GetDelphiObject : TRectangle;
116+ begin
117+ Result := TRectangle(inherited DelphiObject);
118+ end ;
119+
120+ procedure TPyDelphiRectangle.SetDelphiObject (const Value : TRectangle);
121+ begin
122+ inherited DelphiObject := Value ;
123+ end ;
124+
97125initialization
98126 RegisteredUnits.Add(TShapesRegistration.Create);
99127
You can’t perform that action at this time.
0 commit comments