comparison lisp/ps-print.el @ 78509:3db577f2c6a5

ps-print-color-p fix
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Wed, 08 Aug 2007 16:37:46 +0000
parents 9355f9b7bbff
children a272de28c254
comparison
equal deleted inserted replaced
78508:5b1c6b581bbe 78509:3db577f2c6a5
3014 Where RED, GREEN and BLUE are reals between 0.0 (no color) and 3014 Where RED, GREEN and BLUE are reals between 0.0 (no color) and
3015 1.0 (full color). 3015 1.0 (full color).
3016 3016
3017 Any other value is ignored and black color will be used. 3017 Any other value is ignored and black color will be used.
3018 3018
3019 It's used only when `ps-print-color-p' is non-nil." 3019 This variable is used only when `ps-print-color-p' (which see) is neither nil
3020 nor black-white."
3020 :type '(choice :menu-tag "Default Foreground Gray/Color" 3021 :type '(choice :menu-tag "Default Foreground Gray/Color"
3021 :tag "Default Foreground Gray/Color" 3022 :tag "Default Foreground Gray/Color"
3022 (const :tag "Session Foreground" t) 3023 (const :tag "Session Foreground" t)
3023 (const :tag "Frame Foreground" frame-parameter) 3024 (const :tag "Frame Foreground" frame-parameter)
3024 (number :tag "Gray Scale" :value 0.0) 3025 (number :tag "Gray Scale" :value 0.0)
3057 Where RED, GREEN and BLUE are reals between 0.0 (no color) and 3058 Where RED, GREEN and BLUE are reals between 0.0 (no color) and
3058 1.0 (full color). 3059 1.0 (full color).
3059 3060
3060 Any other value is ignored and white color will be used. 3061 Any other value is ignored and white color will be used.
3061 3062
3062 It's used only when `ps-print-color-p' is non-nil. 3063 This variable is used only when `ps-print-color-p' (which see) is neither nil
3064 nor black-white.
3063 3065
3064 See also `ps-use-face-background'." 3066 See also `ps-use-face-background'."
3065 :type '(choice :menu-tag "Default Background Gray/Color" 3067 :type '(choice :menu-tag "Default Background Gray/Color"
3066 :tag "Default Background Gray/Color" 3068 :tag "Default Background Gray/Color"
3067 (const :tag "Session Background" t) 3069 (const :tag "Session Background" t)
5918 ps-print-color-scale (if ps-color-p 5920 ps-print-color-scale (if ps-color-p
5919 (float (car (ps-color-values "white"))) 5921 (float (car (ps-color-values "white")))
5920 1.0) 5922 1.0)
5921 ps-default-background (ps-rgb-color 5923 ps-default-background (ps-rgb-color
5922 (cond 5924 (cond
5923 ((or (not (eq ps-print-color-p t)) 5925 ((or (member ps-print-color-p
5926 '(nil back-white))
5924 (eq genfunc 'ps-generate-postscript)) 5927 (eq genfunc 'ps-generate-postscript))
5925 nil) 5928 nil)
5926 ((eq ps-default-bg 'frame-parameter) 5929 ((eq ps-default-bg 'frame-parameter)
5927 (ps-frame-parameter nil 'background-color)) 5930 (ps-frame-parameter nil 'background-color))
5928 ((eq ps-default-bg t) 5931 ((eq ps-default-bg t)
5931 ps-default-bg)) 5934 ps-default-bg))
5932 "unspecified-bg" 5935 "unspecified-bg"
5933 1.0) 5936 1.0)
5934 ps-default-foreground (ps-rgb-color 5937 ps-default-foreground (ps-rgb-color
5935 (cond 5938 (cond
5936 ((or (not (eq ps-print-color-p t)) 5939 ((or (member ps-print-color-p
5940 '(nil back-white))
5937 (eq genfunc 'ps-generate-postscript)) 5941 (eq genfunc 'ps-generate-postscript))
5938 nil) 5942 nil)
5939 ((eq ps-default-fg 'frame-parameter) 5943 ((eq ps-default-fg 'frame-parameter)
5940 (ps-frame-parameter nil 'foreground-color)) 5944 (ps-frame-parameter nil 'foreground-color))
5941 ((eq ps-default-fg t) 5945 ((eq ps-default-fg t)
5942 (ps-face-foreground-name 'default)) 5946 (ps-face-foreground-name 'default))
5943 (t 5947 (t
5944 ps-default-fg)) 5948 ps-default-fg))
5945 "unspecified-fg" 5949 "unspecified-fg"
5946 0.0) 5950 0.0)
5947 ps-default-color (and (eq ps-print-color-p t) 5951 ps-default-color (and (not (member ps-print-color-p
5952 '(nil back-white)))
5948 ps-default-foreground) 5953 ps-default-foreground)
5949 ps-current-color ps-default-color) 5954 ps-current-color ps-default-color)
5950 ;; initialize page dimensions 5955 ;; initialize page dimensions
5951 (ps-get-page-dimensions) 5956 (ps-get-page-dimensions)
5952 ;; final check 5957 ;; final check