c# - GraphicsPath - Why does order of AddLine methods matter -


I am portraying the triangle with the following code

  int x = x center Coordination for; Int Q = x coordinate for left; Int bx = x coordinate for the right; Int top = y coordinate for top; Bottom bottom = y coordinate; // (x, above) // (ax, floor) (bx, bottom) graphics path path = new graphics path (); // _ path. Extra line (ax, bottom, bx, bottom); // path.AddLine (ax, bottom, x, above); // \ path.AddLine (bx, bottom, x, top); // Range of drawing _ / \ (bottom line, left side, right side)  

When I call the drophead, it always pulls my lines, it does not matter Order but when I call Philipppath, it does nothing, only when my order is / _ \ or \ _ / my triangle actually fills it why it is?

It has been found that the answer I originally posted to does not really solve the problem It has been done because of an additional change on my machine, which I have started, which is FillMode :

  graphics path path = new graphics path (filamoda. Wading);  

When you use the rotate mode, the algorithm will detect a closed path, even if you did not add lines to the order.


Comments