I would like to label selected objects in the %pl graphics region with their corresponding most important property.
The plot looks like this:
I coded and added a function which identifies the starting and ending point of each line segment, computes length for each line segment, computes total length and displays this complex info in an info window as demonstrated above.
From this plot, however, cannot be seen where is located segment1,2, ...
Now, I would like to draw this 'new' points (start and end points for each line segment) again to the plot with a point symbol and a different color (these - in this case 40 - points are - in fact - already in the plot, but are invisible, since they are part of red lines).
So, I could append this 'new' array to an existing one with %pl [stacked] option and then draw them this time as points with different symbol and color within an existing code for %pl:
iw=winio@('%`^pl[full_mouse_input]&',gw,gh,n_pl,Y_OK_U,X_OK_U,handle_pl_ok,pl_cb)
where to the arrays Y_OK_U, X_OK_U would be added the new one and also N_PL would be added by +1.
Then, I would also add a check/uncheck box (to see it or not).
However, I would like to try a new approach (if it is even possible) by using the function DRAW_POINT@, where I would use the GET_PLOT_POINT@ for the new array to get their pixel coordinates and draw them (the pixels) in different color.
At the end, I would like to draw above/below each segment its ID (1,2,...) along with (maybe) its corresponding length.
But, I do not know, whether such approach is even possible and whether it is possible to tell the function DRAW_POINT@ where to draw the points.
Q: HANDLE_PL_OK graphics region should be selected first using SELECT_GRAPHICS_REGION@? or should it be created a new graphics region, then drawing would occur in it and then to copy this region back to the required one (handle_pl_OK) using copy mode 8913094? And - if such approach would function, should it be placed within %pl callback or within %pl plot function itself?
Is there also a function like DRAW_POINT@, where would it be possible to tell it which graphical symbol should be used for point to be drawn or this functionality is exclusively available only among %PL options?
I am looking for the quickest and as simple as possible way how to achieve it (probably, the STACKED option will win, nevertheless - if there is possible another approach, I would like to exetend my knowledge).
Thanks to everybody in advance for some ideas/comments!
Martin






