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
6
votes
2 answers

Pygame: How to draw in non rectangle clipping area

Hi I would like to set in pygame non rectangle clipping area (in this case as character "P"), where it would be strict limited, where to draw another objects. Is there any option? thanks a lot
Mr.Smith
  • 103
  • 6
6
votes
1 answer

React Native svg clip path on image not working

Trying to clip an Image component with an svg ClipPath is proving problematic. I can clip a Rect no problem, but when I replace the Rect with an Image, nothing shows up. octogon.points = "80,0.3 23.6,23.6 0.3,80 23.6,136.4 80,159.7 136.4,136.4…
Tobe_Sta
  • 448
  • 6
  • 20
6
votes
2 answers

Canvas 'Clip' reverse action?

Assuming I have: var context = document.getElementById('test').getContext('2d'); // Background context.fillStyle = '#000'; context.fillRect(0,0,300,300); //…
Anon
  • 731
  • 1
  • 6
  • 5
6
votes
4 answers

Set volume of Java Clip

Is there any way to set the respective volume of a Clip in Java? I have this method: public static void play(Clip clip) { if (Settings.getSettings().isVolumeOn()) { FloatControl volume = (FloatControl)…
nick zoum
  • 7,216
  • 7
  • 36
  • 80
6
votes
3 answers

Android Nougat clipPath not working during animation

I have created a circular clip path on my canvas and I have a column of numbers that animates on the canvas, so I see numbers animate in the clipped section and animate out. Here is code for clipping: mClipPath.addCircle((w / 2f), (h / 2f), radius,…
6
votes
1 answer

OPENGL clip coordinate

I have a question for opengl clip coordinate. For example, a triangle, three vetices, now have transformed to camera coordinate, multiply with perspective projection matrix to clip coordinate, begin to clip, -w=
yewei
  • 241
  • 2
  • 9
5
votes
3 answers

clip-path in Raphaël.js

How can I use clip-path with Raphaël.js like this example. It seams that Raphael.js has only clip-rect in it.
Artur Keyan
  • 7,643
  • 12
  • 52
  • 65
5
votes
3 answers

Component painting outside custom border

In this custom border class, I define a RoundRectangle2D shape. This object is used to paint the border. Unfortunately, since the paint method of a JComponent invokes paintComponent before paintBorder, setting the Graphics clip to the…
mre
  • 43,520
  • 33
  • 120
  • 170
5
votes
1 answer

Drawing outside a component's bounds

I'm making a component (extending JComponent) which will have some decoration drawn over the top of it and partly outside its bounds. I would like to know if there's a way of drawing outside the component using self-contained code (I don't want to…
Tharwen
  • 3,057
  • 2
  • 24
  • 36
5
votes
1 answer

Custom View with LAYER_TYPE_SOFTWARE clips view

I've created a custom view which extends TextView. I want to use a BlurMaskFilter on an oval, however, unless I use LAYER_TYPE_SOFTWARE, the oval isn't blurred as expected. Using LAYER_TYPE_SOFTWARE will blur the view correctly, however now it is…
5
votes
1 answer

Java - Lag when playing short audio clip frequently

After some days of research on the internet, I came here looking for help. I'm currently developing a short 2D game for friends (and really just for fun), and I learned about Clips some days ago. In this game, the player can gather objects (almost…
Lutzi
  • 416
  • 2
  • 13
5
votes
1 answer

View the inverse region of clip-path

This is a simple fiddle that displays a circular region inside a rectangle https://jsfiddle.net/3v6yhf0m/ svg { border: 3px dashed #999; } svg > rect:hover { fill: green; }
Kira
  • 1,403
  • 1
  • 17
  • 46
5
votes
1 answer

Numpy clip function takes twice as long as expected

I'm finding that the performance of the numpy clip function is significantly slower than just doing it myself with a mask (164us vs about 74us). Is the clip function doing something additional that makes it take twice as long? %timeit…
tim654321
  • 2,218
  • 2
  • 15
  • 19
5
votes
2 answers

Why the frames of a VideoClip change when it is written to a video file?

I wrote the following code: from moviepy.editor import * from PIL import Image clip= VideoFileClip("video.mp4") video= CompositeVideoClip([clip]) video.write_videofile("video_new.mp4",fps=clip.fps) then to check whether the frames have changed or…
Ruchir
  • 71
  • 7
5
votes
4 answers

Android text gets clipped on some devices

I am facing an issue in one phone (till yet). My app uses Hindi fonts. It shows well on emulator, tab, many other phones too. But one of the phone which I am using for testing purpose is showing the text going cut from sides. I tried almost…
Akshit Arora
  • 428
  • 3
  • 15