stroke

Preserve line width while scaling all points in the context with CGAffineTransform

Hi there, I have a CGPath in some coordinate system that I'd like to draw. Doing so involves scaling the old coordinate system onto the Context's one. For that purpose, I use CGContextConcatCTM() which does transform all the points as it should. But, as it is a scaling operation, the horizontal/vertical line widths get changed to. E.g. ...

Modeling by example: by Thomas Funkhouser

Hi, currently Im working on a portion on this research paper "modeling by example" Have tonnes of problems now.So if anyone has knowledge on this paper, help is badly needed here. I am using java opengl for the programming. first of is that I am trying to draw a stroke. eg: 5*100 pixels stroke. How do I draw that using the mouse.Curre...

Flex: Create custom stroke on LineSeries?

You can easily set a stroke on a line series like this: <mx:LineSeries yField="apple"> <mx:lineStroke> <mx:Stroke color="0x6699FF" weight="4" alpha=".8" /> </mx:lineStroke> </mx:LineSeries> This will set alpha for the entire stroke to .8 But I want...

Applying a stroke to a rounded rect in core-graphics

I have a gradient that has rounded corners that I an using for a custom UITableViewCell background. I am trying to apply a stroke to the path but cannot quite do it, and can't see where I am going wrong. CGFloat minx = CGRectGetMinX(rect) , midx = CGRectGetMidX(rect), maxx = CGRectGetMaxX(rect) ; CGFloat miny = CGRectGetMinY(rect) ...

Smoothing a rounded stroke in Core Graphics

I am creating my own UITableViewCells with a gradient background. I have all the logic and drawing worked out, but one thing I want to fix is the "chunkiness" around the corners of my custom cell: If you zoom in on the corners, you can see what I am talking about. Here is the code I a using to generate the cell: CGContextRef c = UI...

Using XamlReader for controls that does not have a default constructor

I have some string representations of Xaml objects, and I want to build the controls. I'm using the XamlReader.Parse function to do this. For a simple control such as Button that has a default constructor not taking any parameters this works fine: var buttonStr = "<Button xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentatio...

WPF: How to put an object/shape at the end of a line path/stroke?

Hi, everyone! I just wanna ask if there's a way where I could put an object (circle) at the end of a particular line path. Similar to this: --------------------------------------------O Start End Right now, I have the following code for tracing the line: <Grid x:Name="LayoutRoot" > <Path Stro...

Flex line weight of linechart

Hi, I want to keep default color of lines and change line weight in Flex LineChart. How can I implement it? Alternatively, if there any method for setting line weight or line color without using LineStroke? Thanks. ...

Creating a variable-width stroke in Cairo

stroke() in Cairo applies a stroke of a single specified width to a line path. I'd like to draw a path with a varying width (thinner when the user was drawing faster, thicker when slower). Is this possible in Cairo? ...

ActionScript Aligning Graphics Line Style Stroke?

is it possible to align the stroke of a graphic with actionscript? for example, the following code creates a black rounded rect with a grey stroke that is automatically centre aligned. var t:Sprite = new Sprite(); t.graphics.lineStyle(5, 0x555555); t.graphics.beginFill(0, 1); t.graphics.drawRoundRect(25, 25, 200, 75, 25, 25); t.graphic...

Android multiple stroke box in drawable xml

I'm trying to achieve what amounts to effectively 2 strokes on a rectangle in a <shape> element in an android drawable xml. A dark green outer line and a light green inner line, with a gradient fill in the center of it all. My code currently looks like this: <layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt; ...

Prevent Silverlight from scaling line width

When using the ScaleTransform class, Silverlight also scale the thickness of the strokes on the shapes that I display. But what if I don't want this behaviour? Is it possible to disable the scaling of strokes, or will I have to iterate over every shape object and set the reciprocal thickness? ...

How to change Shape border stroke runtime in Actionsctipt 3

I've got a complicated shape in a MovieClip. Runtime i want to change the stroke width of this Shape depending on a size ratio. How can I change this property without redrawing the entire Shape with the drawing API (almost impossible, is a map with very detailed borders) ? Is it possible ? ...

Saving masked UIImage to disk produces wrong image

Hi there, I've an app with a lot of masked image. For performance sake I ned to generate those masked image on disk and then incorporate them in the app (they'll be uploaded on demand nut not masked on the fly because it is already done). I'm using this kind of coding NSString *pngPath = [NSHomeDirectory() stringByAppendingPathCompon...

HTML5 canvas stroke() thick and fuzzy

I'm trying to allow the user to draw a rectangle on the canvas (like a selection box). I'm getting some ridiculous results, but then I noticed that even just trying the code from my reference here, I get huge fuzzy lines and don't know why. it's hosted at dylanstestserver.com/drawcss. the javascript is inline so you can check it out. I ...