TGImageMap Drawing

Is it possible to use drawing primatives such as line, or arrow on a TGImageMap? If so, how do you do it?

Also, can one overlay one ImageMap on another?

Regards
Chris

Hi Chris,
to draw line, there are two ways:

  1. overload TGImapMap::DoRedraw method
  2. if you do not want subclassing, recompiling
    you can connect
    my_image_map->ProcessedEvent signal to
    some global function or function defined in macro
    which will do redrawing on “event->fType == kExpose”

In both cases use
TVirtulaX::DrawLine method to draw line on the pixmap
taken from my_image_map->GetPicture()->GetPicture()

  1. to overlay picture …
    do 1, 2 and use TVirtualX::CopyArea

Regards. Valeriy

++
sorry, probably it is not informative …
just try to do it by yourself I’ll give more help if needed later on

Actually, This has been very valuable help. I’m making progress. Thank you.
Chris

Hi Chris,
at the moment I’m working on Gui builder.
In this context it would be good to have “editor for imageMap”.
If you will have some code for drawing over image map,
please, let me know.

Thanks. Regards. Valeriy