mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-29 12:32:14 -05:00
Shortcut boolean evaluation + fix for non-exported canvas stuff.
This commit is contained in:
parent
6799faca66
commit
9686a4cd86
@ -555,6 +555,7 @@ begin
|
|||||||
inherited Create(CreateSuspended, TheSyncInfo, plugin_dir);
|
inherited Create(CreateSuspended, TheSyncInfo, plugin_dir);
|
||||||
PSScript := TPSScript.Create(nil);
|
PSScript := TPSScript.Create(nil);
|
||||||
PSScript.UsePreProcessor:= True;
|
PSScript.UsePreProcessor:= True;
|
||||||
|
PSScript.CompilerOptions := PSScript.CompilerOptions + [icBooleanShortCircuit];
|
||||||
PSScript.OnNeedFile := @RequireFile;
|
PSScript.OnNeedFile := @RequireFile;
|
||||||
PSScript.OnProcessDirective:=@OnProcessDirective;
|
PSScript.OnProcessDirective:=@OnProcessDirective;
|
||||||
PSScript.OnProcessUnknowDirective:=@PSScriptProcessUnknowDirective;
|
PSScript.OnProcessUnknowDirective:=@PSScriptProcessUnknowDirective;
|
||||||
|
@ -54,23 +54,29 @@ procedure TCanvasHandleW(Self: TCanvas; T: Longint); begin Self.Handle:= T; end;
|
|||||||
|
|
||||||
procedure TCanvasPixelsR(Self: TCanvas; var T: Longint; X,Y: Longint); begin T := Self.Pixels[X,Y]; end;
|
procedure TCanvasPixelsR(Self: TCanvas; var T: Longint; X,Y: Longint); begin T := Self.Pixels[X,Y]; end;
|
||||||
procedure TCanvasPixelsW(Self: TCanvas; T, X, Y: Longint); begin Self.Pixels[X,Y]:= T; end;
|
procedure TCanvasPixelsW(Self: TCanvas; T, X, Y: Longint); begin Self.Pixels[X,Y]:= T; end;
|
||||||
|
procedure TCanvasArc(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); begin Self.Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4); end;
|
||||||
|
procedure TCanvasChord(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); begin self.Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4); end;
|
||||||
|
procedure TCanvasRectangle(Self : TCanvas; X1,Y1,X2,Y2 : integer); begin self.Rectangle(x1,y1,x2,y2); end;
|
||||||
|
procedure TCanvasRoundRect(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3 : integer); begin self.RoundRect(X1, Y1, X2, Y2, X3, Y3); end;
|
||||||
|
procedure TCanvasEllipse(Self : TCanvas;X1, Y1, X2, Y2: Integer); begin self.Ellipse(X1, Y1, X2, Y2); end;
|
||||||
|
procedure TCanvasFillRect(Self : TCanvas; const Rect: TRect); begin self.FillRect(rect); end;
|
||||||
|
procedure TCanvasFloodFill(Self : TCanvas; X, Y: Integer; Color: TColor; FillStyle: TFillStyle); begin self.FloodFill(x,y,color,fillstyle); end;
|
||||||
|
|
||||||
procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter); // requires TPersistent
|
procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter); // requires TPersistent
|
||||||
begin
|
begin
|
||||||
with Cl.Add(TCanvas) do
|
with Cl.Add(TCanvas) do
|
||||||
begin
|
begin
|
||||||
{$IFNDEF FPC}
|
RegisterMethod(@TCanvasArc, 'ARC');
|
||||||
RegisterMethod(@TCanvas.Arc, 'ARC');
|
RegisterMethod(@TCanvasChord, 'CHORD');
|
||||||
RegisterMethod(@TCanvas.Chord, 'CHORD');
|
RegisterMethod(@TCanvasRectangle, 'RECTANGLE');
|
||||||
RegisterMethod(@TCanvas.Rectangle, 'RECTANGLE');
|
RegisterMethod(@TCanvasRoundRect, 'ROUNDRECT');
|
||||||
RegisterMethod(@TCanvas.RoundRect, 'ROUNDRECT');
|
RegisterMethod(@TCanvasEllipse, 'ELLIPSE');
|
||||||
RegisterMethod(@TCanvas.Ellipse, 'ELLIPSE');
|
RegisterMethod(@TCanvasFillRect, 'FILLRECT');
|
||||||
RegisterMethod(@TCanvas.FillRect, 'FILLRECT');
|
// RegisterMethod(@TCanvasDraw, 'DRAW');
|
||||||
{$ENDIF}
|
|
||||||
RegisterMethod(@TCanvas.Draw, 'DRAW');
|
|
||||||
{$IFNDEF CLX}
|
{$IFNDEF CLX}
|
||||||
RegisterMethod(@TCanvas.FloodFill, 'FLOODFILL');
|
RegisterMethod(@TCanvasFloodFill, 'FLOODFILL');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
RegisterMethod(@TCanvas.Lineto, 'LINETO');
|
RegisterMethod(@TCanvas.Lineto, 'LINETO');
|
||||||
RegisterMethod(@TCanvas.Moveto, 'MOVETO');
|
RegisterMethod(@TCanvas.Moveto, 'MOVETO');
|
||||||
RegisterMethod(@TCanvas.Pie, 'PIE');
|
RegisterMethod(@TCanvas.Pie, 'PIE');
|
||||||
|
Loading…
Reference in New Issue
Block a user