Hi,

  Lines drawn in a canvas are rendered according to the canvas. For
instance, drawing in any screen by any application is always a raster
operation. Drawing in a Metafile is a vector operation. This is independent
on the library you are using, CD, Cairo, OpenGL, Matlab, etc.

  The entity in Matlab is something not related to the drawing itself. So
it is something that your application will have to store somehow, so later
you will be able to do a pick operation. Matlab simplifies a lot the
process of creating an application. In a regular toolkit your will need a
data structure where your maps and data sets are stored. The in IUP the
button_cb callback will be called when the user click with the mouse in the
IupCanvas, then you will need to translate the screen coordinates in map
coordinates, then search in your database for an entity that is nearest to
that coordinate, that is called "pick" in computer graphics applications.
Then you will be able to show a context menu that reflects the entities at
that coordinate.

  All this, it is not part of any manual, but usually part of a Computer
Graphics programming book.

  I don't have Matlab installed here any more but I saw that you did a lot
of work on your application. To implement that without Matlab it will take
a lot more work, but it will be very interesting.

Best,
Scuri



On Wed, Jan 21, 2015 at 2:11 PM, <[email protected]> wrote:

> Hi again,
>
> OK, I can draw lines with cdCanvasLine() but I doubt assaulted me. The
> lines I see on the screen are raster or vectorial?
>
> I will be needing to associate callbacks to certain actions that
> should only be displayed when a user clicks on a line (or a point, or
> polygon, or ...). In Matlab one do that by associating a line property
> called UIContextMenu that in its turn let us declare callback
> functions for different tasks.
> In or this to work, the lines must be vectorial entities that one can
> select with a mouse click, hence my first question
>
> How can we do that with IUP?
>
> For an an example to what I want to do see for example this screeshot
>
> http://w3.ualg.pt/~jluis/mirone/images/datasets.jpg
>
> Thanks and excuse if the answer is in some part of the manuals that I
> didn't find yet.
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to