clipping

How can I create "glass" effect on my own UIViews?

Hi there, I'm working on an iPhone app that has some non-rectangular UI elements. Currently, I'm subclassing UIView, and in drawRect I'm using a CGPathRef to draw black border and a color-filled interior. I'd like to make these items look more like "buttons", though, so I'd like to have some of the same sort of "glass effects" that ar...

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? e.g. ...

SetBold wxDataViewItemAttr clips the text rendering

I'm using wxWidgets 2.9 and created a Tree+List Control with wxDataViewCtrl class and wxDataViewModel for providing data to the view. Some of the items to be specified with bold style. Doing so displayed text is clipped. Please see below screen shot. Left side with the problem where text is clipped, right side without the problem but n...

Library for polygon operations

I've recently encountered a need for a library or set of libraries to handle operations on 2D polygons. I need to be able to perform boolean/clipping operations (difference and union) and triangulation. So far the libraries I've found are poly2tri, CGAL, and GPC. Poly2tri looks good for triangulation but I'm still left with boolean ope...

Where are the standard C implementations of sutherland-hodgman polygon clipping algorithm?

I have implemented my version of sutherland-hodgman polygon clipping algorithm, but I believe my implementation could be better. So I am wondering whether there is a standard implementation. Here is my implementation bool shclip(stPt** verts, int *n, float left, float right, float bottom, float top) { if (leftclip(verts, n, left) && ...

DirectDraw: Clipping fails if surface is larger than backbuffer

Hello, I'm writing a game engine for mobile devices, and I'm trying to support multiple resolutions. The game world can be much larger than the screen, so I'm using a clipper to create a viewport on the world. My device has a resolution of 240x320. When I set the viewport to 240x320 and my world to 240x320, all is fine. I can slide the...

Bezier's offset clipping

Hi! I'm trying to make a plug-in for Inkscape for cnc machining. And I need to make Bezier offset function. Inkscape operates with cubic Beziers. So here's what I've done. Offset of a single segment. Join of a two offseted segments. Splitting by intersection points of the offsetted curve. And I've stopped at clipping. My pl...

InlineUIElement not respecting clipping area of TextBlock

Hi. I have a TextBlock that contains some text in some Run elements, and which is set to CharacterEllipsis textclipping mode. However I also have a few InlineUIElements that contains some custom buttons. The problem is the buttons are showing up outside of the bounds of the TextBlock when they should be "clipped". Am I missing some exp...

Clipping NSImage around certain NSRect

I have an NSImage with different images inside it. The positions of the images inside of it will stay the same all the time, so I need to specify a rectangle to get a subimage at the position of the rectangle is inside of the image. How could this be done? ...

iphone clipping a MyPicker : pickerview : uiview

Just checking to see if someone has done this before. I used to have ways to modify the size of a UIPickerView. But it seems that ever since iOS4.0 it seems to be locked. If I do the usual trickery and compile targeting 3.0 it works as usual. But this is for a free app with iAd so it's going to be an iOS4 only affair. So I'm thinking o...

UIButton.titleLabel clipping text problem

Hope I can get some help with a rather obscure problem with UILabel. I keep getting problems with clipping of characters. The font in the image at the link below is baskerville-bolditalic. The yellow is the rect that the UIButton is rendered in. The yellow is the UIButton's titleLabel.backgroundColor. http://img5.imageshack.us/img5/2381...

UILabel sizeWithFont: problem. Clipping italic text.

I have created a UILabel that displays a single large character. Even with clipsToBounds = NO; I still get clipping. See link: http://img341.imageshack.us/img341/5310/screenshot20100814at243.png I used the following code: CGSize fBounds = [myLabel.text sizeWithFont:cFont]; To get what should be the bounding rectangle of the font. ...

How should I wrap a custom NSView in an NSScrollView?

Hey stackoverflow, Cocoa's NSScrollView is horribly under-explained. I hope someone here knows what it's all about and can spare me a few seconds. So I have a custom NSView. I implement -drawRect: for it to draw something, fill itself with colour, whatever. Then I have an NSScrollView wrapping it (set up through the interface Builder)....

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 behavior ? The sample code below shows how child is clipped by container only its right...

Dynamic Clipping Width in Silverlight Within Canvas

Why does this throw an error and how can I fix... I need to set the clipping rect to be dynamic. <Grid.ColumnDefinitions> <ColumnDefinition Width="42"/> <ColumnDefinition x:Name="ListBoxContainer" Width="*"/> <ColumnDefinition Width="42"/> </Grid.ColumnDefinitions> <Canvas> <Button x:Name="b...

Cutting a clip from iPod library file

My requirements are as follows: I need to access a song from iPod library and play it(which is doable). Now while the song is getting played. I need to set a start and end time and need to cut a clip of it. Any thoughts? ...

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 IE 8 (IE 7 looks OK, not sure) In IE8 the part of the child that is out of parent is clipp...

Silverlight 4 Border Clipping

Is it possible in Silverlight 4 to create a border with rounded corners that clips any of it child UI Element? So far I have attempted to do so by setting a button as a child element of a border control but the buttons does not get clipped when I set the corner radius to create rounded corners in the border. ...

away3d 3.6 Clipping bug

hello noun sprite in the away3d 3.6 in FrustumClipping not displayed why???? var spr2d:DirectionalSprite; var bitMat:BitmapMaterial = new BitmapMaterial(bitData); for(var i:int = 0 ; i<500 ; i++) { spr2d = new DirectionalSprite(bitMat); spr2d.z = (Math.random() * 4000)+1500; ...

clipping to bounds with UIViewContentModeScaleAspectFill

Hi everyone: is there any way of controlling where UIViewContentModeScaleAspectFill clips an image? In my case, images are always clipped around the center of the image. Is it possible to make it clip around the top? Thanks! Antonio ...