Windows bitmaps...
- Posted by JesusC <jconsuegra at yahoo.com> Apr 04, 2002
- 364 views
Could any brave graphics soul tell me what I'm doing wrong?. I'm trying just to draw a tiny bitmap onto the screen... ---8<----------------- -- draw a bitmap in a window include win32lib.ew constant MyWin = create(Window,"BitMap Testing", 0, 10, 10, 300, 320, -- x, y, cx, cy 0), -- Pixmap, creates an offscreen pixmap BaseBMP = create(Pixmap,"", 0, 0, 0, 300, 320, 0) -- load the bitmap procedure start_up() setPixmap (BaseBMP, loadBitmapFromFile( "bitmap.bmp" )) -- copy a 40x40 portion of source image to destination bitBlt( MyWin, -- copy to MyWin 0, 0, -- put at {0,0} in MyWin BaseBMP, -- copy from BaseBMP 0, 0, -- upper left hand corner is {0,0} 40, 40, -- copy a 40x40 pixel portion SrcCopy ) -- replace destination with image end procedure onOpen[MyWin] = routine_id( "start_up" ) WinMain( MyWin, Normal ) ---8<------------------------------- Thanks, Jesus.