Questions tagged [pathgeometry]

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.

126 questions
1
vote
1 answer

Building a PathGeometry from list of points without tons of other class creation

I am trying to build a simple polygonal PathGeometry from a custom list of points. I found the following code on the msdn website, and it appears to work fine, with a simple modification to loop and add LineSegments, but it seems like an awful…
fexam
  • 15
  • 4
1
vote
0 answers

Custom Shape for Clip in Windows Phone 8

I'm trying to make a clip mask with a custom shape in Windows Phone 8. I have the path data for the shape, so I can set
user3734728
  • 131
  • 5
1
vote
1 answer

How to get Stream/PathGeometry that's outline of geometry 'widened' with Pen stroke in WPF?

This is quite hard for me to explain so I'll use an image as example: I have defined a StreamGeometry (in code). When it is drawn with DrawingContext.DrawGeometry using both Brush to fill and Pen to stroke, the geometry is 'widened' by the Pen…
Riva
  • 637
  • 6
  • 14
1
vote
2 answers

Using WPF Path Data in ASP.NET

Is there any way to re-use Path data created in the mini-language for use with the WPF Path element in ASP.NET? Or is the Path mini-language exclusive to WPF? I have a Win8 app that has a number of path geometry strings in the format "M10,110 L30,90…
Jim Marquardt
  • 3,959
  • 1
  • 12
  • 21
1
vote
1 answer

Converting Path & StrokeWidth to Geometry

I have a bit of code that takes a number of Points and creates multiple LineSegments to build up a Path. System.Windows.Shapes.Path pathSegment = new System.Windows.Shapes.Path(); PathFigure pathFig = new PathFigure(); PathGeometry pathGeo = new…
MikeyTT
  • 222
  • 3
  • 11
1
vote
0 answers

Using a DrawingBrush with a PathGeometry as an OpacityMask does not work as intended

I'm trying to get a path to act as the OpacityMask for another path in order to draw just the outline. I've gotten two paths to overlap correctly, but when I create a GeometryDrawing from the PathGeometry, it produces some odd results that I can't…
TomSlick
  • 717
  • 5
  • 21
1
vote
1 answer

WPF Path shape data binding: she don't update

I'm attempting to bind the Data field on a WPF path object. I've tried two different approaches, but neither approach triggers an updated drawing. Plan 1:
Brannon
  • 5,324
  • 4
  • 35
  • 83
1
vote
2 answers

Show Radius of Ellipse - WPF

I have an ellipse geometry. I want to show the radius of the ellipse by a line drawn from the center to the edge of the circle using C#. How can I achieve this? Note: The center of the ellipse and the radius are not fixed and are defined by the…
Sangeetha
  • 485
  • 2
  • 9
  • 24
1
vote
2 answers

moving a spinning 3D object across the screen, making it face the correct way when it stops

The best example of what I am trying to achieve is on this youtube video http://www.youtube.com/watch?v=53Tk-oGL2Uo The letters that make up the word 'Atari' fly in from the edges of the screen spinning and then line up to make the word at the…
Piku
  • 3,526
  • 6
  • 35
  • 38
1
vote
1 answer

Extract numbers from String

I have to parse a String to create a PathSegmentCollection. The string is composed of numbers separated by comas and/or (any) whitespaces (like newline, tab, etc...), also the numbers can be written using scientific notation. This is an example:…
gliderkite
  • 8,828
  • 6
  • 44
  • 80
0
votes
1 answer

Retrieving path segments from ID2D1PathGeometry

I'm currently trying to write a little game engine in C# using SlimDX just for fun. I want my world to be destructable, so I have to be able to modify my map. My map is currently vector based, represented by an ID2D1PathGeometry (PathGeometry in…
Emiswelt
  • 3,909
  • 1
  • 38
  • 56
0
votes
1 answer

How to get Point.X at a Point.Y on a FlattenPathGeometry - WPF

I have a "FlattenedPathGeometry" and I want to be able to get a specific point.X from the path based on a specific Point.Y Basically I just need the X value at any given Y. Thanks in advance for any help.
Chris Nicol
  • 10,256
  • 7
  • 39
  • 49
0
votes
5 answers

Speed up PathGeometry.Combine (c#.net)?

I've got two geometrical data sets to match, both containing tens of thousands PathGeometries. To be exact I need to find areas which overlap from one set to the other, so I got a loop like foreach (var p1 in firstGeometries) { foreach (var p2 in…
Sam
  • 28,421
  • 49
  • 167
  • 247
0
votes
1 answer

How to connect two points with a tube in threejs?

Using Threejs, I want to create a tube between two points that have x, y, z coordinates. I don't want to rely on some equation to generate points for a fancy curve. This documentation confuses me. I have scoured the Web for examples; no luck. I have…
Scott Pendleton
  • 1,021
  • 3
  • 16
  • 32
0
votes
1 answer

Edit progress bar shape wpf

I have a progress bar whose ControlTemplate is as follows and I want to set the value of the progress bar to a number so the progress updates to that value. I refered to the accpeted answer on this post but don't know how to use the converter for my…
nikhil
  • 1,578
  • 3
  • 23
  • 52
1 2 3
8 9