Thank you Antonio,
I tried to run the example file you sent, it returns this error message
"plot_cd.lua:21: attempt to index local 'cv' (a userdata value)stack traceback:
plot_cd.lua:21: in function <plot_cd.lua:19>
[C]: in function 'showxy'
plot_cd.lua:36: in main chunk
[C]: at 0x00402000"
Le mercredi 30 mai 2018 à 23:11:08 UTC+2, Antonio Scuri
<antonio.sc...@gmail.com> a écrit :
For instance:
function plot:predraw_cb(canvas) canvas:Foreground(cd.EncodeColor(0, 0, 255))
canvas:Rect(200, 700, 200, 700) -- pixels canvas:Line(200, 700, 700, 200) --
pixels
local x1, y1 = iup.PlotTransform(plot, 1, 0.9) -- plot coordinates local x2,
y2 = iup.PlotTransform(plot, 1, 0.1) canvas:Line(x1, y1, x1, y2) -- pixelsend
Attached is the complete sample.
Best,Scuri
2018-05-29 11:53 GMT-03:00 Johann Philippe <johannphili...@yahoo.fr>:
Yes in Lua.
Le lundi 28 mai 2018 à 23:09:53 UTC+2, Antonio Scuri
<antonio.sc...@gmail.com> a écrit :
You mean in Lua, right?
Best,Scuri
Em seg, 28 de mai de 2018 17:11, Johann Philippe <johannphili...@yahoo.fr>
escreveu:
Thank you Antonio.
I don't find the way to draw manually using CD inside the plot (created with
iupplot). The plot.CANVAS returns that the actual canvas name is "CD" (as a
string), but the CD variable returns nil.
Could you explain how to draw in background, using postdraw_cb and CD drawing
method ?
Le lundi 28 mai 2018 à 13:11:58 UTC+2, Antonio Scuri
<antonio.sc...@gmail.com> a écrit :
> I need to interact with the callback with only one of those two datasets. Is
>that possible ?
Only manually testing inside the callback.
> Or is there a way to draw in the "background"
You can use the PREDRAW_CB, POSTDRAW_CB callbacks, but everything must be
manually drawn with CD.
Best,Scuri
2018-05-27 13:18 GMT-03:00 Johann Philippe via Iup-users
<iup-users@lists.sourceforge. net>:
Dear all,
I'm using IupPlot, and having a small issue here. I have two datasets, and i
wish one of them could be not responding to FindSample function. I need to
interact with the callback with only one of those two datasets. Is that
possible ?
Or is there a way to draw in the "background" of the plot, like drawing a curve
that is not interacting with callbacks, but can be change algorithmically ?
Thanking you in advance
Johann
------------------------------ ------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
______________________________ _________________
Iup-users mailing list
Iup-users@lists.sourceforge. net
https://lists.sourceforge.net/ lists/listinfo/iup-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users