From 03d126081e5ba57ea2304753289528a896f3baaf Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Fri, 1 Apr 2005 21:45:20 +0000 Subject: xc/programs/Xserver/Xprint/Init.c xc/programs/Xserver/Xprint/ps/Imakefile xc/programs/Xserver/Xprint/ps/Ps.h xc/programs/Xserver/Xprint/ps/PsArea.c xc/programs/Xserver/Xprint/ps/PsColor.c xc/programs/Xserver/Xprint/ps/PsImageUtil.c xc/programs/Xserver/Xprint/ps/PsInit.c //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2287 (https://bugs.freedesktop.org/attachment.cgi?id=2287) Follow-up to bugzilla #1299: Add new visuals in the Postscript DDX (including TrueColor 16bit, PseudoColor 15bit/12bpg(12 bits per R-, G-, B-channel as in PostScript Level 2 (and above) colors can have 12 bits per component (36 bit for RGB)), PseudoColor+GrayScale+StaticGray 12bit/12bpg) and switch the default visual from PseudoColor 8bit/8bpg to PseudoColor 12bit/12bpg. --- Xprint/ps/psout.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Xprint/ps/psout.h') diff --git a/Xprint/ps/psout.h b/Xprint/ps/psout.h index a9c7d4a51..d60717b55 100644 --- a/Xprint/ps/psout.h +++ b/Xprint/ps/psout.h @@ -153,8 +153,28 @@ typedef enum PsFTDownloadFontType_ PsFontType3 } PsFTDownloadFontType; +/* Define |PsOutColor| color type which can hold one RGB value + * (note: this needs to be |signed| long/long long to represent + * special values such as |PSOUTCOLOR_NOCOLOR|) + */ #ifdef PSOUT_USE_DEEPCOLOR -typedef long long PsOutColor; +/* 64bit |PsOutColor| which can hold 16bit R-,G-,B-values */ +#ifdef WIN32 +typedef signed __int64 PsOutColor; +#else +# if defined(__alpha__) || defined(__alpha) || \ + defined(ia64) || defined(__ia64__) || \ + defined(__sparc64__) || defined(_LP64) || \ + defined(__s390x__) || \ + defined(amd64) || defined (__amd64__) || \ + defined (__powerpc64__) || \ + (defined(sgi) && (_MIPS_SZLONG == 64)) +typedef signed long PsOutColor; +# else +typedef signed long long PsOutColor; +# endif /* native 64bit platform */ +#endif /* WIN32 */ + #define PSOUTCOLOR_TO_REDBITS(clr) ((clr) >> 32) #define PSOUTCOLOR_TO_GREENBITS(clr) (((clr) >> 16) & 0xFFFF) #define PSOUTCOLOR_TO_BLUEBITS(clr) ((clr) & 0xFFFF) @@ -165,7 +185,8 @@ typedef long long PsOutColor; ((PSOUTCOLOR_TO_GREENBITS(clr) >> 8) << 8) | \ ((PSOUTCOLOR_TO_BLUEBITS(clr) >> 8) << 0)) #else -typedef long PsOutColor; +/* 32bit |PsOutColor| which can hold 8bit R-,G-,B-values */ +typedef signed long PsOutColor; #define PSOUTCOLOR_TO_REDBITS(clr) ((clr) >> 16) #define PSOUTCOLOR_TO_GREENBITS(clr) (((clr) >> 8) & 0xFF) #define PSOUTCOLOR_TO_BLUEBITS(clr) ((clr) & 0xFF) -- cgit v1.2.3