Questions tagged [clip]

Clipping is restricting the surface on which a drawing is made

Clipping is restricting the surface on which a drawing is made Clipping can also include gaps in a surface. Clips can be rectangle, ellipse, or any other kind of geometry depending on the support of the graphical engine

732 questions
70
votes
9 answers

Android View Clipping

Is there any way to define the clip region of a ViewGroup in android (Honeycomb)? For example, I have a ListView with an image background that has rounded corners. As I scroll through the list, the children stick out past the corners of the…
Jon Ross
  • 701
  • 1
  • 5
  • 6
34
votes
2 answers

Clipping raster using shapefile in R, but keeping the geometry of the shapefile

I am using {raster} to clip (or crop) a raster based on an irregular shapefile (the Amazon biome) but the output always has a rectangular extent. However, I need the output in the exact same geometry of the shapefile. Any tips?…
ALSM
  • 627
  • 1
  • 5
  • 14
31
votes
5 answers

How to anti-alias clip() edges in html5 canvas under Chrome Windows?

I'm using the clip() function on a canvas. Results: As you can see the chrome version has horrible jaggies / aliasing along the edges. How do I fix this? Code to reproduce: http://jsfiddle.net/ZRA76/ :
Simon Epskamp
  • 8,813
  • 3
  • 53
  • 58
25
votes
6 answers

Make NSView NOT clip subviews outside of its bounds

Is it possible to make an NSView not clip its subviews that are outside of the bounds? On iOS I would simply set clipsToBounds of my UIView no NO. But NSView doesn't have such a property. I tried experimenting with wantsLayer, masksToBounds,…
DrummerB
  • 39,814
  • 12
  • 105
  • 142
24
votes
2 answers

Pythonic way to replace list values with upper and lower bound (clamping, clipping, thresholding)?

I want to replace outliners from a list. Therefore I define a upper and lower bound. Now every value above upper_bound and under lower_bound is replaced with the bound value. My approach was to do this in two steps using a numpy array. Now I wonder…
ppasler
  • 3,579
  • 5
  • 31
  • 51
23
votes
4 answers

Clip values between a minimum and maximum allowed value in R

In Mathematica there is the command Clip[x, {min, max}] which gives x for min<=x<=max, min for xmax, see http://reference.wolfram.com/mathematica/ref/Clip.html (mirror) What would be the fastest way to achieve this in R?…
Tom Wenseleers
  • 7,535
  • 7
  • 63
  • 103
21
votes
3 answers

Using ffmpeg to split video files by size

I'm trying to write a batch file using ffmpeg to automate the redundant daily task of taking footage from work that's recorded in 4gb blocks (which is standard in most DSLR cameras & GoPro's), and split the clips into 2gb files for streaming…
user2548469
  • 427
  • 2
  • 6
  • 10
17
votes
4 answers

Using CSS Clip with percentage

I'm trying to display only the top half of an image and the bottom half of the same image in 2 separate divs. I've tried with the CSS property clip, but it doesn't seem to support % as a unit. Is it just me? Do you have a solution for displaying…
Axiol
  • 5,664
  • 9
  • 37
  • 49
16
votes
3 answers

Android: how to clip only top rounded corners

I'm creating a ScrollView with a FrameLayout inside. I want to design it so that only the top corners are rounded on the ScrollView. I've created a drawable shape as follows
Jankers
  • 561
  • 4
  • 11
16
votes
2 answers

Error when selecting text from Textview (java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0)

I am trying add copy paste functionality on text view.I have added in code registerForContextMenu(detailedText); and also android:textIsSelectable="true" in xml.When I am trying to copy it works well,but when it pointed on first position of the…
Mayur Raval
  • 3,250
  • 6
  • 34
  • 57
15
votes
1 answer

Is there an inverse to the CSS "Clip" property; hide the clipped area?

The CSS clip syntax gets you to define a rectangular area of a larger image that you wish to be visible. Is there a way to specify the inverse? Specify the rectangular area of the image that you wish to become invisible. Like punching a rectangular…
Dominic
  • 587
  • 3
  • 9
  • 19
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
12
votes
2 answers

Android Drag and Drop getClipData returns always null

I am designing a drag and drop operation but I don't know how to access my data. Has anyone experience with Clip Data objects? Here is my code: Starting the drag and drop: ClipData dragData= ClipData.newPlainText("my", "test") ); …
Anthea
  • 3,741
  • 5
  • 40
  • 64
12
votes
2 answers

How to use HTML5 clip()

I am new to HTML5 and was trying to make something, actually draw the PORTAL2 logo :). Till now I have got it so far but as you can see leg is protruding out of the wall, i want to know how to chip off that extra paint. I guess it can be…
Shekhar_Pro
  • 18,056
  • 9
  • 55
  • 79
12
votes
1 answer

How to overlap kriging spatial prediction map on a particular area of a country map in R?

I have a hourly PM10 dataset for 81 observation named "seoul032823". You can download from Here. I have performed ordinary kriging on this dataset and also got spatial map for kriging prediction. I also can show the observation data points on…
Orpheus
  • 329
  • 6
  • 21
1
2 3
48 49