Page 1 of 1

SetBackgroundImage Macro Command

Posted: Mon Nov 20, 2017 5:06 pm
by dkabq
When I execute the following macro command

ret = DPlot_Command(DocNum, "[SetBackgroundImage(""d:\dplot_files\image.png"", 1, 1, 1, 255)]")

the image is not placed in the foreground. I know that Dplot is using the command, as the plot extents are being adjusted to fit the image size.

Also, if I open the Dplot file I can get the image (which is listed Filename box) to be in the foreground by checking the "foreground" box.

Thanks in advance for the help.

Posted: Mon Nov 20, 2017 5:34 pm
by DPlotAdmin
Use
[SetBackgroundImage(""filename"",1,1,0,0,0,0,1,255)]

If you're going to set the foreground or transparency, then left, top, right, bottom must be specified even though in this case they will not be used.

Posted: Tue Nov 21, 2017 9:34 am
by dkabq
Doh!!!

Thanks for kindly pointing out what should have been obvious to me.