SetBackgroundImage Macro Command

Q&A for Visual Basic, Visual Basic .NET, and PowerBasic developers using DPlot
Post Reply
dkabq
Posts: 5
Joined: Mon Nov 20, 2017 4:32 pm

SetBackgroundImage Macro Command

Post 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.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
dkabq
Posts: 5
Joined: Mon Nov 20, 2017 4:32 pm

Post by dkabq »

Doh!!!

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