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

Swift: UIBezierPath Stroke Animation from Center

I've been making a simple UIBezierPath animation with Swift. This path consists on creating a rounded rectangle with a colored border. The animation must be the drawing of the colored border. To do so, I've created a CAShapeLayer with a…
rulilg
  • 1,604
  • 4
  • 15
  • 19
12
votes
4 answers

ShapeableImageView's stroke is getting cut by borders

I have a ShapeableImageView here, with 5dp stroke:
12
votes
1 answer

Stroke SVG Path only inside or only outside

Consider 2 html svg paths , a square (class inside) and a rectangle (class outside) having same height. When I apply stroke-width: 10px, the stroke gets applied 5px inside and 5px outside. Fiddle How do I stroke only inside or only outside? .inside…
Saravanabalagi Ramachandran
  • 8,551
  • 11
  • 53
  • 102
12
votes
2 answers

OSMDroid PathOverlay

Today I'm looking forward of how to use PathOverlay in OSMDroid. I can't find any explanation of how it works. I need to create a suggested route (not like navigation system), just a stroke begining at a point, do a "circuit" and then return to the…
silentw
  • 4,835
  • 4
  • 25
  • 45
11
votes
2 answers

android dashed border with padding

i have a RadioGroup I would like to add a dashed stroke(boder?) with some padding. The background of Radio Buton is
Korniltsev Anatoly
  • 3,676
  • 2
  • 26
  • 37
10
votes
2 answers

Drawing a line with a certain pixel width

I would like to display X/Y data on a canvas using lines with a certain width (in pixels, or "dp" ideally). I have tried the setStrokeWidth(..) method of Paint, and that indeed does change the line width but it isn't what I need. In my case I've…
Rich
  • 117
  • 1
  • 1
  • 10
10
votes
2 answers

How to give border to circle using paint

Hi i have implemented Progress bar and it is working fine, but my problem is i need to give a only border to circle using paint. I worked on that but it is taking all the area of circle, i need only border. My paint code: mCirclePaint = new…
Piku
  • 259
  • 1
  • 3
  • 17
9
votes
1 answer

SwiftUI: ViewModifier where content is a Shape

The following code works fine. So really, I’m good ... But I wanted to learn about ViewModifiers ... so my goal is to separate the non-changing stuff from the dynamic stuff to create a .cardify() custom modifier to call on the Shapes Views. struct…
RichWalt
  • 502
  • 1
  • 4
  • 13
9
votes
2 answers

NSBezierPath rounded rectangle has bad corners

I have an NSBezierPath that makes a rounded rectangle but the corners of it look choppy and appear brighter that the rest of the stroke when viewed at full scale. My code is: NSBezierPath *path = [NSBezierPath bezierPath]; [path…
nosedive25
  • 2,477
  • 5
  • 30
  • 45
9
votes
8 answers

How to outline a TextView?

What I want to do? (blue will be changed as white) What I did? I have found a class which extends TextView that able to outline textview very close to what I want. The problem is that I could not change stroke color to any color, it draws always as…
Mustafa Güven
  • 15,526
  • 11
  • 63
  • 83
8
votes
3 answers

Fill svg path background. Fill not working

I need to create a speech bubble in SVG. Unable to fill the background of the svg path. I need to fill background color to this path. Fill is only coloring the border like stroke.
Atul Sharma
  • 9,397
  • 10
  • 38
  • 65
8
votes
1 answer

OpenLayers 3 Stroke style

I want to modify style of the method select . I'm able to change the style of this method but i'm not able to duplicate the white border of blue stroke. Someone is able to style vector with a stroke and put a border to the stroke? See this example,…
FatAl
  • 859
  • 1
  • 6
  • 20
7
votes
4 answers

c# List Sort : by Chinese strokes

I have a webpage, in which there is a sort that I have to order the list by Chinese strokes. I have created an application containing code like this: List stuList = new List() { new Student("上海"), new…
ToddZhao
  • 73
  • 5
7
votes
1 answer

How inherit stroke color in SVG? (Not fill, but stroke color)

I have an .SVG where I call with Arrow. Everything is good, but I would like to dynamically set a different stroke color (Not fill color...) for my SVG like . I read that I could use…
James Deschênes
  • 145
  • 1
  • 10
7
votes
3 answers

SVG stroke-linecap at one end only

Is it possible to add a linecap to only one end of a stroke? Not both ends as is the default shown in the sample below.
D-Money
  • 2,375
  • 13
  • 27
1
2
3
31 32