Thanks,
I managed to make it work in a stripped down version of the pplot example.
But now I don't want to plot it in a Tab, I just want a simple plot with
an image. I understand that the solution must be in what is used to
generate the IupDialog() bellow, but everything else that I try just
brings an empty figure.
This is so painful by trial and error. I guess that I simply don't
understand what a dialog (the return of IupDialog(...)) is and the
importance of its input argument.
Joaquim
IupControlsOpen(); # init the addicional controls library (we use IupTabs)
IupPlotOpen(); # init IupPlot library
# create plots
plot[1] = IupPlot()
# right panel: tabs with plots
vboxr[1] = IupVbox(plot[1]); # each plot a tab
s = @sprintf("Plot %d", 1)
IupSetAttribute(vboxr[1], "TABTITLE", s); # name each tab
vboxr[2] = C_NULL # mark end of vector
tabs = IupTabsv(pointer(vboxr)) # create tabs
# dialog
hbox = IupHbox(tabs);
IupSetAttribute(hbox, "MARGIN", "4x4");
IupSetAttribute(hbox, "GAP", "10");
dlg = IupDialog(hbox);
IupSetAttributes(dlg, "SIZE=500x240" );
IupSetAttribute(dlg, "TITLE", "IupPlot Example");
InitPlots(); # It must be able to be done independent of dialog Mapping
IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
IupSetAttribute(dlg, "SIZE", C_NULL);
IupMainLoop()
IupClose()
Hi,
No, only IupImage is accepted as an image handle in a control. So
instead of using imFileImageLoadBitmap, use IupLoadImage. It will >use
imFileImageLoadBitmap internally and it will return an IupImage Ihandle*
so you can use it in IupSetAttributeHandle.
Best,
Scuri
On Wed, May 20, 2015 at 11:24 AM, Joaquim Luis <jl...@ualg.pt> wrote:
Hi,
How can I plot an image in an axes with coordinates?
I tried with IupPlot and attribute "BACKIMAGE", as in (in Julia)
error = pointer([0])
image = imFileImageLoadBitmap("V://Capture.PNG", 0, error)
IupSetAttributeHandle(plot[1], "BACKIMAGE", convert(Ptr{Void},
image));
but get crashes from the C side saying
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ffdca48afd2 -- iupTableGet
at
C:\programs\compa_libs\iup\iup.DLL (unknown line)
iupTableGet at C:\programs\compa_libs\iup\iup.DLL (unknown line)
cdIupDrawImage at C:\programs\compa_libs\iup\iupcd.dll (unknown line)
...
Thanks
Joaquim
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users