#ifndef __CREATESAMPLEIMAGE__ #define __CREATESAMPLEIMAGE__ ' create sample image Function CreateSsampleImage(ByVal scr_w As Integer, ByVal scr_h As Integer) As Any Ptr Const BLACK = Rgb(&H00,&H00,&H00) Const DRAWCOLOR = Rgb(&H10,&H10,&H10) Dim p As Any Ptr = ImageCreate(scr_w, scr_h, BLACK) Cls 'DRAW THE SCREEN IMAGE Line (0, SCR_H \ 3) - (SCR_w -1, SCR_h \ 3), DRAWCOLOR 'divide screen into 1/3rds Line (0, (SCR_H \ 3) * 2) - (SCR_w - 1, (SCR_h \ 3) * 2), DRAWCOLOR 'divide screen into 1/3rds Paint(1, 1), Rgb(&H20,&H20,&H70), DRAWCOLOR 'color for 1/3 screen area Paint(1, (SCR_h \ 6) * 3), Rgb(&H20,&H70,&H20), DRAWCOLOR 'color for 1/3 screen area Paint(1, (SCR_h \ 6) * 5), Rgb(&H70,&H30,&H30), DRAWCOLOR 'color for 1/3 screen area Circle (80, 50), 12, Rgb(&HA0,&HC0,&H10),,,,f 'sun Line (SCR_w \ 6 + 400, SCR_h \5 ) - (SCR_w \ 6 + 550, SCR_h \ 5 +SCR_h \ 6 ), Rgb(&HA0,&HA0,&HA0),BF 'house Line (SCR_w \ 6 + 400, SCR_h \5 ) - (SCR_w \ 6 + 550, SCR_h \ 5 +SCR_h \ 16), Rgb(&HA0,&H00,&H00),BF 'roof Line (SCR_w \ 6 + 500, SCR_h \5 + 50) - (SCR_w \ 6 + 525, SCR_h \ 5 +95), Rgb(&H50,&H50,&HA0),BF 'door Line (SCR_w \ 6 + 425, SCR_h \5 + 50) - (SCR_w \ 6 + 475, SCR_h \ 5 +80), Rgb(&H90,&H90,&HF0),BF 'window Line (0, (SCR_h \ 3) * 2 - 100) - (SCR_w - 1, (SCR_h \ 3) * 2 ), Rgb(&H00,&H40,&H10),BF 'hedge Line (0, (SCR_h \ 3) * 2 - 100) - (SCR_w - 1, (SCR_h \ 3) * 2 - 85), Rgb(&H40,&H80,&H40),BF 'hedge top Line (0, (SCR_h \ 3) * 2 + 100) - (SCR_w - 1, (SCR_h \ 3) * 3 ), Rgb(&H80,&H80,&H80),BF 'top of wall Line (0, (SCR_h \ 3) * 2 + 135) - (SCR_w - 1, (SCR_h \ 3) * 3 ), Rgb(&H60,&H60,&H60),BF 'front of wall Get (0, 0) - (scr_w - 1, scr_h - 1), p 'Copy the image bsave "testimage.bmp", p Return p End Function #endif