Changes

Jump to navigation Jump to search
533 bytes added ,  08:27, 5 September 2021
<!-- please remove this and the following line if you have checked this page -->
{{Reference_Cleanup}}
{{Reference
|name=setupclipping
}}
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>setupclipping</syntax>
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:nx|nx]]</td> <td>[[Reference/enCommand/value:number|number]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:ny|ny]]</td> <td>[[Reference/enCommand/value:number|number]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:x|x]]</td> <td>[[Reference/enCommand/value:number|number]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:y|y]]</td> <td>[[Reference/enCommand/value:number|number]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:width|width]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:height|height]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:hoffset|hoffset]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:voffset|voffset]]</td> <td>[[Reference/enCommand/value:dimension|dimension]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/enCommand/keyword:mp|mp]]</td> <td>[[Reference/enCommand/value:name|name]] </td>
</tr>
</table>
 
== Description ==
<pre>Clip methodSpecify the default clipping settings. There are three methods:
A) Tiles, where* <code>nx</code>, <code>ny: tiles </code> specify to cut the contents to into <code>nx horizntal </code> horizontal (<code>ny </code> vertical) pieces of equal sized piecessize, and* <code>x</code>, <code>y : </code> choose the piece at x (, y) piece.
B) size/offset, where* <code>width</code>, <code>height: </code> specify the horizontal (vertical) size of the clipping window, and* <code>hoffset</code>, v offset<code>voffset</code>: window shift
C) metapost path
* <code>mp:</precode>== comment ==<pre>See \clip for a simple : (see example.below)
</pre>
 
 
== 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):<pre class="example"texcode>\starttext\startTEXpage
\clip
[width=60mm, height=25mm, hoffset=25mm, voffset=\dimexpr 297mm-18mm-25mm\relax] {\externalfigure[file.pdf][page=3]}%\stopTEXpage\stoptext</texcode>
To clip a picture to a circle (from the MetaFun manual): </pretexcode>\startMPclip{circleclip} clip currentpicture to fullcircle shifted (.5,.5) xscaled \width yscaled \height ;\stopMPclip
\clip[nx=1,ny=1,mp=circleclip]{\externalfigure[hacker.png]}
</texcode>
== See also ==
<!-* {{cmd|clip}} == Help from ConTeXt- something like [[cmdMailinglist/Forum ==All issues with:goto{{Forum|\goto]] -->{{SUBPAGENAME}}}}
[[Category:ReferenceCommand/enFiguresImages|setupclipping]]
57

edits

Navigation menu