2001-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
+ * wl-demo.el (wl-demo-insert-image): Make Emacs 21 use BITMAP-MULE
+ for xbm if the new redisplay engine is not available.
+
+2001-12-12 Katsumi Yamaoka <yamaoka@jpl.org>
+
* wl-demo.el (wl-demo-image-type-alist): Add bitmap for Emacs 21.
(wl-demo-insert-image): Decode bitmap data line by line when Emacs
21 is running (cf. mule-ja:08245).
(insert "\n")
(/ (+ (* 2 (glyph-height image) (window-height)) height)
(* 2 height)))
+ ((and wl-on-emacs21
+ (or (eq 'xpm image-type)
+ (and (eq 'xbm image-type)
+ (image-type-available-p 'xbm))))
+ ;; Use the new redisplay engine on Emacs 21.
+ (setq image (create-image file image-type)
+ width (image-size image)
+ height (cdr width)
+ width (car width))
+ (when (eq 'xbm image-type)
+ (let ((bg (face-background 'wl-highlight-logo-face))
+ (fg (face-foreground 'wl-highlight-logo-face)))
+ (when (stringp bg)
+ (plist-put (cdr image) ':background bg))
+ (when (stringp fg)
+ (plist-put (cdr image) ':foreground fg))))
+ (insert (propertize " " 'display
+ (list 'space ':align-to
+ (max 0 (round (- (window-width)
+ width)
+ 2)))))
+ (insert-image image)
+ (insert "\n")
+ (round height))
((eq 'bitmap image-type)
+ ;; Use ready-composed bitmap image.
(require 'bitmap)
(if wl-on-emacs21
(progn
(put-text-property (point-min) (point-max)
'face 'wl-highlight-logo-face)
(count-lines (point-min) (goto-char (point-max))))
- ((>= emacs-major-version 21)
- (setq image (create-image file image-type)
- width (image-size image)
- height (cdr width)
- width (car width))
- (when (eq 'xbm image-type)
- (let ((bg (face-background 'wl-highlight-logo-face))
- (fg (face-foreground 'wl-highlight-logo-face)))
- (when (stringp bg)
- (plist-put (cdr image) ':background bg))
- (when (stringp fg)
- (plist-put (cdr image) ':foreground fg))))
- (insert (propertize " " 'display
- (list 'space ':align-to
- (max 0 (round (- (window-width)
- width)
- 2)))))
- (insert-image image)
- (insert "\n")
- (round height))
((eq 'xbm image-type)
(message "Composing a bitmap image...")
(require 'bitmap)