Questions tagged [graphicspath]

96 questions
18
votes
4 answers

.Net Opposite of GraphicsPath.Widen()

I need the opposite of the GraphicsPath.Widen() method in .Net: public GraphicsPath Widen() The Widen() method does not accept a negative parameter, so I need the equivalent of an Inset method: public GraphicsPath Inset() You can do this in the…
Flipster
  • 4,373
  • 4
  • 28
  • 36
14
votes
4 answers

Converting SVG path data into GDI+ GraphicsPath data

Is there an easy way to convert an SVG path tag into a C# System.Drawing.Drawing2D.GraphicsPath? They are both closely related and I was hoping there would be an easy to convert the SVG path data into GraphicsPath Points.
Icemanind
  • 47,519
  • 50
  • 171
  • 296
14
votes
1 answer

Path.reset vs Path.rewind

In android what is the difference between path.reset() and path.rewind() ? The docs say that public void reset () Clear any lines and curves from the path, making it empty. This does NOT change the fill-type setting. public void rewind…
Gautam
  • 7,868
  • 12
  • 64
  • 105
7
votes
3 answers

Creating a GraphicsPath from a semi-transparent bitmap

I want to create a GraphicsPath and a list of Points to form the outline of the non-transparent area of a bitmap. If needed, I can guarantee that each image has only one solid collection of nontransparent pixels. So for example, I should be able…
Trevor Elliott
  • 11,292
  • 11
  • 63
  • 102
6
votes
2 answers

Region.IsVisible(PointF) has very slow performance for large floating point values

I have run into a strange performance issue, and it would be great with an explanation to the behavior I'm experiencing. I'm using System.Drawing.Region.IsVisible(PointF) to determine if a point is inside a polygon. This usually works very well,…
larsjr
  • 665
  • 7
  • 17
6
votes
1 answer

Is there an equivalent of soft pen in GDI+?

I need to draw a soft wide outline for my GDI+ GraphicsPath. Something like this: A path edge is shown in red. I'd like to use a wide pen which is smooth. I also need an ability to control smoothness of the pen. I tried to use a gradient brush with…
Lev
  • 730
  • 12
  • 32
5
votes
1 answer

Flip the GraphicsPath that draws the text/string

I have this method in my Text Class and I can't seem to flip the whole text. I am using a Matrix to transform the GraphicsPath which is used to draw the string. Here's the code since I used @Jimi's answer: public LayerClass…
TerribleDog
  • 1,237
  • 1
  • 8
  • 31
5
votes
3 answers

C# Draw Circle with GraphicsPath of which part is cut out

I'm trying draw something like following shapes with 3 parameters radius center cutOutLen the cut out part is bottom of the circle. I figured out that I can use var path = new GraphicsPath(); path.AddEllipse(new RectangleF(center.X - radius,…
Joonhwan
  • 495
  • 5
  • 11
4
votes
3 answers

GraphicsPath.IsClockWise() Extension Method

I need to create an extension method for a GraphicsPath object that determines if the GraphicsPath is wound clockwise or counter-clockwise. Something like this: public static bool IsClockwise(GraphicsPath gp) { bool bClockWise =…
Flipster
  • 4,373
  • 4
  • 28
  • 36
4
votes
4 answers

GraphicsPath and DrawPath - Removing Intersecting Lines

The following code draws a cross: using (SolidBrush brush = new SolidBrush(Color.FromArgb(192, 99, 104, 113))) { using(GraphicsPath path = new GraphicsPath()) { path.AddRectangle(new Rectangle(e.ClipRectangle.X +…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
4
votes
0 answers

Split a UIBezierPath into 2 parts

Is possible to split a path in 2 distinct paths?! I'm trying to implement a rubber that erase partially a path, and was wandering if there's an elegant way to do this. Otherwise i'll simply use the same color of the background...
diningphil
  • 416
  • 5
  • 18
4
votes
2 answers

how can I simplify a graphicspath?

I'm creating a rather dense GraphicsPath by following the MouseMove event. Besides filtering during the movement, is there a routine to simplify the GraphicsPath after the fact? I also want to implement a 'vector-based flood fill' now and this will…
TaW
  • 53,122
  • 8
  • 69
  • 111
4
votes
4 answers

Oddly drawn GraphicsPath with Graphics.FillPath

I have written some code which creates a rounded rectangle GraphicsPath, based on a custom structure, BorderRadius (which allows me to define the top left, top right, bottom left and bottom right radius of the rectangle), and the initial Rectangle…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
3
votes
2 answers

Envelope Distortion with .Net Graphicspath

I'm trying to figure out the best way to accomplish warping a GraphicsPath in .net to a specific shape. The result I'm trying to achieve is warping text to curve up, down, fan left, right, and things like a wave. All of these can be achieved in…
Particleman
  • 661
  • 2
  • 7
  • 19
3
votes
2 answers

Edit points of FreeShape - reduce path

I'm having some GUI letting a user draw costimized GraphicsPath. I've created it using the GraphicsPath AddLine function. Now I want to implement what you can see in the attached Microsoft Word image - "Edit Points". I'm facing several…
ephraim
  • 379
  • 1
  • 3
  • 15
1
2 3 4 5 6 7