On 11/10/2023 6:17 PM, Pablo Rodriguez via ntg-context wrote:
Dear list,
I have the following sample:
\setuplayout[page]
\starttext
\clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm]
{\externalfigure[xml-mkiv.pdf]}
\stopnotmode
\stoptext
Using PDF.js (from
Dear list,
I have the following sample:
\setuplayout[page]
\starttext
\clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm]
{\externalfigure[xml-mkiv.pdf]}
\stopnotmode
\stoptext
Using PDF.js (from current Firefox), xpdf, Evince, mupdf-gl, the viewer
is able to find
icture;
enddef;
tile_from_string (gray10,
" ... /"&
" .*. /"&
" ... ");
tile_from_string (gray25,
" .. /"&
" *. ");
tile_from_string (gray50,
" .* /"&
" *. ");
tile_from_string (gray75,
On 2/15/2023 5:35 PM, Pablo Rodriguez via ntg-context wrote:
On 2/14/23 22:43, Hans Hagen via ntg-context wrote:
On 2/14/2023 7:41 PM, Pablo Rodriguez via ntg-context wrote:
[...]
Given this sample, is there any way to include the page (or the whole
document) with the media clip and all its
On 2/14/23 22:43, Hans Hagen via ntg-context wrote:
> On 2/14/2023 7:41 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Given this sample, is there any way to include the page (or the whole
>> document) with the media clip and all its functionalty?
> currently
][audio.mp3]
[embed=yes, auto]
\placerenderingwindow[myrenderingwindow][key-name]
\page
\null\page
\stoptext
I want to include the second page in another document.
\externalfigure[document.pdf][page=2, interaction=all] would be the
right command, but it looses the media clip.
A complete
][key-name]
\page
\null\page
\stoptext
I want to include the second page in another document.
\externalfigure[document.pdf][page=2, interaction=all] would be the
right command, but it looses the media clip.
A complete sample would be:
\setupinteraction[state=start]
\starttext
MediaScreenParams"),
+BE = pdfdictionary {
+O = tonumber(option[v_opacity]) or 1.0,
+},
+}
local clip = pdfdictionary {
Type = pdfconstant("MediaClip"),
S= pdfconstant("MCD&qu
ename ~= "" then
local isurl= find(filename,"://",1,true)
local mimetype = specification.mimetype or specification.mime
-- local start = pdfdictionary {
-- Type = pdfconstant("MediaOffset"),
-- S = pdfconst
&&
> for i = d step d until diag:
> (-diag, i) -- (diag, i) &&
> (-diag,-i) -- (diag,-i) &&
> endfor nocycle
> withpen currentpen ;
> ) ;
> thestripe := thestripe shifted center boundingbox p ;
> thestripe := thestripe rotatedaround(center boundingbox p, a)
box p)) ) ;
thestripe := image (
draw (-diag,0) -- (diag, 0) &&
for i = d step d until diag:
(-diag, i) -- (diag, i) &&
(-diag,-i) -- (diag,-i) &&
endfor nocycle
withpen currentpen ;
) ;
thestripe := thestripe shifted center boundingbox p ;
thestripe := thestripe rotatedaround(c
fying the individual files themselves.
>> [...]
>> The problem is the original page numbers show and I’d prefer that it
>> did not. So I thought maybe I could clip all the page numbers from
>> every page (since they are all in the same position across all the
>> pages
odriguez via ntg-context
> wrote:
>
> On 8/18/22 02:13, jethro Reuel via ntg-context wrote:
>> Hello,
>>
>> I am trying to put multiple PDF’s that were typeset differently into
>> one document without modifying the individual files themselves.
>> [...]
>>
xt <
ntg-context@ntg.nl> wrote:
On 8/18/22 02:13, jethro Reuel via ntg-context wrote:
Hello,
I am trying to put multiple PDF’s that were typeset differently into
one document without modifying the individual files themselves.
[...]
The problem is the original page numbers show and I’d prefer
it
> did not. So I thought maybe I could clip all the page numbers from
> every page (since they are all in the same position across all the
> pages) but I don’t know how to do this with the \clip command. Any
> ideas? I already tried using \input but it gives some weird output in
> so
show and I’d prefer that it did not.
So I thought maybe I could clip all the page numbers from every page (since
they are all in the same position across all the pages) but I don’t know how to
do this with the \clip command. Any ideas? I already tried using \input but it
gives some weird output
Am 12.08.22 um 13:10 schrieb Wolfgang Schuster via ntg-context:
Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57:
Hi, can ConTeXt make rounded image corners?
\setupexternalfigures[location=default]
\starttext
\startMPclip{rounded corner}
clip currentpicture
][{%
\externalfigure[mill][width=\overlaywidth]
}]
\framed[background=Mill,width=3cm,height=4cm,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
offset=overlay]{}
\setupexternalfigures[location=default]
\starttext
\startMPclip{rounded corner}
clip currentpicture
[pageinjection:chapter:image]
\clip
[width=\framedwidth,height=\framedheight]
{\centerbox{%
\externalfigure
[\dummyparameter{name}]
[%factor=,
width=\structureuservariable{width},
height=\structureuservariable{height
images of cows, 'spider', 'hacker' and 'mill' and have them
renamed as {chap-cover-1, ... chap-cover-6} for a total of 6 chapter images.
%%% start example
\definepageinjectionalternative
[chapter:image]
[renderingsetup=pageinjection:chapter:image]
\startsetups [pageinjection:chapter:imag
s userdata argument of \startchapter but in the commented \setuphead
setting you can see how this can be automated.
begin example
% \definepageinjectionalternative
% [chapter:image]
% [renderingsetup=pageinjection:chapter:image]
%
% \startsetups [pageinjection:chapter:image]
% \clip
%
a argument of \startchapter but in the commented \setuphead
setting you can see how this can be automated.
begin example
% \definepageinjectionalternative
% [chapter:image]
% [renderingsetup=pageinjection:chapter:image]
%
% \startsetups [pageinjection:chapter:image]
% \clip
%
true,
> xmin=-3.2488079448294145,
> xmax=34.87398305791419,
> ymin=-7.496155590728956,
> ymax=11.53265632858922,
> xtick={-3.0,-2.0,...,34.0},
> ytick={-7.0,-6.0,...,11.0},]
> %\clip(-3.2488079448294145,-7.496155590728956) rectangle
> (34.87398305791419,11.53265632858922);
2.0,...,34.0},
ytick={-7.0,-6.0,...,11.0},]
%\clip(-3.2488079448294145,-7.496155590728956) rectangle
(34.87398305791419,11.53265632858922);
\addplot[line
width=2.pt,color=ffvvqq,smooth,samples=100,domain=-3.2488079448294145:34.87398305791419]{x+3}
node[below right, pos= 0.1]{$h$};
\stopa
min=-3.2488079448294145,
xmax=34.87398305791419,
ymin=-7.496155590728956,
ymax=11.53265632858922,
xtick={-3.0,-2.0,...,34.0},
ytick={-7.0,-6.0,...,11.0},]
\clip(-3.2488079448294145,-7.496155590728956) rectangle
(34.87398305791419,11.53265632858922);
\draw[line
width=2.pt,color=ffvvqq,smooth,samples=
cify a different display style using setups. The definition for
> \Part is below, \Chapter is very similar so I haven't included it.
>
> %% Double rule above part title
> \startsetups PartSetup
> \setupheader[state=empty]
> \par
> \startMPcode
>draw (0,2mm)--(TextWidth
Double rule above part title
\startsetups PartSetup
\setupheader[state=empty]
\par
\startMPcode
draw (0,2mm)--(TextWidth,2mm) withpen pensquare scaled 1.5mm ;
draw (0,0)--(TextWidth,0) withpen pensquare scaled 1.0mm ;
clip currentpicture to unitsquare yscaled 1cm xscaled TextWidth
\stop
gt;> completely useless when you want to visually scan down the list for a
>>> particular person.
>>
>> It doesn’t make sense to argue about this, but it’s apparently a setting (or
>> unchangeable behavior) of your Email app.
>>
>> My Apple Mail 12.4 on
ocal rendition = pdfdictionary {
Type = pdfconstant("Rendition"),
S= pdfconstant("MR"),
-N= label,
+N= pdfunicode(label),
C= pdfreference(pdfflushobject(clip)),
}
ard specifies that the name (/N) of Rendition PDF
> object should be Unicode, but that doesn't seem to make it work either,
> as does deleting the name of the media clip (which was the same).
>
> (But I now get "Invalid arguments" error for the "app.media.openPlayer"
> ca
ject, the rendition query returns null.
The PDF 1.7 standard specifies that the name (/N) of Rendition PDF
object should be Unicode, but that doesn't seem to make it work either,
as does deleting the name of the media clip (which was the same).
(But I now get "Invalid arguments" error fo
ently a setting (or
> unchangeable behavior) of your Email app.
>
> My Apple Mail 12.4 on Mojave shows the same message like attached (dark mode).
I'm on Big Sur and I don't get the "name via ntg-context"
e, -- yes or no
-compress = false,
+file = filename,
+mimetype = mimetype, -- yes or no
+compress = false,
+forcereference = true,
}
end
local clip = pdfdictionary {
Player)
+}
local descriptor = pdfdictionary {
Type = pdfconstant("Filespec"),
F= filename,
}
if isurl then
descriptor.FS = pdfconstant("URL")
+descriptor = pdfreference(pdfflushobject(descriptor))
;
draw G -- z[i+1] dashed evenly;
draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
clip currentpicture to q;
enddef;
def linesUD(expr i) =
draw p;
draw z0 for k=0 upto i+1: --z[k] endfor dashed evenly;
% AM: removed. Set in in the main code
%
M-N))*u] = whatever[C,D];
>fi;
>H
>enddef;
>
>def grayUD(expr i) =
> draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
> filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u --
> cycle withcolor .75white;
>
aw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u --
cycle withcolor .75white;
draw G -- z[i+1] dashed evenly;
draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
clip currentpicture to
) =
draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u --
cycle withcolor .75white;
draw G -- z[i+1] dashed evenly;
draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
clip currentpicture to q
h q ; q := pattern xscaled patternlength yscaled patternheight
>> rotated (angle(stp)) ;
>>p := a ;
>>forever :
>>draw
>>q shifted p
>>withpen pencircle scaled linewidth
>&g
for ;
endgroup ;
clip currentpicture to
(xpart llcorner currentpicture, ypart b) --
(xpart lrcorner currentpicture, ypart b) --
(xpart urcorner currentpicture, ypart a) --
(xpart ulcorner currentpicture, ypart a) -- cycle ;
) ;
enddef ;
Thank
q shifted p
withpen pencircle scaled linewidth
withcolor linecolor ;
p := p + stp ;
exitif arclength( a -- p ) > arclength( a -- b ) ;
endfor ;
endgroup ;
clip currentpict
,
> > fillcolor = "white",
> > kind = "reverse",
> > align = "r2l",
> > ] scaled 3mm;
> > \stopMPcode
> > \stoptext
> >
> > 1. This works well on a plain background. I can specify the background
> > color in fillcol
uot;,
> kind = "reverse",
> align = "r2l",
> ] scaled 3mm;
> \stopMPcode
> \stoptext
>
> 1. This works well on a plain background. I can specify the background
> color in fillcolor and get the outline effect. When the background is an
> ima
nd. I can specify the background
color in fillcolor and get the outline effect. When the background is an
image, this does not work too well. Can we use some clip trickery to allow
for "transparent" fill? Ideally I want to set the fillcolor to a special
value that would lead to o
i;
endfor ;
eofill bb withcolor "darkgreen" ; % you need to specify your
background
clip currentpicture to bb ;
\stopMPpage
I think I should add that to the metafun manual.
Hans
-
p := bb enlarged 2cm ;
fill pp
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue) ;
for i within tt :
nofill pathpart i;
endfor ;
eofill bb withcolor "darkgreen" ; % you need to specify your
background
clip cur
}%
\hbox{\char103}%
\hbox{\char104}%
\stopTEXpage
\startsetups box:demo:whatever
\startMPcode
picture p ; p := image (draw figure "hacker.jpg" ysized 10pt);
fill boundingbox p enlarged .5pt randomized 2pt withcolor
"darkgray" ;
clip p to boundin
On 1/20/2021 11:24 AM, Henning Hraban Ramm wrote:
In the following example, the image is calculated after the clipped width, but
the full image is shown:
\setupexternalfigures[location=default]
\showframe
\starttext
\strut
\hfill\clip[width=20mm]{\externalfigure[cow][height=30mm]}
\stoptext
In the following example, the image is calculated after the clipped width, but
the full image is shown:
\setupexternalfigures[location=default]
\showframe
\starttext
\strut
\hfill\clip[width=20mm]{\externalfigure[cow][height=30mm]}
\stoptext
This happens in current LMTX (2020-01-18
Hi,
I am afraid that clip stops working in
current version: 2021.01.18 18:19
\setupexternalfigure[location=default]
\showframe
\starttext
\clip[height=50mm,voffset=10mm]
{\externalfigure[cow.pdf][width=\textwidth]}
\stoptext
juh
--
Autoren-Homepage: . http
On 1/19/2021 8:12 PM, Jan U. Hasecke wrote:
Hi,
I am afraid that clip stops working in
current version: 2021.01.18 18:19
\setupexternalfigure[location=default]
\showframe
\starttext
\clip[height=50mm,voffset=10mm]
{\externalfigure[cow.pdf][width=\textwidth]}
\stoptext
hm, i access
On 12/9/20 9:38 AM, Jan U. Hasecke wrote:
> Dear all,
>
> I use \clip to simplify working with images.
Hi Jan-Ulrich,
this command is really useful.
> In my real document the clipped image is shifted to the right as if
> indented by 1em or so.
I have read that Hans solved
Am 09.12.20 um 11:26 schrieb Hans Hagen:
> what if you put \removeunwantedspaces in front of the clip
The space vanishes when I put it right before \externalfigure.
Thanks a lot, Hans!
(Still, I would like to know how the space came up in the first place.)
Dear all,
I use \clip to simplify working with images.
I have a problem that I am unable to reproduce in a MWE.
\setupexternalfigure[location=default]
\showframe
\starttext
\externalfigure[cow.pdf][width=\textwidth]
\clip[height=50mm]
{\externalfigure[cow.pdf][width=\textwidth
On 12/9/2020 12:08 PM, Jan U. Hasecke wrote:
Am 09.12.20 um 11:26 schrieb Hans Hagen:
what if you put \removeunwantedspaces in front of the clip
The space vanishes when I put it right before \externalfigure.
Thanks a lot, Hans!
(Still, I would like to know how the space came up in the first
On 12/9/2020 9:38 AM, Jan U. Hasecke wrote:
Dear all,
I use \clip to simplify working with images.
I have a problem that I am unable to reproduce in a MWE.
\setupexternalfigure[location=default]
\showframe
\starttext
\externalfigure[cow.pdf][width=\textwidth]
\clip[height=50mm
o argument is also valid.
>
> \externalfigure[dummy][width=,height=.5\textheight]
I thought so and was sure I tried it and got an error, but I recognized I tried
"width=," with \clip, and that can’t work, of course.
Sorry for the noise.
Hraban
__
on) across a two-page
> spread, such that there is no gap.
You need to use \clip and calculate the sections.
Thangalin already gave you an example. Here’s a convoluted one that I use:
% full double page image
% usage:
% \startpostponing[pagenumber]
% \doublepagefig[reference][left/right/width/he
Would something like this work?
\setupbackgrounds[page][
background={BookIllustrationLayer},
]
\definelayer[BookIllustrationLayer][
width=\paperwidth,
height=.5\paperheight,
y=.5\paperheight,
position=no,
repeat=no,
]
\setlayer[BookIllustrationLayer]{%
\clip[x=\doifelseoddpage
Does anyone know?
Using the latest LMTX, i try to clip some portion of an external pdf
page, then resize that portion on top a new page.
i use the \clip command.
\starttext
\scale[width=100mm, hwight=100mm]{\clip[width=150mm, height=120mm,
hoffset=30mm, voffset=40mm]{\externalfigure[drawing.pdf
Zitat von Hans Hagen :
On 7/8/2019 12:26 PM, Henning Hraban Ramm wrote:
I found the culprit, it’s \clip :
\setuppapersize[A6][C6]
\setuplayout[
location=middle,
marking=on,
]
\starttext
\clip[
hoffset=\textwidth,
voffset=5mm,
width=\pagewidth
On 7/8/2019 12:26 PM, Henning Hraban Ramm wrote:
I found the culprit, it’s \clip :
\setuppapersize[A6][C6]
\setuplayout[
location=middle,
marking=on,
]
\starttext
\clip[
hoffset=\textwidth,
voffset=5mm,
width=\pagewidth,
height=\pageheight
I found the culprit, it’s \clip :
\setuppapersize[A6][C6]
\setuplayout[
location=middle,
marking=on,
]
\starttext
\clip[
hoffset=\textwidth,
voffset=5mm,
width=\pagewidth,
height=\pageheight
On Fri, 17 May 2019 09:43:29 +0200
Rudolf Bahr wrote:
> And then the same .png-image
> to which I added a red frame by GIMP2.10. This one shows artefacts in
> ConTeXt!
I *always* use MetaPost to add features (and to clip) images.
These features (arrows, labels, etc.) are then
.91,
xtick={-12,-11,...,12},
ytick={-13,-12,...,8},]
\clip(-12.68,-13.47) rectangle (12.68,8.91);
\fill[line width=2pt,color=zzttqq,fill=zzttqq,fill opacity=0.1000149011612]
(-7.7,2.75) -- (0.88,2.57) -- (-3.04,-3.37) -- cycle;
\draw [line width=2pt,color=zzttqq] (-7.7,2.75)-- (0.88,2.57);
\draw [l
max=12.678,
ymin=-13.472,
ymax=8.91,
xtick={-12,-11,...,12},
ytick={-13,-12,...,8},]
\clip(-12.68,-13.47) rectangle (12.68,8.91);
\fill[line width=2pt,color=zzttqq,fill=zzttqq,fill opacity=0.1000149011612]
(-7.7,2.75) -- (0.88,2.57) -- (-3.04,-3.37) -- cycle;
\draw [line width=2pt,co
shifted (0mm, -4mm);
fill p withcolor red ;
clip currentpicture to q ;
clip currentpicture to r ;
draw p ;
draw q ;
draw r ;
> On 7 Oct 2018, at 13:19, Mikael P. Sundqvist wrote:
>
> On Sun, Oct 7, 2018 at 1:10 PM Floris van Manen wrote:
>>
>> Could someone poin
.st1{fill:#FF;}
.st2{fill:#DD4901;}
.st3{fill:#327AB8;}
.st4{fill:none;}
.st5{clip-path:url(#SVGID_2_);}
.st6{clip-path:url(#SVGID_4_);}
.st7{clip-path:url(#SVGID_6_);}
.st8{clip-path:url(#SVGID_8_);}
When I pick the screen colors wit
Dear list,
I’m interesting in embedding media clip objects (sounds) in PDF
documents and using them with JavaScript (something I’d have to learn
later).
I found the \useexternalsoundtrack command, but I don’t get it working
(https://mailman.ntg.nl/pipermail/ntg-context/2006/016503.html).
I
postponing is important, otherwise the page numbering gets wrong
> > > \def\pagefig{\dosingleempty\doPagefig}
> > > \def\doPagefig[#1]#2#3{
> > > % calculate image size
> > > \startfullpagemakeup
> > >\externalfigure[#3][width=1mm] % dummy to set ima
the image
extends outside of the borders of the frame. A option to clip parts –
which can be
disabled – of the image which are outside of the frame would be a nice
extension
to this command (e.g. in case you want a image in a table cell).
\setupexternalfigure[location=default]
\defineframed
t;, \Resolution)}}
\def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
% image
\setlayerframed[bglayer][%
frame=off,
offset=overlay,
x=21mm,
y=\mystartY,
height=\myClipHeight,
width=\textwidth,
align=flushleft,
]{%
\clip[
width=\te
ight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
> \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
> % image
> \setlayerframed[bglayer][%
> frame=off,
> offset=overlay,
> x=21mm,
> y=\mystartY,
> height=\myClipHeight,
> wid
pHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
\def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
% image
\setlayerframed[bglayer][%
frame=off,
offset=overlay,
x=21mm,
y=\mystartY,
height=\myClipHeight,
width=\textwidth,
align=flushleft,
]{%
ure[#1][#2]{
>> \ifsecondargument
>> \dorecurse{#1}{%
>> \tooltip{\clip[
>> height=\textheight,
>> voffset=\dimexpr((\recurselevel - 1)\textheight),]{%
>
> voffset=\numexpr(\recurselevel -1)\textheight]{%
Aha, numexpr. Danke!
Am 2017-09-10 um 10:09
Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm:
My current code actually looks like
% split in #1 page size parts
\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
\ifsecondargument
\dorecurse{#1}{%
\tooltip{\clip[
height=\textheight,
voffset=\dimexpr
Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm:
\def\ausschnitt{\dodoubleempty\doAusschnitt}
\def\doAusschnitt#1#2{\clip[height=\textheight,voffset=#1]{\externalfigure[#2][width=\textwidth]}\par}
This also doesn’t work; there I’m trying to set the y coordinate for the start
like
def\doClipFigure[#1][#2]{
>> \dorecurse{#1}{%
>> \clip[
>>height=\textheight,
>>voffset=\dimexpr((\recurselevel -1) * \textheight)
>> ]{\externalfigure[#2][width=\textwidth]}\par
>> }
>> }
>>
>> \clipfigure[3][verylongimage]
>>
On Sat, 9 Sep 2017, Henning Hraban Ramm wrote:
Ahoi,
I got some long images that I’d like to split over several pages.
\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
\dorecurse{#1}{%
\clip[
height=\textheight,
voffset=\dimexpr((\recurselevel -1
Ahoi,
I got some long images that I’d like to split over several pages.
\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
\dorecurse{#1}{%
\clip[
height=\textheight,
voffset=\dimexpr((\recurselevel -1) * \textheight)
]{\externalfigure[#2][width=\textwidth
On 12/18/2016 11:00 PM, Benjamin Buchmuller wrote:
Hi Hans,
I finally managed to make a MWE. The issue is related to me using \clip{…} onto
external figures I would like to crop in conjunction with a colored footer
set-up:
\starttext
\setupfooter[color=red]
\setupfootertexts
On 12/18/2016 11:00 PM, Benjamin Buchmuller wrote:
> Hi Hans,
>
> I finally managed to make a MWE. The issue is related to me using
> \clip{…} onto external figures I would like to crop in conjunction with
> a colored footer set-up:
Hallo Benjamin,
my question may be stupid, b
Hi Hans,
I finally managed to make a MWE. The issue is related to me using \clip{…} onto
external figures I would like to crop in conjunction with a colored footer
set-up:
\starttext
\setupfooter[color=red]
\setupfootertexts
[]
[]
[any
Hello,
thanks for the answers.
So my solution now is:
\startuseMPgraphic{MP:ThickBtm}
draw bottomboundary OverlayBox withpen pensquare scaled 1mm withcolor black;
clip currentpicture to OverlayBox;
\stopuseMPgraphic
\installbottomframerenderer{Thick}{\useMPgraphic{MP:ThickBtm
for note reference (or index reference) are fine. I’m only
guessing, but I think this is the way to do it.
the bad is that viewers clip lines so additional shift action is needed
With named destinations, zoom is set to null (please, don’t change that
ever) and you get where you need to.
unless one
\MPcolor{green} ;
draw rightboundary OverlayBox withpen pencircle scaled 3pt withcolor
\MPcolor{green} ;
draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor
\MPcolor{green} ;
clip currentpicture to OverlayBox leftenlarged 1pt rightenlarged 1.5pt
;
label.bot(btex $x$ etex,(2.97u,-0.1v)) ;
label.rt(btex $y$ etex,(0.01u,3.9v)) ;
label.llft(0,(0,0)) ;
label.urt(A,(0,v)) ;
dotlabel(,(u,-4v)) ;
label.rt(C,(1.02u,-4v)) ;
dotlabel.lrt(B,(2u,3v)) ;
label.bot(1,(u,0)) ;
label.lft(1,(0,v)) ;
clip
)) ;
label.rt(btex $y$ etex,(0.01u,3.9v)) ;
label.llft(0,(0,0)) ;
dotlabel.urt(A,(0,v)) ;
dotlabel(,(u,-4v)) ;
label.rt(C,(1.02u,-4v)) ;
dotlabel.lrt(B,(2u,3v)) ;
label.bot(1,(u,0)) ;
label.lft(1,(0,v)) ;
clip currentpicture to p ;
\stopMPcode
\stoptext
scaled 2pt withcolor blue;
endfor;
clip currentpicture to q;
draw p ; draw q ;
label.llft(B, llcorner p) ;
label.lrt (C, lrcorner p) ;
label.ulft(A, ulcorner p) ;
label.urt (D, urcorner p) ;
label.lft (M, z1) ;
\stopMPpage
…just in case it helps to clarify
{funny}
numeric h ; h := OverlayHeight ;
pathp ; p := unitsquare xscaled \overlaywidth yscaled
\overlayheight superellipsed 0.9 ;
pickup pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw (20,-1)--(20,h+1) withcolor red ;
clip
On 10/31/2014 1:33 PM, Tobias Columbus wrote:
On Fri, Oct 31, 2014 at 12:22:37PM +0100, Hans Hagen wrote:
On 10/31/2014 10:15 AM, Tobias Columbus wrote:
def a_impl text t =
begingroup
save c ; picture c ; c := mycircle ;
clip c to bbox c scaled 0.5 ;
try this to see what
;
clip c to bbox c scaled 0.5 ;
try this to see what happens:
% clip c to bbox c scaled 0.5 ;
draw bbox c scaled 0.5 ;
and then this to solve it:
clip c to bbox (c scaled 0.5) ;
I tried your suggestions and attached both the example and output. Drawing
and
clipping solves
--
vardef mycircle =
save c ; picture c ; c := nullpicture ;
addto c contour fullcircle scaled 2mm ;
c
enddef ;
def a expr p =
path _p_ ; _p_ := p ;
a_impl
enddef ;
def a_impl text t =
begingroup
save c ; picture c ; c := mycircle ;
clip c to bbox c scaled 0.5
=
begingroup
save c ; picture c ; c := mycircle ;
clip c to bbox c scaled 0.5 ;
addto currentpicture also c t ;
addto currentpicture doublepath _p_ t ;
endgroup
enddef ;
def b expr p =
path _p_ ; _p_ := p ;
b_impl
enddef ;
def b_impl text t =
begingroup
save
=
save c ; picture c ; c := nullpicture ;
addto c contour fullcircle scaled 2mm ;
c
enddef ;
def a expr p =
path _p_ ; _p_ := p ;
a_impl
enddef ;
def a_impl text t =
begingroup
save c ; picture c ; c := mycircle ;
clip c to bbox c scaled 0.5 ;
addto
:= mycircle ;
clip c to bbox c scaled 0.5 ;
addto currentpicture also c t ;
addto currentpicture doublepath _p_ t ;
endgroup
enddef ;
def b expr p =
path _p_ ; _p_ := p ;
b_impl
enddef ;
def b_impl text t =
begingroup
save c; picture c ; c := mycircle ;
addto
On 10/31/2014 10:15 AM, Tobias Columbus wrote:
def a_impl text t =
begingroup
save c ; picture c ; c := mycircle ;
clip c to bbox c scaled 0.5 ;
try this to see what happens:
% clip c to bbox c scaled 0.5 ;
draw bbox c scaled 0.5 ;
and then this to solve it:
clip c to bbox (c
On Fri, Oct 31, 2014 at 12:22:37PM +0100, Hans Hagen wrote:
On 10/31/2014 10:15 AM, Tobias Columbus wrote:
def a_impl text t =
begingroup
save c ; picture c ; c := mycircle ;
clip c to bbox c scaled 0.5 ;
try this to see what happens:
% clip c to bbox c scaled 0.5 ;
draw
: cover;
object-position : top left;
overflow: hidden;
(http://www.w3.org/TR/css3-images/#the-object-fit)
That is, scale the PDF until all the frame is covered with some part
of the PDF, even if means overflowing the frame. The overflow:
hidden would then clip the overflow to the frame
/css3-images/#the-object-fit)
That is, scale the PDF until all the frame is covered with some part
of the PDF, even if means overflowing the frame. The overflow:
hidden would then clip the overflow to the frame. Different PDF's
could have different scalings applied to make this work, which is fine
1 - 100 of 290 matches
Mail list logo