Drawing 'complex' shapes

Help
iwbnwif
2013-08-06
2013-08-08
  • iwbnwif

    iwbnwif - 2013-08-06

    I would like to draw mildly complex shapes such as electronic AND and OR gate, ie. http://en.wikipedia.org/wiki/Logic_gate#Symbols

    Is the correct way to do this to override wxSFPolygonShape::DrawPolygonShape?

    Many thanks....

     
  • Michal Bližňák

    For such complex shapes I recommend to derive new shape from basic rectangle shape, override its virtual drawing routines to draw the image "manually" and specify custom connection points placed to required positions (see wxSFDemo sample which illustrates how to create custom connection points in rectangle).

     
  • iwbnwif

    iwbnwif - 2013-08-08

    Thanks for the reply, especially for the pointer how to add custom connection points.

    At the moment I went with deriving from wxSFPolygonShape because I make use of the GetTranslatedVertices method to handle moving and scaling.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks