From 54f7e2e1487a6eb323fd4ce08ced3fd748bc76dc Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 8 Feb 2015 18:05:37 +0000 Subject: [PATCH] IPro, TIpHtmlPanel: Support color printers. Issue #27420, patch from Michl. git-svn-id: trunk@47652 - --- components/turbopower_ipro/iphtml.pas | 2 +- lcl/lcltype.pp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/turbopower_ipro/iphtml.pas b/components/turbopower_ipro/iphtml.pas index 59c21c94af..c46eed6ecd 100644 --- a/components/turbopower_ipro/iphtml.pas +++ b/components/turbopower_ipro/iphtml.pas @@ -13000,7 +13000,7 @@ begin // printer should have 2 colors, somebody else needs to clarify. BWPrinter := false; {$ELSE} - BWPrinter := GetDeviceCaps(Printer.Canvas.Handle, PLANES) = 1; + BWPrinter := GetDeviceCaps(Printer.Canvas.Handle, NUMCOLORS) = 2; {$ENDIF} {$IFDEF IP_LAZARUS} LogPixX := Printer.XDPI; diff --git a/lcl/lcltype.pp b/lcl/lcltype.pp index 79334d4942..a6633856b4 100644 --- a/lcl/lcltype.pp +++ b/lcl/lcltype.pp @@ -2124,6 +2124,7 @@ const VERTRES = 10; { Vertical height in pixels } BITSPIXEL = 12; { Number of bits per pixel } PLANES = 14; { Number of planes } + NUMCOLORS = 24; { Number of colors } LOGPIXELSX = 88; { Logical pixelsinch in X } LOGPIXELSY = 90; { Logical pixelsinch in Y } SIZEPALETTE = 104; { Number of entries in physical palette }