forked from fgeller/emacs-mac-port
/
gs.elc
48 lines (43 loc) · 3.83 KB
/
gs.elc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
;ELC
;;; Compiled by cyd@ulysses on Sat Dec 15 22:25:39 2012
;;; from file /home/cyd/emacs/lisp/gs.el
;;; in Emacs version 24.2.91.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#@42 The name of the Ghostscript interpreter.
(defvar gs-program "gs" (#$ . 497))
#@50 The Ghostscript device to use to produce images.
(defvar gs-device "x11" (#$ . 580))
#@171 List of command line arguments to pass to Ghostscript.
Arguments may contain place-holders `<file>' for the name of the
input file, and `<device>' for the device to use.
(defvar gs-options '("-q" "-dSAFER" "-dBATCH" "-sDEVICE=<device>" "<file>") (#$ . 672))
(put 'gs-options 'risky-local-variable t)
#@198 Return a list of command line options with place-holders replaced.
DEVICE is the value to substitute for the place-holder `<device>',
FILE is the value to substitute for the place-holder `<file>'.
(defalias 'gs-options #[(device file) "\301\302\"\207" [gs-options mapcar #[(option) "\303\304 #\303\305\n #\211\207" [device option file replace-regexp-in-string "<device>" "<file>"] 4]] 3 (#$ . 979)])
#@61 Return, on FRAME, pixel width PIXEL-WIDTH translated to pt.
(defalias 'gs-width-in-pt #[(frame pixel-width) "\303!\303\304 !!\303\305 !!\245_\306\n_\307\245)\207" [pixel-width frame mm float x-display-mm-width x-display-pixel-width 25.4 72.0] 5 (#$ . 1389)])
#@63 Return, on FRAME, pixel height PIXEL-HEIGHT translated to pt.
(defalias 'gs-height-in-pt #[(frame pixel-height) "\303!\303\304 !!\303\305 !!\245_\306\n_\307\245)\207" [pixel-height frame mm float x-display-mm-height x-display-pixel-height 25.4 72.0] 5 (#$ . 1656)])
#@192 Set the `GHOSTVIEW' window property of FRAME.
SPEC is a GS image specification. IMG-WIDTH is the width of the
requested image, and IMG-HEIGHT is the height of the requested
image in pixels.
(defalias 'gs-set-ghostview-window-prop #[(frame spec img-width img-height) "\306A\307\"\211\310\234 \311\234 \312\234 \313\234\306A\314\"\206 \310\f\nZ\315\245Z\316\245\245\245\317\320\321\322\n\f&#.\n\207" [spec box llx lly urx ury plist-get :bounding-box 0 1 2 3 :rotate 72.0 72.0 x-change-window-property "GHOSTVIEW" format "0 %d %d %d %d %d %g %g" rotation in-width in-height img-width xdpi img-height ydpi frame] 12 (#$ . 1931)])
#@69 Set the `GHOSTVIEW_COLORS' environment variable depending on FRAME.
(defalias 'gs-set-ghostview-colors-window-prop #[(frame pixel-colors) "\303!\203\n \304\202 \305!\203 \306\202 \307\310\311\312\313 \n##)\207" [frame mode pixel-colors x-display-color-p "Color" x-display-grayscale-p "Grayscale" "Monochrome" x-change-window-property "GHOSTVIEW_COLORS" format "%s %s"] 6 (#$ . 2603)])
#@243 Load a PS image for display on FRAME.
SPEC is an image specification, IMG-HEIGHT and IMG-WIDTH are width
and height of the image in pixels. WINDOW-AND-PIXMAP-ID is a string of
the form "WINDOW-ID PIXMAP-ID". Value is non-nil if successful.
(defalias 'gs-load-image #[(frame spec img-width img-height window-and-pixmap-id pixel-colors) "\306\216\307A\310\"\306\311\312\313\314\f\"G!\204- \312 !\204- \315\316\317\"\204'