The replacement for IupPPlot is IupPlot. Is much more flexible are richer.
If instead of using an IupCanvas you use IupPlot, then things get a
little simpler, but not as flexible.
You should take a look at the IupPlot documentation first to check if it
fits your needs. In this case it already has a pick implemented when you
click near a sample of a dataset.
About pick, that really depends on your data structure. But there is no
interpolation, just tests usually like x1 > x < x2. This is how
Matlab/IupPlot actually does that.
Best,
Scuri
On Wed, Jan 21, 2015 at 3:19 PM, <[email protected]> wrote:
> Ai António, you are scaring me.
>
>
> 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.
>>
>
> I was somehow expecting a thing like this (saw wht you did with the linked
> lists in cdtest.c)
>
> 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.
>>
>
> That's the horrible part. Do you mean that if for example I draw two
> diagonal lines in a square canvas and than click exactly on the midle, I'll
> have to interpolate to all pixels of my screen between the two vertex of
> each line and see if my cliked point falls in the neighborhood of those
> interpolated lines (and pick the one at the top?). And now multiply this to
> all vertex of all possible polylines existing in my drawing?
> But such kind of things must have been solved many times before?
>
> I was expecting that the image in the IupPPlot example (attached) was done
> with some kind of point-click editing.
>
>
> 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.
>>
>
> Don't tell me. For some years I've been searching for a replacement to
> Matlab ... and within my reach. I'm stuck to 32 bits and by no means want
> to embrace the modern Matlab with all that OOP shit. IUP seamed an
> excellent candidate but this is trully scary.
>
> Cumprimentos
>
> Joaquim
>
> P.S. you can play with Mirone stand-alone version. No need for Matlab.
>
>
>
>> 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
>>>
>>>
>>>
>>
>
>
> ----------------------------------------------------------------
> 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