ThinkGeo.com    |     Documentation    |     Premium Support

Custom linecap

I've been doing some prototyping with TrackMode.Freehand to allow the user to do some drawing; the resulting lines are copied from the EditLayer to a DynamicLayer for applying ValueStyles.  We want the resulting line to be an arrow.  By setting the LineStyle.DrawingLineCap to AnchorArrow I can get an arrowhead, but at some thinner line widths the arrowhead is too small to be seen.  I see the "Custom" linecap, which suggests I can build my own, but a search of the web site and forums returned no useful matches.  Does anybody have any info on how to do this?


Thanks,


Allen



Allen, 
  
 Here’s a post talking about how to create a custom LineStyle, and also provides a demo, please have a look. 
 gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5284/afv/topic/Default.aspx 
  
 Please let me know if you still have any questions. 
  
 Thanks, 
 ThinkGeo Support 


Allen, 
  
   The link Lee sent has our own implementation of an arrow.  If you have question about it or want a variation just let us know and we can help you out.  Doing the arrow like in the posted link gives you allot more flexibility over the custom line cap property.  Truth be told the Custom option in the enumeration list was probably copied from GDI+.  We used many of their concepts but created out own drawing system not to be dependent on them as we draw to Pdfs, Wpf, Kml etc.  I am pretty sure it works the same way the the GDI+ version does on a Pen class.  You may be able to check this this out on the web and get more hits.  I suggest that you go with a custom solution like in the article, make sure to scroll down to near the end for the code.  It will be much more flexible. 
  
 David