HowTo:BackgroundImg
From S2PLOT
It is simple to run an existing S2PLOT program over the top of a background image. This behaviour is completely controlled by runtime environment variables, so no modification to program code is required.
You will need a background image in TGA format. You can use the ImageMagick "convert" utility to write a TGA file from almost any bitmap format file.
Prior to running your S2PLOT program, simply set the following environment variables:
variable | meaning | sample value |
---|---|---|
S2PLOT_BGIMG | filename of background TGA image | "universe.tga" |
S2PLOT_X1 | X coord of bottom left corner for S2PLOT graphics | 0.2 |
S2PLOT_Y1 | Y coord of bottom left corner for S2PLOT graphics | 0.1 |
S2PLOT_X2 | X coord of top right corner for S2PLOT graphics | 0.7 |
S2PLOT_Y2 | Y coord of top right corner for S2PLOT graphics | 0.9 |