Questions tagged [clipping]

Any procedure which identifies that portion of a picture which is either inside or outside a region is referred to as a clipping algorithm or clipping. The region against which an object is to be clipped is called clipping window.

Any procedure which identifies that portion of a picture which is either inside or outside a region is referred to as a clipping algorithm or clipping. The region against which an object is to be clipped is called clipping window.

Examples

In 2D graphics for example, if the user of an image editing program is modifying an image and has "zoomed in" the view to display only the top half of the image, there is no need for the program to spend any CPU time doing any of the calculations or memory moves needed to display the bottom half. By clipping the bottom half of the image and avoiding these calculations, the program runs faster.

In 3D graphics, in a city street scene the computer may have model, texture, and shader data in memory for every building in the city; but since the camera viewing the scene only sees things within, say, a 90° angle, or field of view, the computer does not need to transform, texture, and shade the buildings that are behind the camera, nor those which are far enough to the side that they are off the screen. The clipping algorithm lets the rendering code skip all consideration of those buildings, and the program runs faster

(From wikipedia)

665 questions
95
votes
4 answers

Manipulate system/visible clipping region in Windows 1809

Apparently, Microsoft has changed the way clipping works with Windows update 1809, released in late 2018. Before that update, GetClipBox() returned the full client rectangle of a window, even when it was (partially) offscreen. After the update, the…
Johannes Stricker
  • 1,701
  • 13
  • 23
75
votes
3 answers

SVG shadow cut off

The SVG I'm working with has a drop shadow via feGaussianBlur filter. The shadow itself is displayed properly, but gets cut off on top and bottom edges. Like so: The SVG in question is:
kangax
  • 38,898
  • 13
  • 99
  • 135
53
votes
2 answers

Auto clip and append dots in WPF label

How can I auto clip text and append dots on a label if the current text doesn't fits to its width in WPF?
Ramesh Soni
  • 15,867
  • 28
  • 93
  • 113
50
votes
4 answers

Subtract one circle from another in SVG

I'm trying to find a way to subtract one shape from another in SVG, creating a hole in the middle or a bite out of the side of it. Kind of like a clipping path, but instead of showing the intersection, I want to show one of the parts outside the…
Iktys
  • 840
  • 1
  • 8
  • 17
26
votes
2 answers

Clipping of UILabel when adjustsFontSizeToFitWidth

When I add text to a label with the adjustsFontSizeToFitWidth set to YES the text is no longer centred vertically and eventually clips the text at the bottom of the label frame. For a large amount of text it will eventually disappear off the bottom…
Magic Bullet Dave
  • 9,006
  • 10
  • 51
  • 81
24
votes
2 answers

Use Bezier Path as Clipping Mask

I am wondering if it is possible to clip a view to a Bezier Path. What I mean is that I want to be able to see the view only in the region within the closed Bezier Path. The reason for this is that I have the outline of an irregular shape, and I…
jeremyabannister
  • 3,796
  • 3
  • 16
  • 25
23
votes
3 answers

Clipping-planes in OpenGL ES 2.0

I need to clip a few hundred objects under a clipping plane in OpenGL ES 2.0 and would appreciate ideas from people more experienced with this subset of OpenGL. In OpenGL ES 1.x there is glClipPlane. On the desktop you have glClipPlane, or…
Emil Romanus
  • 794
  • 1
  • 4
  • 8
23
votes
1 answer

SVG clipPath to clip the *outer* content out

Normally, the element hides everything that is outside the clip path. To achieve the opposite effect - that is to "cut out" something from the image - i want to use two paths in the clipPath and the clip-rule="evenodd" attribute.…
tillda
  • 18,150
  • 16
  • 51
  • 70
21
votes
3 answers

Rounded rect on NSView that clips all containing subviews

I am creating a NSView subclass that has rounded corners. This view is meant to be a container and other subviews will be added to it. I am trying to get the rounded corners of the NSView to clip all of the subview's corners as well, but am not able…
coneybeare
  • 33,113
  • 21
  • 131
  • 183
17
votes
2 answers

WPF clipping even when no clipping is desired - how to turn it off?

I need to float out some content out of the ListBox as specified in a DataTemplate for an ListBox.ItemTemplate. I am using RenderTransform but the content gets clipped on ListBox boundaries. ClipToBounds is False for the entire visual tree. I have…
wpfwannabe
  • 14,587
  • 16
  • 78
  • 129
16
votes
3 answers

IE 8 absolute positioned element outside its parent clipping problem

I have an absolute positioned div inside another absolute positioned div. The child div content is much bigger than the parent can contain. This is by design. I need the child div to spill out of its parent. It does so in every other browser except…
Boris Hamanov
  • 3,085
  • 9
  • 35
  • 58
15
votes
4 answers

Adding a subview larger than cellHeight to a UITableViewCell?

I'm trying to add a subview to a UITableViewCell and the design that I'm working from demands that this particular subview (an image) needs to be larger than the actual UITableViewCell and thus partly overlap its siblings. So I've set up my table…
NSSec
  • 4,431
  • 1
  • 27
  • 29
15
votes
3 answers

How can I clip INSIDE a shape in HTML5 canvas?

I've found a number of examples for clipping the outside region of an arc (e.g.: this example). I can't seem to figure out how to clip inside the arc shape instead. Here is an example of how I'm currently clipping the outside region, which is…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
13
votes
1 answer

How to invert clipping geometry in Silverlight/WPF?

The UIElement.Clip property takes a Geometry object and uses it to clip away the outside of the UIElement. I would like to do the geometric inverse and punch a hole into the element instead. Anyone know how to do this? I imagine creating an…
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
13
votes
2 answers

Internet Explorer CSS property "filter" ignores overflow:visible

Apparently Internet Explorer (up to version 8 at least) ignores overflow:visible when applying filter (e.g. for opacity), causing anything outside the filtered element to be clipped as if overflow:hidden were used. Are there any workarounds to this…
Arc
  • 11,143
  • 4
  • 52
  • 75
1
2 3
44 45