mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 01:02:17 -05:00
Added TPicture, and made this a property at the TImage.
This commit is contained in:
parent
9686a4cd86
commit
62bfea8be2
@ -688,6 +688,7 @@ begin
|
||||
RegisterMethod('procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);');
|
||||
RegisterMethod('function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap;');
|
||||
RegisterMethod('function ToString : string;');
|
||||
RegisterMethod('function ToTBitmap : TBitmap;');
|
||||
RegisterMethod('function CreateTMask : TMask;');
|
||||
RegisterMethod('constructor create');
|
||||
RegisterMethod('procedure Free');
|
||||
@ -815,6 +816,7 @@ begin;
|
||||
PSClass :=cl.Add(TMufasaBitmap);
|
||||
with PSClass do
|
||||
begin
|
||||
RegisterMethod(@TMufasaBitmap.ToTBitmap,'ToTBitmap');
|
||||
RegisterMethod(@TMufasaBitmap.SetSize,'SETSIZE');
|
||||
RegisterMethod(@TMufasaBitmap.StretchResize,'STRETCHRESIZE');
|
||||
RegisterMethod(@TMufasaBitmap.FastSetPixel,'FASTSETPIXEL');
|
||||
|
@ -16,6 +16,7 @@ procedure SIRegisterTBRUSH(Cl: TPSPascalCompiler);
|
||||
procedure SIRegisterTCanvas(cl: TPSPascalCompiler);
|
||||
procedure SIRegisterTGraphic(CL: TPSPascalCompiler);
|
||||
procedure SIRegisterTBitmap(CL: TPSPascalCompiler; Streams: Boolean);
|
||||
procedure SIRegisterTPicture(CL: TPSPascalCompiler);
|
||||
|
||||
procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
|
||||
|
||||
@ -258,6 +259,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SIRegisterTPicture(CL: TPSPascalCompiler);
|
||||
begin
|
||||
with TPSCompileTimeClass(CL.AddClassN(CL.FindClass('TPersistent'),'TPicture')) do
|
||||
begin
|
||||
RegisterProperty('Bitmap','TBitmap',iptrw);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
|
||||
begin
|
||||
SIRegister_Graphics_TypesAndConsts(Cl);
|
||||
@ -268,6 +277,7 @@ begin
|
||||
SIRegisterTCanvas(cl);
|
||||
SIRegisterTGraphic(Cl);
|
||||
SIRegisterTBitmap(Cl, Streams);
|
||||
SIRegisterTPicture(cl);
|
||||
end;
|
||||
|
||||
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
|
||||
|
@ -44,12 +44,15 @@ begin
|
||||
end;
|
||||
|
||||
procedure TIMAGECANVAS_R(Self: TIMAGE; var T: TCANVAS); begin T := Self.CANVAS; end;
|
||||
procedure TIMAGEPICTURE_R(Self: TIMAGE; var T: TPicture); begin T := Self.Picture; end;
|
||||
procedure TIMAGEPICTURE_W(Self: TIMAGE; const T: TPicture); begin Self.Picture := t; end;
|
||||
|
||||
procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter);
|
||||
begin
|
||||
with Cl.Add(TIMAGE) do
|
||||
begin
|
||||
RegisterPropertyHelper(@TIMAGECANVAS_R, nil, 'CANVAS');
|
||||
RegisterPropertyHelper(@TIMAGEPICTURE_R,@TIMAGEPICTURE_W,'PICTURE');
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -14,6 +14,7 @@ procedure RIRegisterTBRUSH(Cl: TPSRuntimeClassImporter);
|
||||
procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter);
|
||||
procedure RIRegisterTGraphic(CL: TPSRuntimeClassImporter);
|
||||
procedure RIRegisterTBitmap(CL: TPSRuntimeClassImporter; Streams: Boolean);
|
||||
procedure RIRegisterTPicture(CL: TPSRuntimeClassImporter);
|
||||
|
||||
procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
|
||||
|
||||
@ -203,6 +204,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPictureBitmap_W(Self: TPicture; const T: TBitmap); begin Self.Bitmap := T; end;
|
||||
procedure TPictureBitmap_R(Self: TPicture; var T: TBitmap); begin T := Self.Bitmap; end;
|
||||
procedure RIRegisterTPicture(CL: TPSRuntimeClassImporter);
|
||||
begin
|
||||
with TPSRuntimeClass(CL.Add(TPicture)) do
|
||||
registerPropertyHelper(@TPictureBitmap_R,@TPictureBitmap_W,'Bitmap');
|
||||
end;
|
||||
|
||||
procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
|
||||
begin
|
||||
RIRegisterTGRAPHICSOBJECT(cl);
|
||||
@ -212,6 +221,7 @@ begin
|
||||
RIRegisterTBRUSH(cl);
|
||||
RIRegisterTGraphic(CL);
|
||||
RIRegisterTBitmap(CL, Streams);
|
||||
RIRegisterTPicture(CL);
|
||||
end;
|
||||
|
||||
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
|
||||
|
Loading…
Reference in New Issue
Block a user