From 07627b0ecccb3a24aa0987e48337aa372dbdd429 Mon Sep 17 00:00:00 2001 From: jesus Date: Tue, 14 Apr 2009 21:11:06 +0000 Subject: [PATCH] Printers, implemented reverse variants of portrait and landscape, inverted landscape orientation git-svn-id: trunk@19430 - --- lcl/postscriptcanvas.pas | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lcl/postscriptcanvas.pas b/lcl/postscriptcanvas.pas index 9359ffd009..a791369f50 100644 --- a/lcl/postscriptcanvas.pas +++ b/lcl/postscriptcanvas.pas @@ -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;