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
;
drawarrow ((xmin,0) -- (xmax,0)) scaled u;
drawarrow ((0,ymin) -- (0,ymax)) scaled u;
draw tightfunction (x, -2*(x-1)*(x-1)+2, xmin, xmax,
(xmax-xmin)/20)
scaled u;
path screen;
screen=(xmin,ymin)*u--(xmax,ymin)*u--(xmax,ymax)*u--(xmin,ymax)*u--cycle;
clip currentpicture
;
draw pts_f withpen pencircle scaled 1;
clip currentpicture to screen;
\stopMPcode
\stoptext
Are there any routines with Metafun to improve this code?
thank you,
Fabrice
___
If your question is of interest to others as well
-- (0,ymax)*u;
drawarrow axe_x;
drawarrow axe_y;
draw pts_f withpen pencircle scaled 1;
clip currentpicture to screen;
\stopMPcode
\stoptext
Are there any routines with Metafun to improve this code?
define 'improve' .. anyway:
\starttext
\startMPpage
numeric xmin, xmax, ymin, ymax;
xmin
Hi!
Assume that I want to fill in the text area with images, and I want to
clip and scale them according to these rules:
1) If the image is too wide (in sense of proportions), then scale it
so that the height fits the text area height, center it, and clip it
to the text area. (See the attached
OK, sorry for the noise. I think I have the solution:
\startexternalfigurecollection[k.jpg]
\useexternalfigure[k.jpg][k.jpg]
\stopexternalfigurecollection
\externalfigurecollectionminwidth{k.jpg}
\externalfigurecollectionmaxheight{k.jpg}
\clip[width=8cm,height=7cm]{%
\framed[width=8cm
/Context/essais/mkii/figures/resize-and-center.tex: ! Undefined
control sequence
\startexternalfigurecollection ...igurecollection
{#1}\settrue \c_grph_inclu...
l.13 \clip[width=8cm,height=7cm]
{%
3
])
context(\\hskip%ssp, skalning)
context.externalfigure({str},{height=hojd})
context.sprint(bar)
end
end
\stopluacode
\unexpanded\def\lundklippfyllbild#1#2#3{%
\startexternalfigurecollection[#1]%
\useexternalfigure[#1][#1]%
\stopexternalfigurecollection%
\clip[
width=#2,
height=#3,
hoffset
},{height=hojd})
context.sprint(bar)
end
end
\stopluacode
\unexpanded\def\lundklippfyllbild#1#2#3{%
\startexternalfigurecollection[#1]%
\useexternalfigure[#1][#1]%
\stopexternalfigurecollection%
\clip[
width=#2,
height=#3,
hoffset=0mm,
voffset=0mm,
]{%
\framed[width=#2,height=#3
end
\stopluacode
\unexpanded\def\lundklippfyllbild#1#2#3{%
\startexternalfigurecollection[#1]%
\useexternalfigure[#1][#1]%
\stopexternalfigurecollection%
\clip[
width=#2,
height=#3,
hoffset=0mm,
voffset=0mm,
]{%
\framed[width=#2,height=#3,align={middle,lohi},offset=overlay,frame=off]{%
\dimen0
, skalning)
context.externalfigure({str},{height=hojd})
context.sprint(bar)
end
end
\stopluacode
\unexpanded\def\lundklippfyllbild#1#2#3{%
\startexternalfigurecollection[#1]%
\useexternalfigure[#1][#1]%
\stopexternalfigurecollection%
\clip[
width=#2,
height=#3,
hoffset=0mm
)
context.externalfigure({str},{height=hojd})
context.sprint(bar)
end
end
\stopluacode
\unexpanded\def\lundklippfyllbild#1#2#3{%
\startexternalfigurecollection[#1]%
\useexternalfigure[#1][#1]%
\stopexternalfigurecollection%
\clip[
width=#2,
height=#3,
hoffset=0mm,
voffset=0mm
}lrcorner
currentpicture+(0mm,3mm)--
urcorner currentpicture+(0mm,-3mm){up}..{left}urcorner
currentpicture+(-3mm,0mm)--
ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner
currentpicture+(0mm,-3mm)--cycle;
pickup pencircle scaled 0.5pt;
clip currentpicture to p;
draw p;
currentpicture
}urcorner
currentpicture+(-3mm,0mm)--
ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner
currentpicture+(0mm,-3mm)--cycle;
pickup pencircle scaled 0.5pt;
clip currentpicture to p;
draw p;
currentpicture := currentpicture rotated 90;
\stopuseMPgraphic
\starttext
\useMPgraphic
[scale=1]
\tikzset{style={font=\ssxx}}
\startaxis
[xmin=-1.6,
xmax=10,
domain=-1.6:10,
ymin=-1.1,
ymax=1.1,
width=\textwidth,
height=0.3\textwidth,
axis x line=middle,
axis y line=middle,
axis equal=true,
xlabel=$x$,
ylabel=$y$,
samples=600,
clip=true,
xtick={0},
ytick={-1,0,1},
grid=major,
extra x ticks
))}
\startTEXpage
\starttikzpicture[scale=1]
\tikzset{style={font=\ssxx}}
\startaxis
[xmin=-1.6,
xmax=10,
domain=-1.6:10,
ymin=-1.1,
ymax=1.1,
width=\textwidth,
height=0.3\textwidth,
axis x line=middle,
axis y line=middle,
axis equal=true,
xlabel=$x$,
ylabel=$y$,
samples=600,
clip=true,
xtick
,black,white);
endfor;
clip currentpicture to
(0,0)--(0,2cm)--(2cm,2cm)--(3cm,1cm)--(2cm,0)--cycle;
draw (0,0)--(0,2cm)--(2cm,2cm)--(3cm,1cm)--(2cm,0)--cycle withcolor
.625red;
addto finalpicture also currentpicture shifted(avanco*3.5cm,0) ;
currentpicture := nullpicture ; avanco := avanco+1
{rlineto}bd/c{curveto}bd/m{moveto}bd/p{closepath}bd/n{newpath}bd
/C{setcmykcolor}bd/G{setgray}bd/R{setrgbcolor}bd/lj{setlinejoin}bd/ml{setmiterlimit}bd
/lc{setlinecap}bd/S{stroke}bd/F{fill}bd/q{gsave}bd/Q{grestore}bd/s{scale}bd/t{concat}bd
/sd{setdash}bd/rd{[] 0 setdash}bd/P{showpage}bd/B{q F Q}bd/W{clip
setdash}bd/P{showpage}bd/B{q F Q}bd/W{clip}bd
%%EndProlog
%%Page: 1 1
0.7 G
n 0 0 m
0 9.96262 l
9.96262 4.98131 l
p F
P
%%EOF
cut fig.1 here
Running it through MkIV with the 2013.12.26 beta (or the stable context)
produces an empty frame for the inclusion of fig.1
this effect? Or maybe there
is another way to achieve the desired border? Thanks.
\startuseMPgraphic{MP:thickBtm}
draw (0,2pt)--(OverlayWidth,2pt) withpen pensquare scaled 1pt withcolor red;
clip currentpicture to OverlayBox;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
On 2013–02–14 Keith J. Schultz wrote:
with your example below I noticed that the red circle is not
quite in the graphic. it seems to be clip on the right!
It's fine on my machine, or maybe I just don't see it.
Marco
signature.asc
Description: Digital signature
example below I noticed that the red circle is not
quite in the graphic. it seems to be clip on the right!
It's fine on my machine, or maybe I just don't see it.
Marco
___
If your question is of interest to others
Hi Hans, All,
with your example below I noticed that the red circle is not
quite in the graphic. it seems to be clip on the right!
Just mentioning this.
regards
Keith.
Am 13.02.2013 um 17:54 schrieb Hans Hagen pra...@wxs.nl:
On 2/13/2013 1:39 PM, Marco Patzer wrote:
Hi
animation: I could not get the
same pictures as you show on your webpage. I get only one page out of 8, and
the log file says several times:
unknown path q
! Improper `clip'.
to be read again
Best regards: OK
On 29 déc. 2012, at 03:55, Troy Henderson thend...@gmail.com wrote:
Are the gears more
experiments, based on Wolfgang's code on wiki, I reached the
following minimal working example:
\startuseMPgraphic{MP:thickBtm}
draw bottomboundary OverlayBox withpen pensquare scaled
\frameddimension{bottomrulethickness};
clip currentpicture to OverlayBox;
setbounds currentpicture
kludgy.
Perhaps there is a better way...
Michael
\startuseMPgraphic{MP:thickBtm}
draw bottomboundary OverlayBox withpen pensquare scaled
\frameddimension{bottomrulethickness};
clip currentpicture to OverlayBox;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay
of about 2mm. I
discovered the boffset key, which can be used with the overlay, but it's
kludgy.
Perhaps there is a better way...
Michael
\startuseMPgraphic{MP:thickBtm}
draw bottomboundary OverlayBox withpen pensquare scaled
\frameddimension{bottomrulethickness};
clip currentpicture
withpen pensquare scaled
\frameddimension{bottomrulethickness} ;
clip currentpicture to OverlayBox
leftenlarged (\frameddimension {leftrulethickness}/2)
rightenlarged (\frameddimension {rightrulethickness}/2)
topenlarged(\frameddimension {toprulethickness}/2
+dt;
trajy:=trajy..(t,y);
exitif ((ttstop) or (tb) or (yc) or (yd));
endfor;
%Draw the paths x(t) and y(t) and clip them to bounding box
draw trajx xscaled ux yscaled uy withcolor red;
draw trajy xscaled ux yscaled uy withcolor red dashed evenly;
clip currentpicture to (q xscaled ux
Hi,
I've used ConTeXt to chop up a big map svg on separate A4 papers like
this:
\setuplayout[width=190mm,backspace=10mm,height=297mm,topspace=10mm,
header=0mm]
\setupclipping[nx=3,ny=3]
\starttext
\dorecurse{3}{\framed{\clip[x=\recurselevel,y=1]{\externalfigure[map.svg][width=570mm
Am 21.09.2011 14:26, schrieb Otso Helenius:
Hi,
I've used ConTeXt to chop up a big map svg on separate A4 papers like this:
\setuplayout[width=190mm,backspace=10mm,height=297mm,topspace=10mm,
header=0mm]
\setupclipping[nx=3,ny=3]
\starttext
\dorecurse{3}{\framed{\clip[x=\recurselevel
can use \clip; since you can use it
for everything, it's a single command, not an option.
See http://wiki.contextgarden.net/Graphical_text_manipulation#.5Cclip
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm
but the huge margins take too much space
and as a result the texts are too small.
I want to use commands like \insertpages to crop all the pages with
different bounding box settings for odd/even pages.
there's a scale option for \copypages but it's somewhat naive to use
in such practical cases...
\clip
guess would be
\midaligned{\vbox{%
\clip
\clip
\clip
}}
untested.. ;-)
--
Cecil Westerhof
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context
to no avail. How can I get it
centered?
my first guess would be
\midaligned{\vbox{%
\clip
\clip
\clip
}}
I tried a lot, but just this one not. I got one long line with the three
parts beside each-other, a little room between the parts, no effect, …
untested.. ;-)
It does exactly what I
On Thu, 2011-07-07 at 07:35 +0200, Wolfgang Schuster wrote:
There is a example in the metafun manual: http://pragma-ade.com/show-man-7.htm
Wolfgang
Wolfgang,
I appreciate the effort, but you've linked me to a 657 page manual which
is totally useless to me. I don't have time to learn another
Hey list,
I'd like the rounded corners of my figure's frame to clip off the
outside corners of the image so they aren't sticking out. This is what
I'm making do with:
\setupexternalfigures
[frame=on,
corner=25,
framecolor=colour_frame_border,
background=color,
backgroundcolor
On Wed, 6 Jul 2011, Kip Warner wrote:
Hey list,
I'd like the rounded corners of my figure's frame to clip off the
outside corners of the image so they aren't sticking out. This is what
I'm making do with:
\setupexternalfigures
[frame=on,
corner=25,
framecolor=colour_frame_border
On Wed, 2011-07-06 at 23:48 -0400, Aditya Mahajan wrote:
You can use
\clip[mp=...]{\framed[...]{...}}
(I think that the metafun manual gives an example).
Aditya
Thanks Aditya, I'll look into it. I searched both the reference and
tutorial pdf and there is no description of \clip, but I
On Wed, 2011-07-06 at 23:48 -0400, Aditya Mahajan wrote:
You can use
\clip[mp=...]{\framed[...]{...}}
(I think that the metafun manual gives an example).
Aditya
Aditya, correct me if wrong, but it looks like \clip performs
rectangular clipping only?
As I mentioned earlier, I'd like
Am 07.07.2011 um 07:18 schrieb Kip Warner:
On Wed, 2011-07-06 at 23:48 -0400, Aditya Mahajan wrote:
You can use
\clip[mp=...]{\framed[...]{...}}
(I think that the metafun manual gives an example).
Aditya
Aditya, correct me if wrong, but it looks like \clip performs
rectangular
:= currentpicture; currentpicture := nullpicture;
fill unitsquare xysized (100mm,100mm) withcolor blue;
path mask; mask := unitsquare xysized (100mm,100mm) -- reverse unitsquare
xysized (100mm,10mm) shifted (0mm,45mm) -- cycle;
clip cur to mask;
draw cur;
\stopMPcode
But I can't cut pictures
On 22-5-2011 5:09, Otso Helenius wrote:
With this feature one could define for example a 2-page spread for a magazine
(with free shape graphics and columns)
in between two ordinarily defined pages and would not have to manually disrupt
the body text flow through the
document.
It can
\frameddimension
{rightrulethickness} ;
draw topboundaryOverlayBox withpen pensquare scaled \frameddimension
{toprulethickness} ;
draw bottomboundary OverlayBox withpen pensquare scaled
\frameddimension{bottomrulethickness} ;
clip currentpicture to OverlayBox
leftenlarged
\frameddimension
{toprulethickness} ;
draw bottomboundary OverlayBox withpen pensquare scaled
\frameddimension{bottomrulethickness} ;
clip currentpicture to OverlayBox
leftenlarged (\frameddimension {leftrulethickness}/2)
rightenlarged (\frameddimension {rightrulethickness}/2
정진기 jinkijinki.j...@partner.samsung.com writes:
What I like to do is “getting certain area of certain page of a PDF
file”
using context command without saving to a separate JPG file.
\clip[...]{\externalfigure[filename.pdf][page=X]}
See also:
http://wiki.contextgarden.net/Reference/en
--(OverlayWidth,0) withcolor blue withpen pencircle scaled 4 shifted
(0,4) ;
clip currentpicture to OverlayBox ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[headerrules][\useMPgraphic{headerrules}]
\setupbackgrounds[header][text][background=headerrules]
\starttext
\input
;
draw origin--(OverlayWidth,0) withcolor blue withpen pencircle scaled 4
shifted (0,4) ;
clip currentpicture to OverlayBox ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[headerrules][\useMPgraphic{headerrules}]
\setupbackgrounds[header][text][background
You can fill out the bigger one, than clips the smaller one.
Can you give me an example with the clip? I can't get it work in a way I want
to have it.
I've found another thread here:
http://www.tug.org/pipermail/metapost/2006-September/000650.html
But I fail to see the conclusion there too
(provided at fixed location)
-load in a folder or directory full of assets (several subfolders are involved)
-set up the launch settings for the swf
So needs more than InDesign CS5 currently offers. Not just loading in a
freestanding swf movie clip.
THX
Ian
On Tue, 11 Jan 2011, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Or is there another (non-layering or layer-merging) way?
You can also crop the pdf (\clip[mp=shape that you want to
clip]{\externalfigure[...]}) and place that on paper using layers. That
way, even if layers are toggled
On 11-1-2011 6:59, Aditya Mahajan wrote:
On Tue, 11 Jan 2011, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Or is there another (non-layering or layer-merging) way?
You can also crop the pdf (\clip[mp=shape that you want to
clip]{\externalfigure[...]}) and place that on paper using layers
, because I
need the pixel size of a graphic for some border checking ('clip' a
frame out of a bitmap). Currently I use \getfiguredimensions from the
tex side, as I haven't found a way in lua yet.
Peter
___
If your question
On 14-10-2010 10:10, Peter Rolf wrote:
Nice to have. Is this also possible from the lua side? I ask, because I
need the pixel size of a graphic for some border checking ('clip' a
frame out of a bitmap). Currently I use \getfiguredimensions from the
tex side, as I haven't found a way in lua yet
Am 14.10.2010 22:22, schrieb Hans Hagen:
On 14-10-2010 10:10, Peter Rolf wrote:
Nice to have. Is this also possible from the lua side? I ask, because I
need the pixel size of a graphic for some border checking ('clip' a
frame out of a bitmap). Currently I use \getfiguredimensions from
:\recurselevel][c=0,m=\ctxlua{tex.print(\recurselevel/\Number)},y=1,k=0]}
\dorecurse{\Number}{
\clip[ny=\Number,y=\recurselevel]{\color[Col:\recurselevel]\MyLogo}
}
\hbox{\dorecurse{\Number}{\clip[nx=\Number,x=\recurselevel]{\color[Col:\recurselevel]\MyLogo}}}
\stoptext
(With the help of Taco
}
\dorecurse{\Number}{\definecolor[Col:\recurselevel][c=0,m=\ctxlua{tex.print(\recurselevel/\Number)},y=1,k=0]}
\dorecurse{\Number}{
\clip[ny=\Number,y=\recurselevel]{\color[Col:\recurselevel]\MyLogo}
}
\hbox{\dorecurse{\Number}{\clip[nx=\Number,x=\recurselevel]{\color[Col:\recurselevel]\MyLogo
Thanks!! For the hints to existing examples as well as for the
very instructive advice to clip to the enlarged unitsquare.
2010/6/7 Hongwen Qiu qiuhong...@gmail.com
于 2010年06月07日 22:47, Erik Margraf 写道:
Hi all,
I'd like to achieve in context something like I did in
the attachment
, perhaps like so:
\def\OpticalTest[#1]#2{%
\addff{\OOFeature}%
\definedfont[#2 at \OOSize]%
\setupinterlinespace
\hbox to \textwidth{\clip[width=.39\textwidth,
bottomoffset=\strutdepth]{%
\Mycolor
..\hbox to .39
back, and add \Mycolor to the
\OpticalTest macro, perhaps like so:
\def\OpticalTest[#1]#2{%
\addff{\OOFeature}%
\definedfont[#2 at \OOSize]%
\setupinterlinespace
\hbox to \textwidth{\clip[width=.39\textwidth,
bottomoffset=\strutdepth
Hi,
the latest version (06-05-2010) has problems with mp clippath. Example
is attached.
Best wishes, Peter
ps: Believe it or not, but all leftovers of cuts are recycled/reused
here for other graphics. I hate squandering ;)
\startMPclip{mpcliptest}
clip currentpicture to unitcircle scaled
[document.pdf][n=4]
\stoptext
Wolfgang
Thanks. But is it possible to scale it and put margins at each slicepage?
not in a straight line. but you can use \slicepages to clip the image
into the wanted sizes (papersize-offset) and then centre up the
resulting pdf pages in a new document (which adds
is grayscale
% 'frame=on' : next frame is ok (black)
\framed[foregroundcolor=red,frame=off]{frame should be black} % text is needed
to trigger color
% wrong framecolor (red instead of black)
\framed[offset=overlay,rulethickness=1pt,framecolor=black]\bgroup
\clip[width=5cm,height=5cm]% clip is needed
Am 16.02.2010 um 21:12 schrieb Peter Rolf:
Am 16.02.2010 19:40, schrieb Bernhard Rosensteiner:
Hi,
in the attachment is an example file which describes best what i want do.
The method with \offset and \clip to place the figures where i want is
really brutal force i think. Especially
18, 2010, at 1:22 PM, Bernhard Rosensteiner wrote:
Am 16.02.2010 um 21:12 schrieb Peter Rolf:
Am 16.02.2010 19:40, schrieb Bernhard Rosensteiner:
Hi,
in the attachment is an example file which describes best what i
want do. The method with \offset and \clip to place the figures
where i
Hi,
in the attachment is an example file which describes best what i want do. The
method with \offset and \clip to place the figures where i want is really
brutal force i think. Especially fiddling around with dimension to get the
right fit“ is tedious. Is there a better solution to do
Hi,
in the attachment is an example file which describes best what i want do. The
method with \offset and \clip to place the figures where i want is really
brutal force i think. Especially fiddling around with dimension to get the
right fit“ is tedious. Is there a better solution to do
Am 16.02.2010 19:40, schrieb Bernhard Rosensteiner:
Hi,
in the attachment is an example file which describes best what i want do. The
method with \offset and \clip to place the figures where i want is really
brutal force i think. Especially fiddling around with dimension to get
)
endfor;
Cb@:=Cb@ shifted (z.origine*cm);
$=Cb@;
$
enddef;
vardef cadre(expr q,r)=
z.so=q;
z.ne=r;
path limite;
limite:=z.so*cm--(x.ne*cm,y.so*cm)--z.ne*cm--(x.so*cm,y.ne*cm)--cycle;
extra_endfig := clip currentpicture to limite; extra_endfig;
enddef;
vardef origine(expr p
:
Mode := 3 ;
fi
else :
Mode := 2 ;
fi
else :
Mode := 1 ;
fi
l = q[10+Mode] cutafter mypath ;
MagicPoint = point length(l) of l ;
p0 := p[Mode]--l--(q0 cutbefore MagicPoint)--(q0 cutafter
MagicPoint)--(reverse l)--cycle ;
clip currentpicture to p0 ;
draw
(Helper100) of Helper100 ;
Helper0 := Helper[Mode] for i=1 upto 3 : -- Helper[Mode+i] endfor
-- Helper100
-- (Helper0 cutbefore MagicPoint)
-- (Helper0 cutafter MagicPoint)
-- (reverse Helper100)
-- cycle ;
clip currentpicture to Helper0 ;
draw
Hello,
I am struggling to get something equivalent to this in ConTeXt:
-
\begin{figure}
\resizebox{\hsize}{!}{\includegraphics[scale=1,bb=0 0 0 0,clip]
{MyFigure.eps}}
\caption{My Caption
\label{fig.mylabel}
}
\end{figure
Pau wrote:
Hello,
I am struggling to get something equivalent to this in ConTeXt:
-
\begin{figure}
\resizebox{\hsize}{!}{\includegraphics[scale=1,bb=0 0 0 0,clip]
{MyFigure.eps}}
\caption{My Caption
\label{fig.mylabel}
}
\end
Hi,
the attached example shows some horizontal shift of the clipped object.
Mkii works as expected.
Best wishes, Peter
\setupcolors[state=start]
\setuppagenumber[state=stop]
\starttext
\framed[offset=overlay,width=5cm,height=1cm]
{\clip[width=5cm,height=1cm,voffset=0pt,hoffset=0pt
picture temp ;
path mask ;
draw (0,1cm)--(2cm,1cm) ;
draw (1cm,0)--(1cm,2cm) ;
temp := currentpicture ;
currentpicture := nullpicture ;
mask := unitsquare scaled 2cm -- reverse fullsquare scaled 1cm shifted
(1cm,1cm) -- cycle ;
clip temp to mask ;
currentpicture := temp ;
draw
shifted
(1cm,1cm) -- cycle ;
clip temp to mask ;
currentpicture := temp ;
draw fullsquare scaled 5mm shifted (1cm,1cm) ;
temp := currentpicture ;
currentpicture := nullpicture ;
externalfigure holz280.jpg scaled 2cm ;
addto currentpicture also temp ;
\stopMPcode
\stoptext
i
are in
the attachment.
\starttext
\startMPcode
picture temp ;
path mask ;
draw (0,1cm)--(2cm,1cm) ;
draw (1cm,0)--(1cm,2cm) ;
temp := currentpicture ;
currentpicture := nullpicture ;
mask := unitsquare scaled 2cm -- reverse fullsquare scaled 1cm shifted
(1cm,1cm) -- cycle ;
clip temp
{\hss\flushnextbox\hss}%
-
\setbox\scratchbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\box\scratchbox}}}%
+
\setbox\nextbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\flushnextbox}}}%
\fi
\ifdim\nextboxht#3\relax
\setbox\nextbox
{\offinterlineskip
-
\setbox\scratchbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\box\scratchbox}}}%
interesting
Hans
-
Hans Hagen | PRAGMA ADE
:= \sometxt[taspresent:sometxt:right]{\folio} ysized 6cm;
clip Left to boundingbox Left xyscaled(0,3cm) ;
if PageNumber 10:
clip Right to boundingbox Right xyscaled(0,3cm) shifted (bbwidth(Right)/2,0) ;
draw Left shifted (14.26cm,-.5cm) ;
draw Right shifted (14.26cm,-.5cm) ;
else :
clip
postponed
)
*
and this is the piece code causing the issue
begins here
\setupexternalfigures[location={local,global,default}]
\startpostponing[4]
\offset
[leftoffset=-\backspace,
topoffset=-\dimexpr\topspace+\headerheight\relax]
{\clip
[width=\paperwidth]
{\externalfigure[cow
}]
\setuppapersize[A5][A4, landscape]
\setuparranging[2UP]
\startpostponing[4]
\offset
[leftoffset=-\backspace,
topoffset=-\dimexpr\topspace+\headerheight\relax]
{\clip
[width=\paperwidth]
{\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}
\stoppostponing
\startpostponing[5
=-\backspace,
topoffset=-\dimexpr\topspace+\headerheight\relax]
{\clip
[width=\paperwidth]
{\externalfigure[cow][width=2\paperwidth,height=\paperheight]}}
\stoppostponing
\startpostponing[5]
\noheaderandfooterlines
\offset
[leftoffset=-\backspace,
topoffset=-\dimexpr\topspace
black) and
also some unicolored backgrounds appear black only. so i went back to
the prior beta version and changed only the clip part.
hm ... example ...
\setupcolors[state=start]
\starttext
\color[red]{Colored test?}
\stoptext
Tested on ConTeXt live.
Wolfgang
some unicolored backgrounds appear black only. so i went back to
the prior beta version and changed only the clip part.
Any customer can have a car painted any colour that he wants
so long as it is black. (Henry Ford)
;-)
Wolfgang
unicolored backgrounds appear black only. so i went back to
the prior beta version and changed only the clip part.
hm ... example ...
% engine=luatex
\startuniqueMPgraphic {foo}
fill OverlayBox;
\stopuniqueMPgraphic
\starttext
\startTEXpage
\hsize10cm \vsize10cm
black) and
also some unicolored backgrounds appear black only. so i went back to
the prior beta version and changed only the clip part.
hm ... example ...
% engine=luatex
\startuniqueMPgraphic {foo}
fill OverlayBox;
\stopuniqueMPgraphic
\starttext
\startTEXpage
\hsize10cm \vsize10cm
to
the prior beta version and changed only the clip part.
regards, peter
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman
. so i went back to
the prior beta version and changed only the clip part.
hm ... example ...
(keep in mind that mkiv's color handling is like fonts, i.e. no coloring
of unboxed stuff as in \color[red]{\box\whatever})
Hans
backgrounds appear black only. so i went back to
the prior beta version and changed only the clip part.
hm ... example ...
:)
only a very big one (with non public code). currently no time, but i
will try to create some small examples later.
(keep in mind that mkiv's color handling is like fonts, i.e
* PUSH *
still not fixed.
Peter Rolf schrieb:
hi,
this time fully 'context live' approved, only with natural ingredients
and even more tasty. yummy yum :D
% engine=luatex
\starttext
\definelayer[stack]
\setlayer[stack][x=0pt,y=0pt]{%
\clip[hoffset=0pt,voffset=0pt,width=20cm
\definelayer[stack]
\setlayer[stack][x=0pt,y=0pt]{%
\clip[hoffset=0pt,voffset=0pt,width=20cm,height=1cm]%
{Clipping some layer text}}
%\flushlayer[stack]
\setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.}
\framed[offset=overlay]{\clip[hoffset=0pt,voffset=0pt,width
hi,
this time fully 'context live' approved, only with natural ingredients
and even more tasty. yummy yum :D
% engine=luatex
\starttext
\definelayer[stack]
\setlayer[stack][x=0pt,y=0pt]{%
\clip[hoffset=0pt,voffset=0pt,width=20cm,height=1cm]%
{Clipping some layer text}}
%\flushlayer[stack
hi,
'minimal' example for clipping bug in mkiv:
% engine=luatex
\starttext
\setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.}
\framed[offset=overlay]{\clip[width=110pt,height=20pt]{\box\scratchbox}}
\stoptext
final text should be The cat was too long. mkii does
Peter Rolf wrote:
hi,
'minimal' example for clipping bug in mkiv:
% engine=luatex
\starttext
\setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.}
\framed[offset=overlay]{\clip[width=110pt,height=20pt]{\box\scratchbox}}
\stoptext
final text should
Hans Hagen schrieb:
Peter Rolf wrote:
hi,
'minimal' example for clipping bug in mkiv:
% engine=luatex
\starttext
\setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.}
\framed[offset=overlay]{\clip[width=110pt,height=20pt]{\box\scratchbox}}
\stoptext
final text
I wrote to the list last night, I have continued learning ConTeXt at a
frightening clip. Did my first drop caps, indentations, and messed around with
setting width and height. I can't remember when my computer has brought me so
much fun.
I'm beginning to see that there is a fair amount
and
courtesy to my half-considered diatribe is most heartening. Amazingly, you
managed to answer alot of questions I wasn't fully aware I was asking.
Hear, hear! ;)
Since I wrote to the list last night, I have continued learning ConTeXt at a
frightening clip. Did my first drop caps
101 - 200 of 293 matches
Mail list logo