Skip to content

Commit f3e842a

Browse files
committed
Adding TEllipse wrapper
1 parent e24cb88 commit f3e842a

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

Source/fmx/WrapFmxShapes.pas

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ TPyDelphiCalloutRectangle = class(TPyDelphiRectangle)
6565
property DelphiObject: TCalloutRectangle read GetDelphiObject write SetDelphiObject;
6666
end;
6767

68+
TPyDelphiEllipse = class(TPyDelphiShape)
69+
function GetDelphiObject: TEllipse;
70+
procedure SetDelphiObject(const Value: TEllipse);
71+
public
72+
class function DelphiObjectClass : TClass; override;
73+
// Properties
74+
property DelphiObject: TEllipse read GetDelphiObject write SetDelphiObject;
75+
end;
76+
6877
implementation
6978

7079
uses
@@ -101,6 +110,7 @@ procedure TShapesRegistration.RegisterWrappers(
101110
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCaretRectangle);
102111
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiRoundRect);
103112
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCalloutRectangle);
113+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiEllipse);
104114
end;
105115

106116
{ TPyDelphiShape }
@@ -158,7 +168,7 @@ procedure TPyDelphiRectangle.SetDelphiObject(const Value: TRectangle);
158168

159169
class function TPyDelphiCaretRectangle.DelphiObjectClass: TClass;
160170
begin
161-
Result := TCaretRectangle;
171+
Result := TCaretRectangle;
162172
end;
163173

164174
function TPyDelphiCaretRectangle.GetDelphiObject: TCaretRectangle;
@@ -175,7 +185,7 @@ procedure TPyDelphiCaretRectangle.SetDelphiObject(const Value: TCaretRectangle);
175185

176186
class function TPyDelphiRoundRect.DelphiObjectClass: TClass;
177187
begin
178-
Result := TRoundRect;
188+
Result := TRoundRect;
179189
end;
180190

181191
function TPyDelphiRoundRect.GetDelphiObject: TRoundRect;
@@ -192,7 +202,7 @@ procedure TPyDelphiRoundRect.SetDelphiObject(const Value: TRoundRect);
192202

193203
class function TPyDelphiCalloutRectangle.DelphiObjectClass: TClass;
194204
begin
195-
Result := TCalloutRectangle;
205+
Result := TCalloutRectangle;
196206
end;
197207

198208
function TPyDelphiCalloutRectangle.GetDelphiObject: TCalloutRectangle;
@@ -206,6 +216,23 @@ procedure TPyDelphiCalloutRectangle.SetDelphiObject(
206216
inherited DelphiObject := Value;
207217
end;
208218

219+
{ TPyDelphiEllipse }
220+
221+
class function TPyDelphiEllipse.DelphiObjectClass: TClass;
222+
begin
223+
Result := TEllipse;
224+
end;
225+
226+
function TPyDelphiEllipse.GetDelphiObject: TEllipse;
227+
begin
228+
Result := TEllipse(inherited DelphiObject);
229+
end;
230+
231+
procedure TPyDelphiEllipse.SetDelphiObject(const Value: TEllipse);
232+
begin
233+
inherited DelphiObject := Value;
234+
end;
235+
209236
initialization
210237
RegisteredUnits.Add(TShapesRegistration.Create);
211238

0 commit comments

Comments
 (0)