Last post Dec 07, 2009 04:41 AM by pettrer
Dec 04, 2009 10:09 AM|pettrer|LINK
I'm just digging into graphics, and it's a lot of fun! Right now I'm trying to create polygons, and it works just fine. My problem is that I need some of the edges to be "miter" (what kind of a word is that anyway?) and some of them to be smooth.
To achieve this, I created a two-dimensional array, where the inner arrays held the x and y coordinates and also the letter M or R (as in round). Then I tried to draw each of the line by itself, instead of doing a polygon:
'Line join type for this particular angle
String = arr(0)(2)
If jt =
myPen.LineJoin = Drawing2D.LineJoin.Miter
ElseIf jt =
myPen.LineJoin = Drawing2D.LineJoin.Round
but it didn't really work out for me (and logically it won't that way, because how could the line know where to connect to the next line...). So, is there a property I am missing, or what should I do?
(In case my question is unclear: Take a box, with three square corners and one rounded corner. That's what I'm trying to achieve.)
Thanks a lot in advance for any help! PS. Right now I'm using winforms and not Asp.Net, but I guess the properties etc are the same regardless of platform. And I do VB.Net, BTW.
/Pettrer, in chilly Sweden
Dec 04, 2009 10:42 AM|G0ggy|LINK
Mitre, I believe comes from mitre joint, old woodworking terminology, anyway have a look at this:
Dec 07, 2009 04:41 AM|pettrer|LINK
Thanks for the link!
It's funny, the day after I posted my question I watched the nice little movie called From Hell (starring Johnny Depp). I belive the mitres/miters were mentioned about twenty times, and a murder even took place at Mitre Square!