667 questions
1
vote
1
answer
72
views
How do I clip an element in SVG after rotation?
I have a rotated rectangle (square) that I want to clip by another, not rotated, rectangle:
<svg width="800" height="800">
<defs>
<clipPath id="Clip01&...
0
votes
1
answer
37
views
Right aligned italic text drawn by DrawTextW is clipped on the right side
This code
procedure TForm1.Paint;
var
r: TRect;
txt: WideString;
begin
inherited;
r := Rect(0, 0, 200, 100);
txt := 'Lorem ipsum dolor sit amet, consectetur ' +
'adipiscing elit, sed do ...
0
votes
0
answers
53
views
How do determine inner border points of polygon intersection
I am trying to write a Python script that will return me all vertice locations (x,y) of inner intersecting edge between a square tile and a closed polygon with n-vertices. I got this far with my code, ...
0
votes
0
answers
29
views
Getting values of contour within polygon path
I have the following issue. I have a function of two variables defined on a regular grid via np.meshgrid and I would like to get the coordinates of the points on some contour, within a bounding region ...
0
votes
1
answer
75
views
Threejs clipping a wall
I have a 3d channel that contains cylinders which simulate a liquid.
here's an example
The issue is that the cylinders can overlap with the walls and show through them.
I think i need to use clipping ...
1
vote
0
answers
56
views
How do I set up a draggable clip rectangle that completely clips and hides everything on the canvas not lying within the rectangle?
I would like a draggable rectangle over an entire canvas that will hide everything not within the rectangle. Think "fog-of-war" in a video game where you can't see anything outside the ...
0
votes
2
answers
171
views
Implementation of 3D line clipping (Cohen-Sutherland clipping algorithm) - Stuck in infinite loop [closed]
I have followed instructions from Cohen–Sutherland algorithm to implement this.
Normally clipping algorithm works just fine. But sometimes it get stuck in infinite loop with some lines while clipping ...
1
vote
1
answer
130
views
How to clip pixmap image according to scene shape
I am trying to clip a QGraphicsPixmapItem with the given boundaries of a QGraphicsScene. However, I think I do not really understand how that clipping works and as far as I read, it should clip the ...
0
votes
0
answers
55
views
How to center a Cropped Grid?
How to center a child div that is cropped by top and bottom?
There are plenty of uses cases and solutions for cropping and centering a single image, but in my case I have a complete grid consisting of ...
0
votes
1
answer
98
views
Div with horizontal scrollbar clipping content [duplicate]
the following html / css, which is a simplified version of my code clips the left side of the scrollable div when the width of the screen gets too narrow.
The horizontal scrollbar appears but you ...
0
votes
1
answer
105
views
OpenGL: How do you use the stencil buffer to discard fragments closer than polygons drawn to stencil buffer?
In the engine I'm working with, I'm drawing some polygons to be used as a stencil for a portal of sorts, and I want to clip depth to it, in the sense that anything I draw after setting up the stencil, ...
0
votes
0
answers
53
views
Cohen–Sutherland algorithm
in Cohen–Sutherland algorithm if p1 is in bottom and p2 is in right then the logical and operation between
right=0001, bottom=0100 is 0000 which says the line is inside the clip window when its ...
0
votes
1
answer
215
views
Plotting subspace in Python using matplotlib
I want to create a function in Python using matplotlib which can recreate the following image:
That is, a function which takes as an argument 1, 2 or 3 vectors (so if 1 vector is provided, plot the ...
0
votes
2
answers
203
views
Example program which uses QClipPlane from Qt3D
I'm looking for some example code of how to use QClipPlane, which is part of the Qt3D framework: https://doc.qt.io/qt-5/qt3drender-qclipplane.html.
I can take the "basicshapes-cpp" demo ...
0
votes
2
answers
263
views
Use text as a clipping mask over an image during hover
I'm trying to create a hover effect for an image whereby:
A headline text is revealed
This headline text acts a clipping mask over the image
in this image, state 1 (no hover) is on the left. you ...