clipping

Using CSS clip-path only affects first object in webkit browsers?

余生长醉 提交于 2019-12-12 09:39:16
问题 I am trying to use the CSS clip-path attribute to apply an SVG clip-path to some elements in a page. For example, HTML (note that clipPathUnits="objectBoundingBox" allows the circle to be expressed in fractions of the containing element size): setTimeout(function(){ $('.circle:first div').addClass('clipped'); setTimeout(function(){ $('.circle:nth-of-type(2) div').addClass('clipped'); }, 2000); }, 2000); .circle { width: 100px; height: 100px; overflow: hidden; margin-bottom: 10px; } .circle

UIButton + italic font = clipping

三世轮回 提交于 2019-12-11 23:54:31
问题 The problem is that UIButton clips title tail (for about 1-2 pixels at the end) when I use italic font like Helvetica Oblique with size bigger than 13. Does anybody know a solution for this problem? 回答1: Subclass UIButton class and override setTitle with: - (void)setTitle:(NSString *)title forState:(UIControlState)state { [super setTitle:[NSString stringWithFormat:@" %@ ", title] forState:state]; } This will add additional spaces from both sides of your text. Easy & simple. 回答2: I had this

Three.js CanvasRenderer depth sorting

一笑奈何 提交于 2019-12-11 11:19:42
问题 I have a few CubeGeometry objects rendered on the CanvasRenderer. I am getting some clipping issues due to depth sorting as shown on the following image. Now I have seen the responses on here that this is due to limitations in CanvasRenderer and I have tried applying a few things to get a better result but there is still the clipping issues. I have overdraw set to 1 and I have increased segments as much as I can without impacting performance too much. The image looks correct in the

Blackberry setting a clipping region/area

做~自己de王妃 提交于 2019-12-11 07:27:49
问题 In J2ME we have the clipRect() and setClip() to clip a region in the Graphics area. What is the equivalent apis available in BlackBerry and how do we use it? 回答1: See the blackberry API. pushRegion() for the clipRect(), don't know of exact setClip replacement. http://www.blackberry.com/developers/docs/3.6api/net/rim/device/api/ui/Graphics.html 来源: https://stackoverflow.com/questions/1330205/blackberry-setting-a-clipping-region-area

How does gl_ClipVertex work relative to gl_ClipDistance?

旧街凉风 提交于 2019-12-10 21:50:12
问题 I was planning on using gl_ClipDistance in my vertex shader until I realized my project is OpenGL 2.1/GLSL 1.2 which means gl_ClipDistance is not available. gl_ClipVertex is the predecessor to gl_ClipDistance but I can find very little information about how it works and, especially relative to gl_ClipDistance , how it is used. My goal is to clip the intersection of clipping planes without the need for multiple rendering passes. In the above referenced question, it was suggested that I use gl

How to create stretching clipping rectangle in Silverlight

帅比萌擦擦* 提交于 2019-12-10 21:44:49
问题 Since Silverlight doesn't have the comfy feature of 'ClipToBounds' properties on controls, I have to define clipping shapes by myself. I was wondering if I could create a clipping rectangle that's following the size of my control. Any suggestions? 回答1: If there is an existing control in you layout that you want to dynamically clip then use its SizeChanged event. For example lets say you want to clip this Grid:- <Grid SizeChanged="Grid_SizeChanged" Width="50" Height="20"> <Grid.Clip>

Clipping path in SVG not working in Safari

北城余情 提交于 2019-12-10 21:25:14
问题 I've created a simple polygon in Illustrator and then created a clipping path (mask) in front of an image. I've exported it as an SVG file, and it renders perfectly in Chrome and Safari. However, when I create an HTML file using the SVG data, it renders perfectly in Chrome but not Safari 6.0.2. Not quite sure what I might be doing wrong; I've created examples of the SVG example (personal site) and the HTML (example on jsfiddle). 回答1: You must be running into a bug in Safari, instead of using

CSS multi-column layout with column gap not changing on window resize

£可爱£侵袭症+ 提交于 2019-12-10 21:20:37
问题 I am trying to make a multi-column layout where each column is filled with images. There must be horizontal scroll for the container of the columns, but the column gap must not change on window resize, and the last column must be able to be shown clipped on the one side. The coloumn height depends on the parent container and when the window height is changed, the images must be reаrranged in order to fill the column with whole images (an image should not be clipped horizontally). img { height

Undesired clipping when resizing wpf control under certain tresshold

心不动则不痛 提交于 2019-12-10 18:57:03
问题 When developing a custom control in WPF I noticed a strange clipping behavior. When I resize the control under a certain minimum boundaries/tress-hold it decides to clip the top 24 pixels of the control for reasons I don't understand. It would be much appreciated if somebody could explain how i can achieve the desired graphical effect without clipping behavior as illustrated. The behavior occurs with the following XAML. Note that the XAML is a stripped down to make the it compliant with

Java: create clipping region that has a hole?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 14:58:10
问题 How do you define a clipping region (via Graphics2D.clip(Shape)) that has a hole in it? for example: a Rectangle r1 minus another Rectangle r2 inside r1 I'm sure this has an easy answer, but I'm drawing a blank. 回答1: Path2D.append() + EVEN_ODD winding rule appear to do the trick: package com.example.test.gui; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Line2D; import java.awt.geom.Path2D; import java.awt.geom