Questions tagged [stroke]

a line drawn along a path

On iOS, this might be a UIBezierPath or on Android, this would be a collection of attributes describing the line in XML (such as width, color, width and gap).

476 questions
3
votes
2 answers

SVG stroke issue

I'm creating a chart with SVG. I've created it with three circle elements, and add one path(triangle) to make a blank space. But I don't how to hide a thin almost visible border at the bottom. Maybe I'm doing something wrong? Here is my…
Kirill
  • 65
  • 9
3
votes
1 answer

How to calculate appropriate stroke width given a UIFont with any pointSize?

I would like to apply a single solid line stroke to text. This is easily obtained using NSAttributedString specifying the .strokeWidth. However I am finding it to be tricky to determine what the strokeWidth should be given a UIFont to be rendered at…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
3
votes
1 answer

text with outer stroke outline on iOS

Android implements outline via outer stroke. So you can have a really thick outline that looks like this: iOS implements outline via inner stroke. So a thick outline will totally consume the inner color: Is there any way to create an outer stroke…
P.Melch
  • 8,066
  • 43
  • 40
3
votes
1 answer

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…
3
votes
1 answer

QML context2d lineWidth

I'm trying to make a circle of lines in a qml canvas, but when i change the lineWidth to something other than 1, it messes up the position of the strokes, so that they are extended into the center. left:lineWidth=1 ,…
3
votes
1 answer

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?
alexbw
  • 2,028
  • 2
  • 21
  • 25
3
votes
1 answer

Change SVG stroke on path with jQuery

I've set my SVG image as the background of a div. Now I want to change the stroke of a specific path with jQuery every x seconds. I've seen an example (click me) where this is basically done. This is my jQuery so far: $(document).ready(function(){ …
sqe
  • 1,656
  • 4
  • 21
  • 38
3
votes
1 answer

Stroke() with pressure

In Processing there are 3 strokeCap() modes: SQUARE, PROJECT, or ROUND. However, I am trying to get an effect whereby the stroke simulates pressure like in Photoshop. Is there any way I can get an effect like this by programming it out? I am…
jl90
  • 639
  • 2
  • 10
  • 24
3
votes
1 answer

Can stroke-width on a SVG be animated?

I tried to animate the width of a SVG like this and it did not work Normally I can have multiple lines, but can I make them thicker/thinner? .swidth { animation: hideshow 5s ease infinite; } @keyframes hideshow { from { stroke-width="2"; } …
Felix
  • 51
  • 1
  • 4
3
votes
1 answer

How can I get a blurred stroke in java.awt.geom

I would like to be able to control the blurred/fuzzy level of the stroke of a rectangle. It should be realized within the java.awt.geom package. I know how to change the shape of the stroke, like on this jhlabs page, but I don't know how to blur the…
freehell
  • 31
  • 3
3
votes
1 answer

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:…
stiank81
  • 25,418
  • 43
  • 131
  • 202
3
votes
2 answers

Graphics2D stroke spikes on Java

I'm having a problem with graphics 2d stroke, it seems no one has this problem since I have searched for something alike and no results. Here is the image. As you can see, there are spikes on my stroke, I don't want those. Here is my code. The…
xchan
  • 37
  • 5
3
votes
2 answers

Why CGContextSetRGBStrokeColor isn't working on ios7?

I have a problem to make a text stroke to work on iOS7...Everything worked well for iOS4 iOS5 ans iOS6 but since I updated my devices for iOS7, I can't see the stroke color. Does anybody have an idea of how this can be possible ? Here is my code…
Matthias
  • 999
  • 11
  • 25
3
votes
2 answers

Java Swing BasicStroke "cap" does not apply to zero degree angles

This question is a followup to one I asked some time ago: Drawing a bordered path with sharp corners in Java After experimentation, I've discovered some behavior which may be intended, or may be a bug, but either way is not desired by me. …
The111
  • 5,757
  • 4
  • 39
  • 55
3
votes
2 answers

Drawing line less than one pixel thick requires anti-aliasing in Android 4.2

I'm trying to draw a very thin line (less than one pixel thick) in android. I'm using Paint blackThin = new Paint(); blackThin.setStrokeWidth(0.1f); blackThin.setColor(Color.BLACK); to initialize the paint object. This works fine in Android 2.2,…
Shdus
  • 83
  • 1
  • 6