mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 01:16:18 +02:00
Printers, implemented reverse variants of portrait and landscape, inverted landscape orientation
git-svn-id: trunk@19430 -
This commit is contained in:
parent
f22870f50f
commit
07627b0ecc
@ -561,14 +561,25 @@ end;
|
||||
|
||||
procedure TPostScriptPrinterCanvas.WriteOrientation;
|
||||
var
|
||||
h:integer;
|
||||
h,w:integer;
|
||||
begin
|
||||
if Printer=nil then
|
||||
exit;
|
||||
case Printer.Orientation of
|
||||
poReversePortrait:
|
||||
begin
|
||||
w:=round(Printer.PaperSize.Width*72/printer.XDPI);
|
||||
h:=round(Printer.PaperSize.Height*72/printer.YDPI);
|
||||
Write(format('%d %d translate 180 rotate',[w,h]));
|
||||
end;
|
||||
poLandscape:
|
||||
begin
|
||||
h:=round(Printer.PaperSize.Height*72/printer.YDPI); // pixels to points
|
||||
h:=round(Printer.PaperSize.Width*72/printer.XDPI);
|
||||
Write(format('0 %d translate 90 neg rotate',[h]));
|
||||
end;
|
||||
poReverseLandscape:
|
||||
begin
|
||||
h:=round(Printer.PaperSize.Height*72/printer.YDPI);
|
||||
Write(format('%d 0 translate 90 rotate',[h]));
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user