PathGeometry is a class in the System.Windows.Media namespace. It represents a complex shape that may be composed of lines, arcs, points, polygons, etc. PathGeometry has several useful methods that can help in detecting overlap of shapes and overlapping areas. Also, it has methods for handling various operations necessary when working with odd shapes.
Questions tagged [pathgeometry]
126 questions
0
votes
0 answers
C# Image to PathGeometry
I am trying to Convert an Image to a PathGeometry. I upload a picture, and then I do canny edge detection and now I want to convert that in to a PathGeometry. My over all plan it to fill it with different colors.
So I tried this :`public Shape…

MiltaruyOne
- 3
- 3
0
votes
0 answers
0
votes
1 answer
MahApps Button Icon with svg image
I am using MahApps.Metro in my WPF app. In the title bar of my MetroWindow I'm displaying an svg image icon as follows. In the Path Markup for the svg data when I use the Fill attribute value to black (Fill="Black"), the icon looks good (as shown in…

nam
- 21,967
- 37
- 158
- 332
0
votes
1 answer
WPF Path Geometry; drawing a box with a centred arrow on the top
I am trying to draw a simple box with an "arrow head" centred at the top, but I do not seem to be able to get that arrow head to centre (as shown in the following example, the arrow heads are always offset to the left)...
Here is my XAML (this is…

Martin Robins
- 6,033
- 10
- 58
- 95
0
votes
1 answer
WPF: XAML DrawingImage to Path.Style
I get my Icons in XAML-format, like this (path shortened for better readability):
…

Scholly
- 33
- 7
0
votes
1 answer
Can Path.Data creation be simplified in code?
I have a Canvas in UWP, and need to draw Path on it in code-behind. I have it working, but it seems needlessly verbose, especially considering that I need to have four instances of it in a switch-case statement. I'm wondering if there's a way to…

Keven M
- 972
- 17
- 47
0
votes
1 answer
Is there an equivalent of Geometry.FillContains in UWP
I need to decide whether a Point is inside a given Path.
In WPF I was able to use Geometry.FillContains:…

Cristiano Ghersi
- 1,944
- 1
- 20
- 46
0
votes
0 answers
How to plan path from point 1 to point 2 so that it remains in the specified region?
Basically this is a trajectory planning problem. As shown in figure below, how can I ensure that in moving from a point (x,y,z) to another point within torus, I don't get out of that torus region?(the region outside torus is not permissible for end…

Talha Yousuf
- 301
- 2
- 12
0
votes
0 answers
Scheme for tracking DrawingVisual in WPF DrawingVisual
I'm creating a CAD program in WPF that adds and deletes lines and rectangles, both of which are described by a PathGeometry. When I get further along with the program, it will contain a great variety of different PathGeometries, each of which make…

SojourningStudent
- 77
- 8
0
votes
0 answers
How can I add a text to an arrow?
I am currently working on an arrow, containing a text (here 'Test'), that shows an offset.
My code is:
Width = 200;
Length = 1000;
double arrowHeadWidth = Width;
double arrowHeadLength = Width / 2;
double arrowWidth = Width - arrowHeadWidth /…

Benny
- 25
- 8
0
votes
1 answer
WPF TranslateTransform is ScaleTransforming
In the following code part is Part class's object which is inherited from ScatterViewItem class (Microsoft.Surface.Presentation.Controls). part.Content is Path geometry:
GeometryGroup gGroup = new GeometryGroup
{
FillRule =…

Bahriddin Abdiev
- 328
- 1
- 14
0
votes
1 answer
Draw a SVG path with Direct2D: Can't draw elliptical arc
I have following SVG path:
0
votes
1 answer
WPF: Exception if new EllipseGeometry() called on non UI thread
I have a WPF application that retrieves object 'movement' messages from a EasyNetQ/RabbitMQ message queue. Getting the message works fine as I can see in my logger.
private void btnSubscribeToMessageQ_Click(object sender, RoutedEventArgs e)
{
…

Dick de Reus
- 779
- 1
- 7
- 15
0
votes
1 answer
Animation Rotating a PathGeometry
I have a path that has three defining PathGeometries: a circle, a connecting line, and a path that represents fan blades. I'd like to use the path's Tag property to trigger an animation that rotates the fan blade geometry. Since I need to reuse this…

NSami
- 1
- 3
0
votes
1 answer
UIBezier paths : How to divide the circle into multiple paths
I am trying to divide the circle into multiple paths and represent data in it with few animation effects as shown in below image. Having trouble in dividing the paths.
I appreciate any help & suggestions.
Code:
import UIKit
class ViewController:…

Karen
- 169
- 1
- 16