mlib-int.lua /size: 18 Kb    last modification: 2020-07-01 14:35
1
if
not
modules
then
modules
=
{
}
end
modules
[
'
mlib-int
'
]
=
{
2
version
=
1
.
001
,
3
comment
=
"
companion to mlib-ctx.mkiv
"
,
4
author
=
"
Hans Hagen, PRAGMA-ADE, Hasselt NL
"
,
5
copyright
=
"
PRAGMA ADE / ConTeXt Development Team
"
,
6
license
=
"
see context related readme files
"
,
7
}
8 9
local
factor
=
number
.
dimenfactors
.
bp
10
----- mpprint = mp.print
11
local
mpnumeric
=
mp
.
numeric
12
local
mpboolean
=
mp
.
boolean
13
local
mpstring
=
mp
.
string
14
local
mpquoted
=
mp
.
quoted
15
local
getdimen
=
tex
.
getdimen
16
local
getcount
=
tex
.
getcount
17
local
getmacro
=
tokens
.
getters
.
macro
18
local
get
=
tex
.
get
19
local
mpcolor
=
attributes
.
colors
.
mpcolor
20
local
emwidths
=
fonts
.
hashes
.
emwidths
21
local
exheights
=
fonts
.
hashes
.
exheights
22 23
local
mpgetdimen
=
mp
.
getdimen
24 25
local
registerscript
=
metapost
.
registerscript
26 27
local
on_right_page
=
structures
.
pages
.
on_right
28
local
is_odd_page
=
structures
.
pages
.
is_odd
29
local
in_body_page
=
structures
.
pages
.
in_body
30
local
page_fraction
=
structures
.
pages
.
fraction
31 32
local
function
defaultcolormodel
(
)
-- can be helper
33
local
colormethod
=
getcount
(
"
MPcolormethod
"
)
34
return
(
colormethod
=
=
0
or
colormethod
=
=
1
)
and
1
or
3
35
end
36 37
if
CONTEXTLMTXMODE
>
0
then
38 39
local
t
=
os
.
date
(
"
*t
"
)
-- maybe this should be a very early on global
40 41
local
mpnumeric
=
mp
.
inject
.
numeric
42 43
registerscript
(
"
year
"
,
function
(
)
return
t
.
year
end
)
44
registerscript
(
"
month
"
,
function
(
)
return
t
.
month
end
)
45
registerscript
(
"
day
"
,
function
(
)
return
t
.
day
end
)
46
registerscript
(
"
hour
"
,
function
(
)
return
t
.
hour
end
)
47
registerscript
(
"
minute
"
,
function
(
)
return
t
.
min
end
)
48
registerscript
(
"
second
"
,
function
(
)
return
t
.
sec
end
)
49 50
registerscript
(
"
PaperHeight
"
,
function
(
)
return
getdimen
(
"
paperheight
"
)
*
factor
end
)
51
registerscript
(
"
PaperWidth
"
,
function
(
)
return
getdimen
(
"
paperwidth
"
)
*
factor
end
)
52
registerscript
(
"
PrintPaperHeight
"
,
function
(
)
return
getdimen
(
"
printpaperheight
"
)
*
factor
end
)
53
registerscript
(
"
PrintPaperWidth
"
,
function
(
)
return
getdimen
(
"
printpaperwidth
"
)
*
factor
end
)
54
registerscript
(
"
TopSpace
"
,
function
(
)
return
getdimen
(
"
topspace
"
)
*
factor
end
)
55
registerscript
(
"
BottomSpace
"
,
function
(
)
return
getdimen
(
"
bottomspace
"
)
*
factor
end
)
56
registerscript
(
"
BackSpace
"
,
function
(
)
return
getdimen
(
"
backspace
"
)
*
factor
end
)
57
registerscript
(
"
CutSpace
"
,
function
(
)
return
getdimen
(
"
cutspace
"
)
*
factor
end
)
58
registerscript
(
"
MakeupHeight
"
,
function
(
)
return
getdimen
(
"
makeupheight
"
)
*
factor
end
)
59
registerscript
(
"
MakeupWidth
"
,
function
(
)
return
getdimen
(
"
makeupwidth
"
)
*
factor
end
)
60
registerscript
(
"
TopHeight
"
,
function
(
)
return
getdimen
(
"
topheight
"
)
*
factor
end
)
61
registerscript
(
"
TopDistance
"
,
function
(
)
return
getdimen
(
"
topdistance
"
)
*
factor
end
)
62
registerscript
(
"
HeaderHeight
"
,
function
(
)
return
getdimen
(
"
headerheight
"
)
*
factor
end
)
63
registerscript
(
"
HeaderDistance
"
,
function
(
)
return
getdimen
(
"
headerdistance
"
)
*
factor
end
)
64
registerscript
(
"
TextHeight
"
,
function
(
)
return
getdimen
(
"
textheight
"
)
*
factor
end
)
65
registerscript
(
"
FooterDistance
"
,
function
(
)
return
getdimen
(
"
footerdistance
"
)
*
factor
end
)
66
registerscript
(
"
FooterHeight
"
,
function
(
)
return
getdimen
(
"
footerheight
"
)
*
factor
end
)
67
registerscript
(
"
BottomDistance
"
,
function
(
)
return
getdimen
(
"
bottomdistance
"
)
*
factor
end
)
68
registerscript
(
"
BottomHeight
"
,
function
(
)
return
getdimen
(
"
bottomheight
"
)
*
factor
end
)
69
registerscript
(
"
LeftEdgeWidth
"
,
function
(
)
return
getdimen
(
"
leftedgewidth
"
)
*
factor
end
)
70
registerscript
(
"
LeftEdgeDistance
"
,
function
(
)
return
getdimen
(
"
leftedgedistance
"
)
*
factor
end
)
71
registerscript
(
"
LeftMarginWidth
"
,
function
(
)
return
getdimen
(
"
leftmarginwidth
"
)
*
factor
end
)
72
registerscript
(
"
LeftMarginDistance
"
,
function
(
)
return
getdimen
(
"
leftmargindistance
"
)
*
factor
end
)
73
registerscript
(
"
TextWidth
"
,
function
(
)
return
getdimen
(
"
textwidth
"
)
*
factor
end
)
74
registerscript
(
"
RightMarginDistance
"
,
function
(
)
return
getdimen
(
"
rightmargindistance
"
)
*
factor
end
)
75
registerscript
(
"
RightMarginWidth
"
,
function
(
)
return
getdimen
(
"
rightmarginwidth
"
)
*
factor
end
)
76
registerscript
(
"
RightEdgeDistance
"
,
function
(
)
return
getdimen
(
"
rightedgedistance
"
)
*
factor
end
)
77
registerscript
(
"
RightEdgeWidth
"
,
function
(
)
return
getdimen
(
"
rightedgewidth
"
)
*
factor
end
)
78
registerscript
(
"
InnerMarginDistance
"
,
function
(
)
return
getdimen
(
"
innermargindistance
"
)
*
factor
end
)
79
registerscript
(
"
InnerMarginWidth
"
,
function
(
)
return
getdimen
(
"
innermarginwidth
"
)
*
factor
end
)
80
registerscript
(
"
OuterMarginDistance
"
,
function
(
)
return
getdimen
(
"
outermargindistance
"
)
*
factor
end
)
81
registerscript
(
"
OuterMarginWidth
"
,
function
(
)
return
getdimen
(
"
outermarginwidth
"
)
*
factor
end
)
82
registerscript
(
"
InnerEdgeDistance
"
,
function
(
)
return
getdimen
(
"
inneredgedistance
"
)
*
factor
end
)
83
registerscript
(
"
InnerEdgeWidth
"
,
function
(
)
return
getdimen
(
"
inneredgewidth
"
)
*
factor
end
)
84
registerscript
(
"
OuterEdgeDistance
"
,
function
(
)
return
getdimen
(
"
outeredgedistance
"
)
*
factor
end
)
85
registerscript
(
"
OuterEdgeWidth
"
,
function
(
)
return
getdimen
(
"
outeredgewidth
"
)
*
factor
end
)
86
registerscript
(
"
PageOffset
"
,
function
(
)
return
getdimen
(
"
pagebackgroundoffset
"
)
*
factor
end
)
87
registerscript
(
"
PageDepth
"
,
function
(
)
return
getdimen
(
"
pagebackgrounddepth
"
)
*
factor
end
)
88
registerscript
(
"
LayoutColumns
"
,
function
(
)
return
getcount
(
"
layoutcolumns
"
)
end
)
89
registerscript
(
"
LayoutColumnDistance
"
,
function
(
)
return
getdimen
(
"
layoutcolumndistance
"
)
*
factor
end
)
90
registerscript
(
"
LayoutColumnWidth
"
,
function
(
)
return
getdimen
(
"
layoutcolumnwidth
"
)
*
factor
end
)
91
registerscript
(
"
SpineWidth
"
,
function
(
)
return
getdimen
(
"
spinewidth
"
)
*
factor
end
)
92
registerscript
(
"
PaperBleed
"
,
function
(
)
return
getdimen
(
"
paperbleed
"
)
*
factor
end
)
93 94
registerscript
(
"
RealPageNumber
"
,
function
(
)
return
getcount
(
"
realpageno
"
)
end
)
95
registerscript
(
"
LastPageNumber
"
,
function
(
)
return
getcount
(
"
lastpageno
"
)
end
)
96 97
registerscript
(
"
PageNumber
"
,
function
(
)
return
getcount
(
"
pageno
"
)
end
)
98
registerscript
(
"
NOfPages
"
,
function
(
)
return
getcount
(
"
lastpageno
"
)
end
)
99 100
registerscript
(
"
SubPageNumber
"
,
function
(
)
return
getcount
(
"
subpageno
"
)
end
)
101
registerscript
(
"
NOfSubPages
"
,
function
(
)
return
getcount
(
"
lastsubpageno
"
)
end
)
102 103
registerscript
(
"
CurrentColumn
"
,
function
(
)
return
getcount
(
"
mofcolumns
"
)
end
)
104
registerscript
(
"
NOfColumns
"
,
function
(
)
return
getcount
(
"
nofcolumns
"
)
end
)
105 106
registerscript
(
"
BaseLineSkip
"
,
function
(
)
return
get
(
"
baselineskip
"
,
true
)
*
factor
end
)
107
registerscript
(
"
LineHeight
"
,
function
(
)
return
getdimen
(
"
lineheight
"
)
*
factor
end
)
108
registerscript
(
"
BodyFontSize
"
,
function
(
)
return
getdimen
(
"
bodyfontsize
"
)
*
factor
end
)
109 110
registerscript
(
"
TopSkip
"
,
function
(
)
return
get
(
"
topskip
"
,
true
)
*
factor
end
)
111
registerscript
(
"
StrutHeight
"
,
function
(
)
return
getdimen
(
"
strutht
"
)
*
factor
end
)
112
registerscript
(
"
StrutDepth
"
,
function
(
)
return
getdimen
(
"
strutdp
"
)
*
factor
end
)
113 114
registerscript
(
"
PageNumber
"
,
function
(
)
return
getcount
(
"
pageno
"
)
end
)
115
registerscript
(
"
RealPageNumber
"
,
function
(
)
return
getcount
(
"
realpageno
"
)
end
)
116
registerscript
(
"
NOfPages
"
,
function
(
)
return
getcount
(
"
lastpageno
"
)
end
)
117 118
registerscript
(
"
CurrentWidth
"
,
function
(
)
return
get
(
"
hsize
"
)
*
factor
end
)
119
registerscript
(
"
CurrentHeight
"
,
function
(
)
return
get
(
"
vsize
"
)
*
factor
end
)
120 121
registerscript
(
"
EmWidth
"
,
function
(
)
return
emwidths
[
false
]
*
factor
end
)
122
registerscript
(
"
ExHeight
"
,
function
(
)
return
exheights
[
false
]
*
factor
end
)
123 124
registerscript
(
"
HSize
"
,
function
(
)
return
get
(
"
hsize
"
)
*
factor
end
)
125
registerscript
(
"
VSize
"
,
function
(
)
return
get
(
"
vsize
"
)
*
factor
end
)
126
registerscript
(
"
LastPageNumber
"
,
function
(
)
return
getcount
(
"
lastpageno
"
)
end
)
127 128
registerscript
(
"
OverlayWidth
"
,
function
(
)
return
getdimen
(
"
d_overlay_width
"
)
*
factor
end
)
129
registerscript
(
"
OverlayHeight
"
,
function
(
)
return
getdimen
(
"
d_overlay_height
"
)
*
factor
end
)
130
registerscript
(
"
OverlayDepth
"
,
function
(
)
return
getdimen
(
"
d_overlay_depth
"
)
*
factor
end
)
131
registerscript
(
"
OverlayLineWidth
"
,
function
(
)
return
getdimen
(
"
d_overlay_linewidth
"
)
*
factor
end
)
132
registerscript
(
"
OverlayOffset
"
,
function
(
)
return
getdimen
(
"
d_overlay_offset
"
)
*
factor
end
)
133
registerscript
(
"
OverlayRegion
"
,
function
(
)
mpstring
(
getmacro
(
"
m_overlay_region
"
)
)
end
)
134
-- ("CurrentLayout", function() mpstring(getmacro("currentlayout")) end)
135 136
registerscript
(
"
PageFraction
"
,
page_fraction
)
137
registerscript
(
"
OnRightPage
"
,
on_right_page
)
138
registerscript
(
"
OnOddPage
"
,
is_odd_page
)
139
registerscript
(
"
InPageBody
"
,
in_body_page
)
140 141
registerscript
(
"
defaultcolormodel
"
,
defaultcolormodel
)
142 143
else
144 145
function
mp
.
PaperHeight
(
)
mpnumeric
(
getdimen
(
"
paperheight
"
)
*
factor
)
end
146
function
mp
.
PaperWidth
(
)
mpnumeric
(
getdimen
(
"
paperwidth
"
)
*
factor
)
end
147
function
mp
.
PrintPaperHeight
(
)
mpnumeric
(
getdimen
(
"
printpaperheight
"
)
*
factor
)
end
148
function
mp
.
PrintPaperWidth
(
)
mpnumeric
(
getdimen
(
"
printpaperwidth
"
)
*
factor
)
end
149
function
mp
.
TopSpace
(
)
mpnumeric
(
getdimen
(
"
topspace
"
)
*
factor
)
end
150
function
mp
.
BottomSpace
(
)
mpnumeric
(
getdimen
(
"
bottomspace
"
)
*
factor
)
end
151
function
mp
.
BackSpace
(
)
mpnumeric
(
getdimen
(
"
backspace
"
)
*
factor
)
end
152
function
mp
.
CutSpace
(
)
mpnumeric
(
getdimen
(
"
cutspace
"
)
*
factor
)
end
153
function
mp
.
MakeupHeight
(
)
mpnumeric
(
getdimen
(
"
makeupheight
"
)
*
factor
)
end
154
function
mp
.
MakeupWidth
(
)
mpnumeric
(
getdimen
(
"
makeupwidth
"
)
*
factor
)
end
155
function
mp
.
TopHeight
(
)
mpnumeric
(
getdimen
(
"
topheight
"
)
*
factor
)
end
156
function
mp
.
TopDistance
(
)
mpnumeric
(
getdimen
(
"
topdistance
"
)
*
factor
)
end
157
function
mp
.
HeaderHeight
(
)
mpnumeric
(
getdimen
(
"
headerheight
"
)
*
factor
)
end
158
function
mp
.
HeaderDistance
(
)
mpnumeric
(
getdimen
(
"
headerdistance
"
)
*
factor
)
end
159
function
mp
.
TextHeight
(
)
mpnumeric
(
getdimen
(
"
textheight
"
)
*
factor
)
end
160
function
mp
.
FooterDistance
(
)
mpnumeric
(
getdimen
(
"
footerdistance
"
)
*
factor
)
end
161
function
mp
.
FooterHeight
(
)
mpnumeric
(
getdimen
(
"
footerheight
"
)
*
factor
)
end
162
function
mp
.
BottomDistance
(
)
mpnumeric
(
getdimen
(
"
bottomdistance
"
)
*
factor
)
end
163
function
mp
.
BottomHeight
(
)
mpnumeric
(
getdimen
(
"
bottomheight
"
)
*
factor
)
end
164
function
mp
.
LeftEdgeWidth
(
)
mpnumeric
(
getdimen
(
"
leftedgewidth
"
)
*
factor
)
end
165
function
mp
.
LeftEdgeDistance
(
)
mpnumeric
(
getdimen
(
"
leftedgedistance
"
)
*
factor
)
end
166
function
mp
.
LeftMarginWidth
(
)
mpnumeric
(
getdimen
(
"
leftmarginwidth
"
)
*
factor
)
end
167
function
mp
.
LeftMarginDistance
(
)
mpnumeric
(
getdimen
(
"
leftmargindistance
"
)
*
factor
)
end
168
function
mp
.
TextWidth
(
)
mpnumeric
(
getdimen
(
"
textwidth
"
)
*
factor
)
end
169
function
mp
.
RightMarginDistance
(
)
mpnumeric
(
getdimen
(
"
rightmargindistance
"
)
*
factor
)
end
170
function
mp
.
RightMarginWidth
(
)
mpnumeric
(
getdimen
(
"
rightmarginwidth
"
)
*
factor
)
end
171
function
mp
.
RightEdgeDistance
(
)
mpnumeric
(
getdimen
(
"
rightedgedistance
"
)
*
factor
)
end
172
function
mp
.
RightEdgeWidth
(
)
mpnumeric
(
getdimen
(
"
rightedgewidth
"
)
*
factor
)
end
173
function
mp
.
InnerMarginDistance
(
)
mpnumeric
(
getdimen
(
"
innermargindistance
"
)
*
factor
)
end
174
function
mp
.
InnerMarginWidth
(
)
mpnumeric
(
getdimen
(
"
innermarginwidth
"
)
*
factor
)
end
175
function
mp
.
OuterMarginDistance
(
)
mpnumeric
(
getdimen
(
"
outermargindistance
"
)
*
factor
)
end
176
function
mp
.
OuterMarginWidth
(
)
mpnumeric
(
getdimen
(
"
outermarginwidth
"
)
*
factor
)
end
177
function
mp
.
InnerEdgeDistance
(
)
mpnumeric
(
getdimen
(
"
inneredgedistance
"
)
*
factor
)
end
178
function
mp
.
InnerEdgeWidth
(
)
mpnumeric
(
getdimen
(
"
inneredgewidth
"
)
*
factor
)
end
179
function
mp
.
OuterEdgeDistance
(
)
mpnumeric
(
getdimen
(
"
outeredgedistance
"
)
*
factor
)
end
180
function
mp
.
OuterEdgeWidth
(
)
mpnumeric
(
getdimen
(
"
outeredgewidth
"
)
*
factor
)
end
181
function
mp
.
PageOffset
(
)
mpnumeric
(
getdimen
(
"
pagebackgroundoffset
"
)
*
factor
)
end
182
function
mp
.
PageDepth
(
)
mpnumeric
(
getdimen
(
"
pagebackgrounddepth
"
)
*
factor
)
end
183
function
mp
.
LayoutColumns
(
)
mpnumeric
(
getcount
(
"
layoutcolumns
"
)
)
end
184
function
mp
.
LayoutColumnDistance
(
)
mpnumeric
(
getdimen
(
"
layoutcolumndistance
"
)
*
factor
)
end
185
function
mp
.
LayoutColumnWidth
(
)
mpnumeric
(
getdimen
(
"
layoutcolumnwidth
"
)
*
factor
)
end
186
function
mp
.
SpineWidth
(
)
mpnumeric
(
getdimen
(
"
spinewidth
"
)
*
factor
)
end
187
function
mp
.
PaperBleed
(
)
mpnumeric
(
getdimen
(
"
paperbleed
"
)
*
factor
)
end
188 189
function
mp
.
RealPageNumber
(
)
mpnumeric
(
getcount
(
"
realpageno
"
)
)
end
190
function
mp
.
LastPageNumber
(
)
mpnumeric
(
getcount
(
"
lastpageno
"
)
)
end
191 192
function
mp
.
PageNumber
(
)
mpnumeric
(
getcount
(
"
pageno
"
)
)
end
193
function
mp
.
NOfPages
(
)
mpnumeric
(
getcount
(
"
lastpageno
"
)
)
end
194 195
function
mp
.
SubPageNumber
(
)
mpnumeric
(
getcount
(
"
subpageno
"
)
)
end
196
function
mp
.
NOfSubPages
(
)
mpnumeric
(
getcount
(
"
lastsubpageno
"
)
)
end
197 198
function
mp
.
CurrentColumn
(
)
mpnumeric
(
getcount
(
"
mofcolumns
"
)
)
end
199
function
mp
.
NOfColumns
(
)
mpnumeric
(
getcount
(
"
nofcolumns
"
)
)
end
200 201
function
mp
.
BaseLineSkip
(
)
mpnumeric
(
get
(
"
baselineskip
"
,
true
)
*
factor
)
end
202
function
mp
.
LineHeight
(
)
mpnumeric
(
getdimen
(
"
lineheight
"
)
*
factor
)
end
203
function
mp
.
BodyFontSize
(
)
mpnumeric
(
getdimen
(
"
bodyfontsize
"
)
*
factor
)
end
204 205
function
mp
.
TopSkip
(
)
mpnumeric
(
get
(
"
topskip
"
,
true
)
*
factor
)
end
206
function
mp
.
StrutHeight
(
)
mpnumeric
(
getdimen
(
"
strutht
"
)
*
factor
)
end
207
function
mp
.
StrutDepth
(
)
mpnumeric
(
getdimen
(
"
strutdp
"
)
*
factor
)
end
208 209
function
mp
.
PageNumber
(
)
mpnumeric
(
getcount
(
"
pageno
"
)
)
end
210
function
mp
.
RealPageNumber
(
)
mpnumeric
(
getcount
(
"
realpageno
"
)
)
end
211
function
mp
.
NOfPages
(
)
mpnumeric
(
getcount
(
"
lastpageno
"
)
)
end
212 213
function
mp
.
CurrentWidth
(
)
mpnumeric
(
get
(
"
hsize
"
)
*
factor
)
end
214
function
mp
.
CurrentHeight
(
)
mpnumeric
(
get
(
"
vsize
"
)
*
factor
)
end
215 216
function
mp
.
EmWidth
(
)
mpnumeric
(
emwidths
[
false
]
*
factor
)
end
217
function
mp
.
ExHeight
(
)
mpnumeric
(
exheights
[
false
]
*
factor
)
end
218 219
function
mp
.
OverlayWidth
(
)
mpnumeric
(
getdimen
(
"
d_overlay_width
"
)
*
factor
)
end
220
function
mp
.
OverlayHeight
(
)
mpnumeric
(
getdimen
(
"
d_overlay_height
"
)
*
factor
)
end
221
function
mp
.
OverlayDepth
(
)
mpnumeric
(
getdimen
(
"
d_overlay_depth
"
)
*
factor
)
end
222
function
mp
.
OverlayLineWidth
(
)
mpnumeric
(
getdimen
(
"
d_overlay_linewidth
"
)
*
factor
)
end
223
function
mp
.
OverlayOffset
(
)
mpnumeric
(
getdimen
(
"
d_overlay_offset
"
)
*
factor
)
end
224
function
mp
.
OverlayRegion
(
)
mpstring
(
getmacro
(
"
m_overlay_region
"
)
)
end
225 226
function
mp
.
PageFraction
(
)
mpnumeric
(
page_fraction
(
)
)
end
227
function
mp
.
OnRightPage
(
)
mpboolean
(
on_right_page
(
)
)
end
228
function
mp
.
OnOddPage
(
)
mpboolean
(
is_odd_page
(
)
)
end
229
function
mp
.
InPageBody
(
)
mpboolean
(
in_body_page
(
)
)
end
230 231
function
mp
.
OverlayWidth
(
)
mpnumeric
(
getdimen
(
"
d_overlay_width
"
)
*
factor
)
end
232
function
mp
.
OverlayHeight
(
)
mpnumeric
(
getdimen
(
"
d_overlay_height
"
)
*
factor
)
end
233
function
mp
.
OverlayDepth
(
)
mpnumeric
(
getdimen
(
"
d_overlay_depth
"
)
*
factor
)
end
234
function
mp
.
OverlayLineWidth
(
)
mpnumeric
(
getdimen
(
"
d_overlay_linewidth
"
)
*
factor
)
end
235
function
mp
.
OverlayOffset
(
)
mpnumeric
(
getdimen
(
"
d_overlay_offset
"
)
*
factor
)
end
236
function
mp
.
OverlayRegion
(
)
mpstring
(
getmacro
(
"
m_overlay_region
"
)
)
end
237
-- mp.CurrentLayout () mpstring (getmacro("currentlayout")) end
238 239
function
mp
.
defaultcolormodel
(
)
mpnumeric
(
defaultcolormodel
(
)
)
end
240 241
mp
.
HSize
=
mp
.
CurrentWidth
242
mp
.
VSize
=
mp
.
CurrentHeight
243
mp
.
LastPageNumber
=
mp
.
NOfPages
244 245
-- not much difference (10000 calls in a graphic neither as expansion seems to win
246
-- over defining the macro etc) so let's not waste counters then
247 248
-- function mp.OverlayColor()
249
-- local c = mpcolor(
250
-- getcount("c_overlay_colormodel"),
251
-- getcount("c_overlay_color"),
252
-- getcount("c_overlay_transparency")
253
-- )
254
-- mpquoted(c)
255
-- end
256
--
257
-- function mp.OverlayLineColor()
258
-- local c = mpcolor(
259
-- getcount("c_overlay_colormodel"),
260
-- getcount("c_overlay_linecolor"),
261
-- getcount("c_overlay_linetransparency")
262
-- )
263
-- mpquoted(c)
264
-- end
265 266
end
267 268 269