I try to fill some area with color or Gradient one by one, but still can not figure it out what exactly those functions of wxGraphicspath do.....
Right now I just create a lot of paths to do it
(wxGraphicsPath path = gc->CreatePath();
wxGraphicsPath path2 = gc->CreatePath();
wxGraphicsPath path3 = gc->CreatePath();...... )
what excatly CloseSubpath () do???
I read the document and I confused(I try the example,and it seem like that CloseSubpath () do nothing?? )
And Could someone tell is there a good tutorial or example to learn about wxGraphicscontext or wxDC......those things is confused but useful......
sorry for my english
what does CloseSubpath () do? Topic is solved
Re: what does CloseSubpath () do?
A wxGraphicsPath can contain multiple subpaths. E.g. you could draw 2 individual triangles with lines. But you don't want a line be drawn from the end of the last point of the first triangle to the first point of the seconds triangle. Calling CloseSubpath after the first triangle would solve this.
Looking at your code, i don't think CloseSubpath() is relevant to your issue.
Looking at your code, i don't think CloseSubpath() is relevant to your issue.
Use the source, Luke!
Re: what does CloseSubpath () do?
Thanks for your explaining!!!
yes,it probably be not really relevant to my issue.....I just tried some triangles,and found that CloseSbupath() is working like "MoveToPoint(0.0,0.0)"......
and I try to do some FillPath(),it seem like that I have to make a new path to do that??????
without a new path: with a new path: Could I achieve the same result like the second one without creating a new path?
It seem like that wxCraphicspath will do some "boolean job" in a same path......
yes,it probably be not really relevant to my issue.....I just tried some triangles,and found that CloseSbupath() is working like "MoveToPoint(0.0,0.0)"......
and I try to do some FillPath(),it seem like that I have to make a new path to do that??????
without a new path: with a new path: Could I achieve the same result like the second one without creating a new path?
It seem like that wxCraphicspath will do some "boolean job" in a same path......
Re: what does CloseSubpath () do?
I don't think you can use different brushes in the same path. The brush is valid for the whole path when calling FillPath.
In your first version you're drawing the path two times. First after you added the first triangle, and a second time after adding the second triangle.
In your first version you're drawing the path two times. First after you added the first triangle, and a second time after adding the second triangle.
Use the source, Luke!
Re: what does CloseSubpath () do?
i think I got it