Skip to content

Commit 1d524ee

Browse files
committed
Adding TImage wrapper
1 parent a018711 commit 1d524ee

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

Source/fmx/WrapFmxShapes.pas

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ TPyDelphiText = class(TPyDelphiControl)
128128
property DelphiObject: TText read GetDelphiObject write SetDelphiObject;
129129
end;
130130

131+
TPyDelphiImage = class(TPyDelphiControl)
132+
function GetDelphiObject: TImage;
133+
procedure SetDelphiObject(const Value: TImage);
134+
public
135+
class function DelphiObjectClass : TClass; override;
136+
// Properties
137+
property DelphiObject: TImage read GetDelphiObject write SetDelphiObject;
138+
end;
139+
131140
implementation
132141

133142
uses
@@ -331,7 +340,7 @@ procedure TPyDelphiPie.SetDelphiObject(const Value: TPie);
331340

332341
class function TPyDelphiArc.DelphiObjectClass: TClass;
333342
begin
334-
Result := TArc
343+
Result := TArc;
335344
end;
336345

337346
function TPyDelphiArc.GetDelphiObject: TArc;
@@ -348,7 +357,7 @@ procedure TPyDelphiArc.SetDelphiObject(const Value: TArc);
348357

349358
class function TPyDelphiCustomPath.DelphiObjectClass: TClass;
350359
begin
351-
Result := TCustomPath
360+
Result := TCustomPath;
352361
end;
353362

354363
function TPyDelphiCustomPath.GetDelphiObject: TCustomPath;
@@ -365,7 +374,7 @@ procedure TPyDelphiCustomPath.SetDelphiObject(const Value: TCustomPath);
365374

366375
class function TPyDelphiPath.DelphiObjectClass: TClass;
367376
begin
368-
Result := TPath
377+
Result := TPath;
369378
end;
370379

371380
function TPyDelphiPath.GetDelphiObject: TPath;
@@ -382,7 +391,7 @@ procedure TPyDelphiPath.SetDelphiObject(const Value: TPath);
382391

383392
class function TPyDelphiText.DelphiObjectClass: TClass;
384393
begin
385-
Result := TText
394+
Result := TText;
386395
end;
387396

388397
function TPyDelphiText.GetDelphiObject: TText;
@@ -395,6 +404,23 @@ procedure TPyDelphiText.SetDelphiObject(const Value: TText);
395404
inherited DelphiObject := Value;
396405
end;
397406

407+
{ TPyDelphiImage }
408+
409+
class function TPyDelphiImage.DelphiObjectClass: TClass;
410+
begin
411+
Result := TImage;
412+
end;
413+
414+
function TPyDelphiImage.GetDelphiObject: TImage;
415+
begin
416+
Result := TImage(inherited DelphiObject);
417+
end;
418+
419+
procedure TPyDelphiImage.SetDelphiObject(const Value: TImage);
420+
begin
421+
inherited DelphiObject := Value;
422+
end;
423+
398424
initialization
399425
RegisteredUnits.Add(TShapesRegistration.Create);
400426

0 commit comments

Comments
 (0)