grph-epd.mkiv /size: 3271 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=grph-epd,
3
%D version=2010.07.29,
4
%D title=\CONTEXT\ Graphic Macros,
5
%D subtitle=Merging Goodies,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\writestatus
{
loading
}{
ConTeXt
Graphic
Macros
/
Merging
Goodies
}
15 16
\unprotect
17 18
\registerctxluafile
{
grph
-
epd
}{}
19 20
\def
\figurereference
{
\clf_figurestatus
{
reference
}{}}
% might become private
21 22
\defineoverlay
[
system
:
graphics
:
epdf
][
\directsetup
{
system
:
graphics
:
epdf
}
]
23 24
\startsetups
system
:
graphics
:
epdf
25
\clf_figure_mergegoodies
{
\externalfigureparameter
\c!interaction
}
%
26
\reference
[
\figurereference
]
{}
% todo: dest area
27
\stopsetups
28 29
\defineframed
30
[
system
_
graphics
_
epdf
]
31
[
\c!frame
=
\v!off
,
32
\c!offset
=
\v!overlay
,
33
\c!background
=
{
\v!foreground
,
system
:
graphics
:
epdf
}
]
34 35
\unexpanded
\def
\grph_epdf_add_overlay
36
{
\global\setbox
\foundexternalfigure
\vbox
\bgroup
% vpack ?
37
\system_graphics_epdf
{
\box
\foundexternalfigure
}
%
38
\egroup
}
39 40
\appendtoks
41
\iflocation
42
\doif
\figurefiletype
{
pdf
}{
\doifnot
{
\externalfigureparameter
\c!interaction
}
\v!none
\grph_epdf_add_overlay
}
%
43
\fi
44
\to
\externalfigurepostprocessors
45 46
\defineframed
47
[
epdfstampsymbol
]
48
[
\c!foregroundstyle
=
\v!mono
,
49
\c!background
=
\c!color
,
50
\c!rulethickness
=
.
1
2
5
\exheight
,
51
\c!offset
=
.
2
5
0
\exheight
,
52
\c!backgroundcolor
=
lightgray
,
% can be adapted before first usage
53
\c!framecolor
=
darkgray
,
% can be adapted before first usage
54
\c!corner
=
\v!round
]
55 56
\definesymbol
[
Stamped
]
[
\epdfstampsymbol
{
Stamped
}
]
57 58
\definesymbol
[
Approved
]
[
\epdfstampsymbol
{
Approved
}
]
59
\definesymbol
[
Experimental
]
[
\epdfstampsymbol
{
Experimental
}
]
60
\definesymbol
[
NotApproved
]
[
\epdfstampsymbol
{
NotApproved
}
]
61
\definesymbol
[
AsIs
]
[
\epdfstampsymbol
{
AsIs
}
]
62
\definesymbol
[
Expired
]
[
\epdfstampsymbol
{
Expired
}
]
63
\definesymbol
[
NotForPublicRelease
]
[
\epdfstampsymbol
{
NotForPublicRelease
}
]
64
\definesymbol
[
Confidential
]
[
\epdfstampsymbol
{
Confidential
}
]
65
\definesymbol
[
Final
]
[
\epdfstampsymbol
{
Final
}
]
66
\definesymbol
[
Sold
]
[
\epdfstampsymbol
{
Sold
}
]
67
\definesymbol
[
Departmental
]
[
\epdfstampsymbol
{
Departmental
}
]
68
\definesymbol
[
ForComment
]
[
\epdfstampsymbol
{
ForComment
}
]
69
\definesymbol
[
TopSecret
]
[
\epdfstampsymbol
{
TopSecret
}
]
70
\definesymbol
[
Draft
]
[
\epdfstampsymbol
{
Draft
}
]
71
\definesymbol
[
ForPublicRelease
]
[
\epdfstampsymbol
{
ForPublicRelease
}
]
72 73 74
\protect
\endinput
75 76
% /Properties << /xxxx 22 0 R >>
77
% 21 0 obj << /Type /OCG /Name (xxxx) >> endobj
78
% 22 0 obj << /OCGs [ 21 0 R ] /Type /OCMD >> endobj
79 80
% \def\setepdflayer#1#2#3#4#5#6% x y w h (in bp) 0/1 destination
81
% {\setlayer
82
% [epdflinks]
83
% [\c!x=#1bp,\c!y=#1\s!bp,\c!preset=\v!leftbottom]
84
% {\button
85
% [\c!width=#3\s!bp,\c!height=#4\s!bp,\c!offset=\v!overlay,\c!frame=\ifnum#5=1 on\else\v!off]%
86
% {}[#6]}}
87 88
% \def\setepdflayer#1#2#3#4#5#6% x y w h (in bp) 0/1 destination
89
% {\setlayer
90
% [epdflinks]
91
% [\c!x=#1bp,\c!y=#1\s!bp,\c!preset=\v!leftbottom]
92
% {\gotowdhtbox{#3\s!bp}{#4\s!bp}[#6]}}
93