'============================================================================
'BACKGROUND.BAS
'
'This script demonstrates the following:
'	Grid a sample data file
'	Create a contour map
'	Create checkered background color
'
'												SKP 9/99 Surfer 7
'============================================================================

Sub Main
	Dim SurferApp As Object
	Set SurferApp = CreateObject("Surfer.Application")
	SurferApp.Visible = True
	
	Path=SurferApp.Path+"\Samples\"
	
	Dim Doc As Object
	Set Doc = SurferApp.Documents.Add

	SurferApp.GridData (DataFile:=path+"demogrid.dat", _
		ShowReport:=False, Algorithm:=srfKriging, OutGrid:=path+"sample.grd")

	Dim MapFrame As Object
	Set MapFrame = Doc.Shapes.AddContourMap(GridFileName:=Path+"Colorado.grd")
	
	'Changes the map background
	MapFrame.BackgroundFill.Pattern = "Diagonal Cross"
	MapFrame.BackgroundFill.BackColorRGBA.Color = srfColorRed
	MapFrame.BackgroundFill.ForeColorRGBA.Color = srfColorIceBlue
	
End Sub
