Skip to main content

Questions tagged [path-clipping]

{path-clipping} is about questions relating to the use of clipping paths to cut out shapes from images, graphics or text using vector-based graphics tools or packages such as TikZ.

Filter by
Sorted by
Tagged with
1 vote
2 answers
78 views

Shading the middle section in 4 circles

I currently have a diagram involving four circles and a square connecting all four centers. However, I'm trying to figure out how to shade the inner area of the four circles. My current code looks ...
andorooo's user avatar
0 votes
1 answer
91 views

Extracting an Interior Portion from a Tikz ClipPicture

Consider the MWE: \documentclass{article} \usepackage{tikz} \usepackage{graphicx} % % COMPILED WITH PDFLATEX \newif\ifdeveloppath \tikzset{/tikz/develop clipping path/.is if=...
DDS's user avatar
  • 10.1k
2 votes
3 answers
262 views

How to set up a sequence of clips in TiKZ with a loop?

Here's the simplest file I can think of which demonstrates my problem: I simply want to draw two circles, half filled: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} ...
Alasdair's user avatar
  • 5,277
1 vote
1 answer
46 views

Making overlap in TikZ figure

In this drawing there are two ellipses: a blue one, above the hexagon, and an orange one, below the hexagon. How can I make the hexagon shape hide the orange ellipse part underneath? \documentclass[...
user3204810's user avatar
  • 1,577
0 votes
1 answer
52 views

Clipping two nodes with pictures

I would like to clip two nodes containing two pictures with rounded corners. Here is my minimal working example: \documentclass[margin=1cm]{standalone} \usepackage{tikz} \begin{document} \begin{...
Michael Dorner's user avatar
0 votes
2 answers
202 views

Clipping a path with TikZ

I understand how to clip with a rectangle, for instance. But how to do it with a different path. I wrote many lines with Bezier curves ( .. controls (,) and (,) ..). So now I have a path with all ...
Didier's user avatar
  • 1,343
0 votes
1 answer
67 views

Clip to the complement of a tikz node

I am attempting to make a tikz figure like the Tutorial: A Picture for Karl’s Students in the tikz manual, but one which can be shown (without modification) on different background colors (I'm ...
Jason Siefken's user avatar
4 votes
2 answers
272 views

Clip line to shape of circle node

I am trying to have a line divide a circle node at a certain point, but the way I have come up still leaves a small amount of line outside the circle, as seen below. I tried using clip, but I wasn't ...
Dexterous's user avatar
5 votes
3 answers
229 views

Transparent clipping - make transparent center in tikz image

I have tried to replicate a logo using tikz. As you can see the logo consists of seven triangles in a circle, with concave edges toward the center of the circle. To do this I have drawn the triangles ...
The V's user avatar
  • 1,401
2 votes
1 answer
125 views

PSTricks Clipping

Consider the drawing: How can I draw this using PSTricks? (The stripes are not of equal width, in case that is of any importance.) I guess I have to use clipping somehow but I'm sure even how to get ...
Svend Tveskæg's user avatar
0 votes
1 answer
219 views

Using fillbetween in pgfplot

I need to colour the area between the first and the second line of the graph in green and the area between the second and the third line of the graph in red: I am trying to do this with fillbetween, ...
Matteo Bulgarelli's user avatar
1 vote
1 answer
166 views

Clip a rectangle by the size of another (small) rectangle

I'm trying to make a hole in the 2nd rectangle by the dimension of the 3rd rectangle. It seems that \clip, as it specified in the manual, is clipping all the subsequent drawings. Is there an invert ...
Mafsi's user avatar
  • 664
6 votes
2 answers
247 views

TiKz Path Exclusion - Compound Shapes (pathfinder functionality)

On Adobe Illustrator, it is very easy to use Pathfinder to create compound shapes by (using the path exclude function with the shape to be retained in the back layer and all paths to be removed in ...
Harry's user avatar
  • 1,112
0 votes
1 answer
148 views

How to fit area under curve through clipping in tikz?

I have a simple arbitrary curve and a straight line below the curve. The curve represents just some arbitrary function. But my point is how do I precisely fit an area between two paths, given I have ...
SolidMark's user avatar
  • 1,419
4 votes
1 answer
267 views

How to clip text from a drawn rectangle in Tikz?

Rather than defining a specific color for some text in a drawn box, I want the text to be clipped from the box so that the paper color is visible. Here's the MWE: \documentclass{article} \pagestyle{...
Hansel's user avatar
  • 427
1 vote
4 answers
688 views

Plot back half sphere with tikz

I have found related questions but none of them is exactly what I want. With tikz I can plot a shaded sphere as follows \documentclass[crop,tikz]{standalone} \usepackage{tikz-3dplot} \usetikzlibrary{...
MathMax's user avatar
  • 113
1 vote
2 answers
348 views

Clipped scope's bounding box

In the following example, I \clip out a 3x3 rectangle of an image. I'd expect the resulting scope to have a bounding box of 3x3, so the two text nodes should line up with the extent of the clipped ...
Cactus's user avatar
  • 1,117
0 votes
1 answer
114 views

Tikz with fillbetween two defined paths

Setup: using Tikz in beamer. I want to fill with color a region delimited by some line segments and a circle. Since I did not manage to use \clip together with paths, I looked around and found this ...
B. Dors's user avatar
  • 129
1 vote
0 answers
158 views

Creating a hairline with tikz

I need some help drawing arbitrary shapes with hairline strokes. Goal: To draw a transparent hairline stroke, which would show the background sea-green color in this example, an inner stroke, and an ...
Bob's user avatar
  • 1,364
0 votes
1 answer
84 views

Clipping in Scopes Works Different on Backgrounds

Currently, I would like to include background images in circles. For the sake of simplicity, I use colors in the MWE. When I use clipping in scopes on backgrounds they work in a different way than I ...
Dirk's user avatar
  • 2,748
1 vote
1 answer
117 views

How to fill area between several paths

I have the folling tikz code, where several paths intersect each other. I struggle to find a way to fill the six different regions of the resulting picture, each with a different pattern (not ...
Archimondain's user avatar
7 votes
1 answer
822 views

Curved Scissor Cut in TikZ

I'm searching for a good looking solution for drawing a cut with scissor symbols with Tikz. My starting point, which explains what is to be done looks as follows: The corresponding current LaTeX/Tikz ...
DCTLib's user avatar
  • 1,934
4 votes
2 answers
265 views

TikZ: Expand stroke

I'm trying to draw some spirals and asked this question some days ago. The answer by hpekristiansen is great and helps a lot but as it's not clear if the spiral is right- or left-handed by looking at ...
Sam's user avatar
  • 3,018
3 votes
2 answers
407 views

TikZ style that shifts a path perpendicular

Is it possible to define a TikZ style that shifts a path perpendicularly? I.e., the resulting path should be obtained from the given path by shifting every point, say, 0.1cm to the right, orthogonal ...
Andi Bauer's user avatar
1 vote
0 answers
87 views

best way to skip a path/shape

I wonder if there is a conveniant way to skip a path/shape. For example, I can use \draw (0, 0) -- [clip path={...}] (2, 3); or \draw (0, 0) -- [clip path name=<path name>] (2, 3); or \draw (0, ...
ZhiyuanLck's user avatar
  • 4,526
3 votes
1 answer
1k views

How to apply a clipping mask with TikZ

Without rewriting the code, I want the part where the circles overlap to be transparent so it appears white (or whatever colour is hiding behind the circles). Graphic designers might refer to this ...
voices's user avatar
  • 2,059
1 vote
3 answers
2k views

Semicircle from a circle in TikZ

Referring to the \clip answer in Drawing a semicircle in TikZ, I wanted to draw a semicircle. But the approach doesn't work here. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \...
subham soni's user avatar
  • 9,743
7 votes
1 answer
528 views

Crop image to path created in TikZ?

Is it possible to use a curved path created in TikZ within a LaTeX document to crop an image to fit it, or should I do this in (eg) GIMP outside the document and just insert the image? I have the (...
Peter Flynn's user avatar
  • 2,910
0 votes
1 answer
66 views

How to fix circles as background and write text and insert figures in the foreground in a0poster?

Please find the MWE below and kindly help me to fix my issues. \documentclass[portrait,a0b,posterdraft]{a0poster} %% posterdraft is for printing the poster on a4 size. \usepackage[paperheight=119cm,...
user168768's user avatar
3 votes
3 answers
437 views

Clipping shaded areas to a curve boundary

I am trying to draw the following graph, but I failed to achieve it. What is wrong with this code \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{verbatim} \usepackage{tikz} ...
Hany's user avatar
  • 4,979
1 vote
2 answers
144 views

Contour around intersected (clipped) area

I would like to know how to draw a (visible) contour around a clipped figure in Latex. As a basic example, consider some basic Venn diagram like that: \begin{tikzpicture} \begin{scope} \clip ...
Newb's user avatar
  • 21
5 votes
2 answers
518 views

Tikz: convert a (fit) node into a path, for clipping, filling

I would like to do something like here in order to clip text outside of an area. But I'd like to specify the area using precisely a given node (that, in my case, is constructed using fit). The thing ...
tobiasBora's user avatar
  • 9,116
3 votes
1 answer
100 views

How to issue a warning when something is clipped in TikZ?

As the title states, I'd like to know if it's possible to issue a LaTeX warning if something was clipped in a tikzpicture. And, if so, how would I achieve this? My use case is that I'm working on a ...
Paul Gessler's user avatar
  • 29.9k
1 vote
1 answer
191 views

crop region outside a path

this is the first time i code with tikz and i'm stuck in trying to delete everything outside the path drawn in black. Can anyone help me? \begin{tikzpicture} \foreach \x in {-15,-14.5,-14,-13....
user153952's user avatar
1 vote
1 answer
155 views

Fill intersections using clipping

I am trying to obtain something similar to the attached figure, however I am not getting all the intersections correctly colored, any help? \documentclass[border=1mm]{standalone} \usepackage{tikz} \...
Ghadir Dogim's user avatar
2 votes
0 answers
508 views

tikz inverted clipping of named paths

I'm trying to employ the extremely cool inverted clipping from this question in combination with reusage of named paths with the use path key I stole from this question. However, it seems like my ...
carsten's user avatar
  • 2,996
3 votes
1 answer
221 views

How do i clip the border of an area?

I want to clip the parts of an area such that a path which goes through it proceed at the border of the area. It should look like that but there must be a better solution instead of cutting with that ...
jigsawl's user avatar
  • 33
4 votes
1 answer
403 views

Inverse clipping and decorated paths

I tried to implement the suggestions of this answer (Paul Gaborit's invclip) to make a "spotlight" effect (to be used with beamer). It works perfectly with simple shapes, but things get tricky when ...
Christoph Frings's user avatar
4 votes
2 answers
1k views

Soft clip defined by domain fails in fill between for one of tables

I cannot understand why figure (a) does not display the filled region, while (b) does. PGF reports the following warning: Package pgf Warning: fill between skipped: the first input path is empty. ...
honey_badger's user avatar
2 votes
1 answer
3k views

Properly Clipping in Tikz?

With the amazing help of this community, I draw the picture below some months ago. Back then, I was very happy with it; but as time goes by, I want my figures to look better and better. As you can see ...
EoDmnFOr3q's user avatar
  • 2,343
12 votes
2 answers
1k views

TikZ clip shapes using several (built in) shapes

I'm looking for a way to draw one image composed of a union of multiple cloud shapes. The following MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{...
Ellon Paiva's user avatar
3 votes
1 answer
523 views

Inverted clipping using node shape?

I'm am able to invert clipping regions (as discussed in this question) and to use node shapes for clipping (as discussed in this one), but I'd like to combine the two, and I don't see quite how to do ...
Magnus Lie Hetland's user avatar
3 votes
2 answers
310 views

Connecting text and graphics

The idea was shamelessly stolen from: http://www.texample.net/tikz/examples/connecting-text-and-graphics/ This is my MWE: \documentclass{article} \usepackage{tikz,tkz-euclide} \usetkzobj{all} \...
Sergei Beliaev's user avatar
5 votes
2 answers
667 views

How to write a text on a curve, removing a piece of it in this section? (No fill=white)

I would like to erase a piece of graph where I want to put a label. I do not want to place there rectangles of color. The background color can be changed. At this stage, I do not know what will be the ...
Mateusz K.'s user avatar
6 votes
1 answer
973 views

Straightforward gaps in crossing lines with gapless background highlights?

I'm drawing some crossing lines, some of which are emphasized by a thick, gray line in the background. Now, I'd like to have gaps where the lines cross, and I am able to achieve this by using inverted ...
Magnus Lie Hetland's user avatar
1 vote
1 answer
483 views

How to clip with a path between customized, bent sides (e.g. as drawn by edges from graphs)?

In the next MWE, I tried to clip by using a path drawn by edges between nodes, a circle, but I didn't succeed. It's not essential to draw it using automata, though. But the point is: being able to ...
c.p.'s user avatar
  • 4,687
4 votes
2 answers
1k views

TikZ: even odd clipping using named path by intersections library

I would like to generate the following Venn diagram: which can be generated by the following \documentclass[tikz,margin=0pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,intersections} \...
wdg's user avatar
  • 749
2 votes
1 answer
534 views

I put \pgfresetboundingbox after \clip, what should the bounding box be?

Short question After a \clip and a \pgfresetboundingbox, the bounding box is permanently (0,0)rectangle(0,0). How can I turn on the bounding-box calculation and obtain a fairly small bounding box? ...
Symbol 1's user avatar
  • 37.1k
3 votes
1 answer
306 views

Reverse clipping in a 3D figure - Projection issue

I have an issue with a reverse clipping on a 2D surface represented in a 3D space. Although the reversed clipping is working, the cut part is not projected on a plane. Here is the MWE: \...
Thomas's user avatar
  • 1,653
0 votes
0 answers
45 views

shading region bounded by several curves [duplicate]

I have the following code: \documentclass{book} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm); \draw [color=white,...
luisfelipe18's user avatar