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
0
votes
1 answer

Graphics FillRectangle except Specified Area (.NET, GDI+)

I would like to use Graphics.FillRectangle or Graphics.Clear with semi-transparent colour (e.g. ARGB=128,0,0,0) to darken entire area of the Graphics object except some specified (rectangular) area: I know this can be achieved with four…
Libor
  • 3,285
  • 1
  • 33
  • 41
0
votes
1 answer

Clipping parent view by subview and put content of first one in second one but scaled

the question is... I have a parent view in which i drew a planimetry composed by a lot of CGPaths. Well, in this App, i can insert a subview to parent view in which there are drawn others CGPaths (like lines which represent a chair, for example).…
kinghomer
  • 3,021
  • 2
  • 33
  • 56
0
votes
2 answers

Clip or Mask a 2D texture

Hey i was wondering if anyone knows to do clipping with 2D textures for a gui or menu like system. Heres an example output i would like to produce Have a game screen with a size of 500 x 500. With a screen behind it with a size of 1000 x 1000. When…
Chris Watts
  • 2,284
  • 4
  • 23
  • 28
0
votes
1 answer

Android: Place Large Bitmap behind Small Bitmap and Large Bitmap should take shape of Smaller Bitmap

Okay, have to look to the graphics experts on this one. I have a rectangular bitmap (large) and a circular bitmap (small). I want to place the large rectangular bitmap behind the smaller circular bitmap with the larger rectangular bitmap taking on…
-1
votes
1 answer

Algorithm or existing API to clip/summarize article for sharing online (identify title, images and text)?

I would like to do something similar to what Facebook is doing when you add / share an article e.g. by typing a URL of an article / story, Facebook is automatically identifying title image etc. Is there an existing Algorithm or standard for this? Is…
Eran Medan
  • 44,555
  • 61
  • 184
  • 276
-1
votes
1 answer

How to fit/clip an axis aligned bounding box around a portion of a triangle

I have looked and looked and cannot find any resources on. I want to clip an axis aligned bounding box against a triangle in a way that creates a new tight fitting axis aligned bounding box around or in the triangle (I have seen the reverse a lot, a…
yosmo78
  • 489
  • 4
  • 13
-1
votes
1 answer

Google Maps JS API Polygon Rendering Issue

I'm creating a Google map with many polygons. The problem is that when my polygons render, they are inconsistently colored (different colors across the polygon body) and they don't render fully. Included are 2 images where you can see the amount of…
Tasoli
  • 29
  • 4
-1
votes
1 answer

DIY for clipping instead of using numpy.clip

def clip( number_list, clipNum ):# returns the clipped array based on the clipNum. Clipping an array is replacing all the numbers greater than the number provided to that number. So for example if the list is [3,17,5,9,1,11] and the clipNum is 8,…
-1
votes
1 answer

clip 2 or more triangles with a circle using matplotlib

my question is very similar to this question! but i want to use 1 circle to clip 2 triangles or more. so i tried adding 2 triangles with add_patch but it throws syntax error: patchpoly = ax.add_patch(polygon1, polygon2) so i know i can't go this…
AcaNg
  • 704
  • 1
  • 9
  • 26
-1
votes
1 answer

Draw a circle divided in two by chord

I want to create an svg like that: So, a circumference divided into two parts by a chord. The two sections must have different colors. I want to draw this object in SVG. I think I need to use the PATH tag, right? Or is there another way to do…
user10381316
-1
votes
1 answer

Masking div content using svg image

Example: codepen.io/rudza/pen/NMqVEK There is a yellow div which will contain some image content. Also, there is svg speech_bubble. Would it be possible to mask the svg over the div to show only the content inside? And is it possible to keep…
R-J
  • 928
  • 1
  • 7
  • 24
-1
votes
2 answers

Text to be clipping mask of Div background

Bear with me on this... little hard to explain. So what I'm attempting to do is have a block of text remove the background of a div directly behind it. The image linked below was done is Illustrator and now I'm trying to find a solution within HTML…
Ross
  • 15
  • 4
-1
votes
1 answer

How to clip textblock inside proportional grid?

In a UserControl that's inside a ListBox, I've got a TextBlock with proportional width (Width="*") inside a Grid that I want to take the remaining width of the grid, but whenever I resize the ListBox to a size that would clip that TextBlock's…
user1032861
  • 487
  • 3
  • 11
  • 19
-1
votes
1 answer

Why doesn't this polygon clipping code give desired result?

This is my implementation of Sutherland-Hodgman Polygon Clipping Algorithm. I am trying to clip a Positively Oriented and Convex polygon with a rectangular clipping area. I am using BGI library from colorado university. I am using OS=Win7. Visual…
user366312
  • 16,949
  • 65
  • 235
  • 452
-1
votes
1 answer

Can you tell me what's wrong with this implementation of Cohen-Sutherland Algorithm?

Please, help me to fix the code of this implementation of Cohen-Sutherland Algorithm. The theory is here at Page-91. Here is the entire project. #include "Line2d.h" #include "Rectangle2d.h" #include "Coordinates2d.h" class…
user366312
  • 16,949
  • 65
  • 235
  • 452
1 2 3
44
45