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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
%%
%% This is file `bmpsize-dvipdfmx.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bmpsize.dtx (with options: `dvipdfmx')
%%
%% This is a generated file.
%%
%% Copyright (C) 2006, 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any later
%% version. The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Heiko Oberdiek.
%%
%% This work consists of the main source file bmpsize.dtx
%% and the derived files
%% bmpsize.sty, bmpsize.pdf, bmpsize.ins, bmpsize.drv,
%% bmpsize-base.sty, bmpsize-test.tex, bmpsize-dvips.def,
%% bmpsize-dvipdfm.def, bmpsize-dvipdfmx.def.
%%
\ProvidesFile{bmpsize-dvipdfmx.def}%
[2007/04/29 v1.3 Graphics bitmap driver for dvipdfmx (HO)]%
\expandafter\edef\csname @bmpsize@driver@catcodes\endcsname{%
\catcode44 \the\catcode44 % ,
\catcode46 \the\catcode46 % .
\catcode58 \the\catcode58 % :
\catcode60 \the\catcode60 % <
\catcode61 \the\catcode61 % =
\catcode62 \the\catcode62 % >
\catcode64 \the\catcode64 % @
}
\catcode64 11 %
\@makeother\,
\@makeother\.
\@makeother\:
\@makeother\<
\@makeother\=
\@makeother\>
\@ifundefined{@bmpsize@count}{%
\csname newcount\endcsname\@bmpsize@count
\@bmpsize@count=\z@
}{}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfescapestring\endcsname\relax
\def\@bmpsize@pdfescapestring#1{#1}%
\else
\let\@bmpsize@pdfescapestring\pdfescapestring
\fi
\def\bmpsize@dvipdfmx@factor{1.3837}
\def\Ginclude@bmp#1{%
\message{<#1>}%
\ifGin@clip
\global\advance\@bmpsize@count\@ne
\edef\@bmpsize@clip@name{@CLIP@\the\@bmpsize@count}%
\special{%
pdf:bxobj \@bmpsize@clip@name\space
width \the\Gin@req@width\space
height \the\Gin@req@height
}%
\fi
\hbox to \z@{%
\@ifundefined{Gin@ollx}{%
\dimen@\z@
}{%
\ifx\Gin@scalex\Gin@exclamation
\let\Gin@scalex\Gin@scaley
\fi
\ifx\Gin@scaley\Gin@exclamation
\let\Gin@scaley\Gin@scalex
\fi
\@ifundefined{bmpsize@width}{%
\let\bmpsize@width\Gin@ourx
\let\bmpsize@height\Gin@oury
}{}%
\dimen@=\Gin@llx bp\relax
\dimen@=\Gin@scalex\dimen@
\kern-\dimen@
\advance\Gin@req@width\dimen@
\dimen@=\bmpsize@width bp\relax
\advance\dimen@ by -\Gin@urx bp\relax
\dimen@=\Gin@scalex\dimen@
\advance\Gin@req@width\dimen@
\dimen@=\bmpsize@height bp\relax
\advance\dimen@ by -\Gin@ury bp\relax
\dimen@=\Gin@scaley\dimen@
\advance\Gin@req@height\dimen@
\dimen@=\Gin@lly bp\relax
\dimen@=\Gin@scaley\dimen@
\advance\Gin@req@height\dimen@
}%
\ifdim\dimen@=\z@
\else
\vbox to\z@\bgroup
\kern\dimen@
\fi
\edef\@bmpsize@temp{@IMG@\@bmpsize@pdfescapestring{#1}}%
\@ifundefined{\@bmpsize@temp}{%
\global\advance\@bmpsize@count\@ne
\expandafter\ifx\csname bmpsize@pixelwidth\endcsname\relax
\else
\expandafter\xdef\csname\@bmpsize@temp\endcsname{%
\the\@bmpsize@count:\bmpsize@pixelwidth:\bmpsize@pixelheight
}%
\fi
\special{%
pdf:image @IMG\the\@bmpsize@count\space
width \the\Gin@req@width\space
height \the\Gin@req@height\space
depth 0pt (\@bmpsize@pdfescapestring{#1})%
}%
}{%
\expandafter\expandafter\expandafter\@bmpsize@extract
\csname\@bmpsize@temp\endcsname\@nil
\edef\@bmpsize@xscale{%
\strip@pt\dimexpr
\bmpsize@dvipdfmx@factor\Gin@req@width\relax
}%
\edef\@bmpsize@yscale{%
\strip@pt\dimexpr
\bmpsize@dvipdfmx@factor\Gin@req@height\relax
}%
\@bmpsize@div\@bmpsize@xscale\@bmpsize@xscale\@bmpsize@pixelwidth
\@bmpsize@div\@bmpsize@yscale\@bmpsize@yscale\@bmpsize@pixelheight
\special{%
pdf:bt %
xscale \@bmpsize@xscale\space
yscale \@bmpsize@yscale
}%
\special{pdf:uxobj @IMG\@bmpsize@imgnum}%
\special{pdf:et}%
}%
\ifdim\dimen@=\z@
\else
\vss
\egroup
\fi
\hss
}%
\ifGin@clip
\special{pdf:exobj}%
\special{pdf:uxobj \@bmpsize@clip@name}%
\fi
}
\def\@bmpsize@extract#1:#2:#3\@nil{%
\def\@bmpsize@imgnum{#1}%
\def\@bmpsize@pixelwidth{#2}%
\def\@bmpsize@pixelheight{#3}%
}
\@bmpsize@driver@catcodes
\endinput
%%
%% End of file `bmpsize-dvipdfmx.def'.
|