FAQ Database Discussion Community


How to create custom stroke color of ellipse?

c#,wpf,colors,ellipse,stroke
I was looking around for some answers but couldn't find anything. I want to know if there's a way to make a custom stroke for an ellipse. I have a bunch of ellipses drawn on a canvas that, when clicked, the clicked ellipse is highlighted with a green stroke. I...

How can I calculate where to start my line based on the stroke cap?

android,drawing,ondraw,stroke
I'm trying to draw a line, but I need to take the width of the stroke cap into account so I don't overflow the container. I have code that looks like this... private void initialize() { this.paint = new Paint(); this.paint.setColor(Color.BLACK); this.paint.setStyle(Paint.Style.STROKE); this.paint.setStrokeCap(Paint.Cap.ROUND); this.paint.setStrokeWidth(1); } public void setStrokeWidth(float strokeWidth) {...

OpenLayers 3 Stroke style

styles,openlayers-3,stroke
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,...

Add a stroke to a clipped path

svg,stroke
I'd like to display a stroke around the intersection of two circles. Here's my code: <clipPath id="clip"> <circle cx="100" cy="100" r="50" /> </clipPath> <circle cx="150" cy="100" r="50" fill="red" clip-path="url(#clip)" stroke="black" /> The stroke of the clipped circle is getting clipped by the clipPath as well, but I'd like it to...

Draw line with high StrokeThickness in silverlight

c#,xaml,silverlight,line,stroke
I have an application where you can draw on a Canvas (like Paint). The C# code looks basically like this: private void startDrawing(object sender, System.Windows.Input.MouseButtonEventArgs e) { _drawingStart = e.GetPosition((UIElement)sender); _isDrawing = true; } private void stopDrawing(object sender, System.Windows.Input.MouseButtonEventArgs e) { _isDrawing = false; } private void doDrawing(object sender, System.Windows.Input.MouseEventArgs...

javafx collision issue between path(line) with thick stroke and circle [duplicate]

java,javafx,collision-detection,intersect,stroke
This question already has an answer here: Checking Collision of Shapes with JavaFX 1 answer I am using JavaFx 8 library. My task is simple: I want to check if circle collides with a path that has a thick stroke around it. The problem is that both functions Path.intersect()...