Hi,
I think there is a misunderstanding about the vbox terminator. When you
pass a list of controls for a box you end that list with a null, for
instance vbox(but1, but2, null).
This is not what you are doing. First, if you don't want a tabs, remove
it from your test. Make it simpler. You also don't need an array of plots,
you will use just one. Eliminate that too.
Then we start from there.
And send me the full Julia file so I can also see what you are doing in
InitPlot.
Best,
Scuri
Em 22/05/2015 16:55, "Joaquim Luis" <[email protected]> escreveu:
> 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 <[email protected]> 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
>> [email protected]
>> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users