diff options
| author | Vinicius Jose Latorre | 2007-05-13 21:33:57 +0000 |
|---|---|---|
| committer | Vinicius Jose Latorre | 2007-05-13 21:33:57 +0000 |
| commit | c8296a633e29c7b9edaaec931fc6461ad256e9be (patch) | |
| tree | 25132572e342ffa9c8c2e516bbcd90f8410ca98d | |
| parent | dbb485279bb81a5e6aea4968e0fb843ec2e3489b (diff) | |
| download | emacs-c8296a633e29c7b9edaaec931fc6461ad256e9be.tar.gz emacs-c8296a633e29c7b9edaaec931fc6461ad256e9be.zip | |
Use default color when color is unspecified.
| -rw-r--r-- | lisp/ChangeLog.unicode | 9 | ||||
| -rw-r--r-- | lisp/ps-print.el | 44 |
2 files changed, 35 insertions, 18 deletions
diff --git a/lisp/ChangeLog.unicode b/lisp/ChangeLog.unicode index 792aabf03b8..88bc519abdd 100644 --- a/lisp/ChangeLog.unicode +++ b/lisp/ChangeLog.unicode | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2007-05-13 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 2 | |||
| 3 | * ps-print.el: Use default color when foreground or background color | ||
| 4 | are unspecified. Reported by Leo <sdl.web@gmail.com>. | ||
| 5 | (ps-print-version): New version 7.2.3. | ||
| 6 | (ps-rgb-color): New argument. Use default color when color is | ||
| 7 | unspecified. | ||
| 8 | (ps-begin-job): Fix code. | ||
| 9 | |||
| 1 | 2007-03-28 Riccardo Murri <riccardo.murri@gmail.com> | 10 | 2007-03-28 Riccardo Murri <riccardo.murri@gmail.com> |
| 2 | 11 | ||
| 3 | * vc-bzr.el: New file. | 12 | * vc-bzr.el: New file. |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 71117a2f240..3cc887fd40f 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) | 10 | ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) |
| 11 | ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> | 11 | ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 12 | ;; Keywords: wp, print, PostScript | 12 | ;; Keywords: wp, print, PostScript |
| 13 | ;; Version: 7.2.2 | 13 | ;; Version: 7.2.3 |
| 14 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 14 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 15 | 15 | ||
| 16 | (defconst ps-print-version "7.2.2" | 16 | (defconst ps-print-version "7.2.3" |
| 17 | "ps-print.el, v 7.2.2 <2007/02/07 vinicius> | 17 | "ps-print.el, v 7.2.3 <2007/05/13 vinicius> |
| 18 | 18 | ||
| 19 | Vinicius's last change version -- this file may have been edited as part of | 19 | Vinicius's last change version -- this file may have been edited as part of |
| 20 | Emacs without changes to the version number. When reporting bugs, please also | 20 | Emacs without changes to the version number. When reporting bugs, please also |
| @@ -5603,21 +5603,27 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5603 | (ps-get-size (symbol-value font-sym) "font size" font-sym)) | 5603 | (ps-get-size (symbol-value font-sym) "font size" font-sym)) |
| 5604 | 5604 | ||
| 5605 | 5605 | ||
| 5606 | (defun ps-rgb-color (color default) | 5606 | (defun ps-rgb-color (color unspecified default) |
| 5607 | (cond ((and color (listp color) (= (length color) 3) | 5607 | (cond |
| 5608 | (let ((cl color) | 5608 | ;; (float float float) ==> (R G B) |
| 5609 | (ok t) e) | 5609 | ((and color (listp color) (= (length color) 3) |
| 5610 | (while (and ok cl) | 5610 | (let ((cl color) |
| 5611 | (setq e (car cl) | 5611 | (ok t) e) |
| 5612 | cl (cdr cl) | 5612 | (while (and ok cl) |
| 5613 | ok (and (floatp e) (<= 0.0 e) (<= e 1.0)))) | 5613 | (setq e (car cl) |
| 5614 | ok)) | 5614 | cl (cdr cl) |
| 5615 | color) | 5615 | ok (and (floatp e) (<= 0.0 e) (<= e 1.0)))) |
| 5616 | ((and (floatp color) (<= 0.0 color) (<= color 1.0)) | 5616 | ok)) |
| 5617 | (list color color color)) | 5617 | color) |
| 5618 | ((stringp color) (ps-color-scale color)) | 5618 | ;; float ==> 0.0 = black .. 1.0 = white |
| 5619 | (t (list default default default)) | 5619 | ((and (floatp color) (<= 0.0 color) (<= color 1.0)) |
| 5620 | )) | 5620 | (list color color color)) |
| 5621 | ;; "colorName" but different from "unspecified-[bf]g" | ||
| 5622 | ((and (stringp color) (not (string= color unspecified))) | ||
| 5623 | (ps-color-scale color)) | ||
| 5624 | ;; ok, use the default | ||
| 5625 | (t | ||
| 5626 | (list default default default)))) | ||
| 5621 | 5627 | ||
| 5622 | (defvar ps-basic-plot-string-function 'ps-basic-plot-string) | 5628 | (defvar ps-basic-plot-string-function 'ps-basic-plot-string) |
| 5623 | 5629 | ||
| @@ -5700,6 +5706,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5700 | (ps-face-background-name 'default)) | 5706 | (ps-face-background-name 'default)) |
| 5701 | (t | 5707 | (t |
| 5702 | ps-default-bg)) | 5708 | ps-default-bg)) |
| 5709 | "unspecified-bg" | ||
| 5703 | 1.0) | 5710 | 1.0) |
| 5704 | ps-default-foreground (ps-rgb-color | 5711 | ps-default-foreground (ps-rgb-color |
| 5705 | (cond | 5712 | (cond |
| @@ -5711,6 +5718,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5711 | (ps-face-foreground-name 'default)) | 5718 | (ps-face-foreground-name 'default)) |
| 5712 | (t | 5719 | (t |
| 5713 | ps-default-fg)) | 5720 | ps-default-fg)) |
| 5721 | "unspecified-fg" | ||
| 5714 | 0.0) | 5722 | 0.0) |
| 5715 | ps-default-color (and (eq ps-print-color-p t) ps-default-foreground) | 5723 | ps-default-color (and (eq ps-print-color-p t) ps-default-foreground) |
| 5716 | ps-current-color ps-default-color | 5724 | ps-current-color ps-default-color |