Drawing a Line

Help
2008-04-23
2013-04-08
  • Daniel Pomrehn

    Daniel Pomrehn - 2008-04-23

    Hello,

    I'd like to draw a simple line with this framework.
    Can somebody tell me, how to do that?

    wxSFLineShape* pShape = (wxSFLineShape*)GetDiagramManager()->AddShape(CLASSINFO(wxSFLineShape), event.GetPosition(), sfDONT_SAVE_STATE);

    isn't enough, I think

    Thank you in advance

    Daniel

     
    • Michal Bližňák

      Hi,
      in current (1.5.x) library version you cannot create a standalone line. The line shape must be always used as a connection between two shapes (even between two existing line shapes). If you wish to create new connection line use wxSFDiagramManager::CreateConnection(...) or wxSFShapeCanvas::StartInteractiveConnection(...) functions.

      Regards
      Michal

       
    • Don Radick

      Don Radick - 2009-01-04

      The CreateLine methods need a shape ID.

      I can't seem to find a pshape->GetID(); method.

      -Don

       
    • Don Radick

      Don Radick - 2009-01-04

      The CreateLine methods need a shape ID.

      I can't seem to find a pshape->GetID(); method.

      -Don

       
    • Michal Bližňák

      Function GetId() ( not GetID() !!! ) is member of xsSerializable class which is a base of wxSFShapeBase class, so you can call it as follows:

      pshape->GetId();

      Michal

       
    • Don Radick

      Don Radick - 2009-01-04

      Thanks Michal -

      I never would have found that!
      I was looking in ShapeBase, BitMapShape, Canvas, etc.

      Regards,
      -Don

       

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

Sign up for the SourceForge newsletter:





No, thanks