Skip to content

Commit

Permalink
ExternalImage type, for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Sep 14, 2023
1 parent 64500c9 commit 8be0cb4
Show file tree
Hide file tree
Showing 7 changed files with 1,219 additions and 28 deletions.
15 changes: 2 additions & 13 deletions Source/script/imports/simbaclasses/simba.import_class_image.pas
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,9 @@ procedure _LapeImage_LoadFromFileEx(const Params: PParamArray); LAPE_WRAPPER_CAL
(*
TImage.DrawATPA
~~~~~~~~~~~~~~~
> procedure TImage.DrawATPA(ATPA: T2DPointArray);
> procedure TImage.DrawATPA(ATPA: T2DPointArray; Color: TColor = -1);
*)
procedure _LapeImage_DrawATPA(const Params: PParamArray); LAPE_WRAPPER_CALLING_CONV
begin
PSimbaImage(Params^[0])^.DrawATPA(P2DPointArray(Params^[1])^);
end;

(*
TImage.DrawATPA
~~~~~~~~~~~~~~~
> procedure TImage.DrawATPA(ATPA: T2DPointArray; Color: TColor);
*)
procedure _LapeImage_DrawATPAEx(const Params: PParamArray); LAPE_WRAPPER_CALLING_CONV
begin
PSimbaImage(Params^[0])^.DrawATPA(P2DPointArray(Params^[1])^, PColor(Params^[2])^);
end;
Expand Down Expand Up @@ -1323,8 +1313,7 @@ procedure ImportSimbaImage(Compiler: TSimbaScript_Compiler);
addGlobalFunc('procedure TImage.DrawText(Text: String; Box: TBox; Center: Boolean; Color: TColor); overload', @_LapeImage_DrawTextEx);
addGlobalFunc('procedure TImage.DrawTextLines(Text: TStringArray; Position: TPoint; Color: TColor);', @_LapeImage_DrawTextLines);

addGlobalFunc('procedure TImage.DrawATPA(ATPA: T2DPointArray); overload', @_LapeImage_DrawATPA);
addGlobalFunc('procedure TImage.DrawATPA(ATPA: T2DPointArray; Color: TColor); overload', @_LapeImage_DrawATPAEx);
addGlobalFunc('procedure TImage.DrawATPA(ATPA: T2DPointArray; Color: TColor)', @_LapeImage_DrawATPA);
addGlobalFunc('procedure TImage.DrawTPA(TPA: TPointArray; Color: TColor);', @_LapeImage_DrawTPA);

addGlobalFunc('procedure TImage.DrawCrosshairs(ACenter: TPoint; Size: Integer; Thickness: Integer; Color: TColor);', @_LapeImage_DrawCrosshairs);
Expand Down
Loading

0 comments on commit 8be0cb4

Please sign in to comment.