mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -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('procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);');
|
||||||
RegisterMethod('function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap;');
|
RegisterMethod('function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap;');
|
||||||
RegisterMethod('function ToString : string;');
|
RegisterMethod('function ToString : string;');
|
||||||
|
RegisterMethod('function ToTBitmap : TBitmap;');
|
||||||
RegisterMethod('function CreateTMask : TMask;');
|
RegisterMethod('function CreateTMask : TMask;');
|
||||||
RegisterMethod('constructor create');
|
RegisterMethod('constructor create');
|
||||||
RegisterMethod('procedure Free');
|
RegisterMethod('procedure Free');
|
||||||
@ -815,6 +816,7 @@ begin;
|
|||||||
PSClass :=cl.Add(TMufasaBitmap);
|
PSClass :=cl.Add(TMufasaBitmap);
|
||||||
with PSClass do
|
with PSClass do
|
||||||
begin
|
begin
|
||||||
|
RegisterMethod(@TMufasaBitmap.ToTBitmap,'ToTBitmap');
|
||||||
RegisterMethod(@TMufasaBitmap.SetSize,'SETSIZE');
|
RegisterMethod(@TMufasaBitmap.SetSize,'SETSIZE');
|
||||||
RegisterMethod(@TMufasaBitmap.StretchResize,'STRETCHRESIZE');
|
RegisterMethod(@TMufasaBitmap.StretchResize,'STRETCHRESIZE');
|
||||||
RegisterMethod(@TMufasaBitmap.FastSetPixel,'FASTSETPIXEL');
|
RegisterMethod(@TMufasaBitmap.FastSetPixel,'FASTSETPIXEL');
|
||||||
|
@ -16,6 +16,7 @@ procedure SIRegisterTBRUSH(Cl: TPSPascalCompiler);
|
|||||||
procedure SIRegisterTCanvas(cl: TPSPascalCompiler);
|
procedure SIRegisterTCanvas(cl: TPSPascalCompiler);
|
||||||
procedure SIRegisterTGraphic(CL: TPSPascalCompiler);
|
procedure SIRegisterTGraphic(CL: TPSPascalCompiler);
|
||||||
procedure SIRegisterTBitmap(CL: TPSPascalCompiler; Streams: Boolean);
|
procedure SIRegisterTBitmap(CL: TPSPascalCompiler; Streams: Boolean);
|
||||||
|
procedure SIRegisterTPicture(CL: TPSPascalCompiler);
|
||||||
|
|
||||||
procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
|
procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
|
||||||
|
|
||||||
@ -258,6 +259,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
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);
|
procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
|
||||||
begin
|
begin
|
||||||
SIRegister_Graphics_TypesAndConsts(Cl);
|
SIRegister_Graphics_TypesAndConsts(Cl);
|
||||||
@ -268,6 +277,7 @@ begin
|
|||||||
SIRegisterTCanvas(cl);
|
SIRegisterTCanvas(cl);
|
||||||
SIRegisterTGraphic(Cl);
|
SIRegisterTGraphic(Cl);
|
||||||
SIRegisterTBitmap(Cl, Streams);
|
SIRegisterTBitmap(Cl, Streams);
|
||||||
|
SIRegisterTPicture(cl);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
|
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
|
||||||
|
@ -44,12 +44,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIMAGECANVAS_R(Self: TIMAGE; var T: TCANVAS); begin T := Self.CANVAS; 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);
|
procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter);
|
||||||
begin
|
begin
|
||||||
with Cl.Add(TIMAGE) do
|
with Cl.Add(TIMAGE) do
|
||||||
begin
|
begin
|
||||||
RegisterPropertyHelper(@TIMAGECANVAS_R, nil, 'CANVAS');
|
RegisterPropertyHelper(@TIMAGECANVAS_R, nil, 'CANVAS');
|
||||||
|
RegisterPropertyHelper(@TIMAGEPICTURE_R,@TIMAGEPICTURE_W,'PICTURE');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ procedure RIRegisterTBRUSH(Cl: TPSRuntimeClassImporter);
|
|||||||
procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter);
|
procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter);
|
||||||
procedure RIRegisterTGraphic(CL: TPSRuntimeClassImporter);
|
procedure RIRegisterTGraphic(CL: TPSRuntimeClassImporter);
|
||||||
procedure RIRegisterTBitmap(CL: TPSRuntimeClassImporter; Streams: Boolean);
|
procedure RIRegisterTBitmap(CL: TPSRuntimeClassImporter; Streams: Boolean);
|
||||||
|
procedure RIRegisterTPicture(CL: TPSRuntimeClassImporter);
|
||||||
|
|
||||||
procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
|
procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
|
||||||
|
|
||||||
@ -203,6 +204,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
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);
|
procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
|
||||||
begin
|
begin
|
||||||
RIRegisterTGRAPHICSOBJECT(cl);
|
RIRegisterTGRAPHICSOBJECT(cl);
|
||||||
@ -212,6 +221,7 @@ begin
|
|||||||
RIRegisterTBRUSH(cl);
|
RIRegisterTBRUSH(cl);
|
||||||
RIRegisterTGraphic(CL);
|
RIRegisterTGraphic(CL);
|
||||||
RIRegisterTBitmap(CL, Streams);
|
RIRegisterTBitmap(CL, Streams);
|
||||||
|
RIRegisterTPicture(CL);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
|
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
|
||||||
|
Loading…
Reference in New Issue
Block a user