Syntax (autogenerated)
| \setupclipping[...=...,...] | |
| state | start stop |
| width | dimension |
| height | dimension |
| hoffset | dimension |
| voffset | dimension |
| x | number |
| y | number |
| nx | number |
| ny | number |
| sx | number |
| sy | number |
| leftoffset | dimension |
| rightoffset | dimension |
| topoffset | dimension |
| bottomoffset | dimension |
| mp | name |
| n | number |
| offset | dimension |
Syntax
| \setupclipping[...,...=...,...] | |
| nx | number |
| ny | number |
| x | number |
| y | number |
| width | dimension |
| height | dimension |
| hoffset | dimension |
| voffset | dimension |
| mp | name |
Description
Specify the default clipping settings. There are three methods:
A) Tiles, where
-
nx,nyspecify to cut the contents intonxhorizontal (nyvertical) pieces of equal size, and -
x,ychoose the piece at x (, y).
B) size/offset, where
-
width,heightspecify the horizontal (vertical) size of the clipping window, and -
hoffset,voffset: window shift
C) metapost path
-
mp: (see example below)
Example
To clip, from page 3 of a PDF, a piece of 60x25, 25 mm from the left edge of the paper and 18+25 mm from the top (assuming A4 paper):
\clip [width=60mm, height=25mm, hoffset=25mm, voffset=\dimexpr 297mm-18mm-25mm\relax] {\externalfigure[file.pdf][page=3]}%
To clip a picture to a circle (from the MetaFun manual):
\startMPclip{circleclip} clip currentpicture to fullcircle shifted (.5,.5) xscaled \width yscaled \height ; \stopMPclip \clip[nx=1,ny=1,mp=circleclip]{\externalfigure[hacker.png]}
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: