This is probobly really simple, and i'm probobly missing something right infront of me, but I can't seem to figure out how to save the image within a canvas to a bitmap/pixmap.
Any help on this is appreciated.
Any help on this is appreciated.
SuperStrict Local MyWindow:TGadget=CreateWindow("Canvas Example", 200,200,320,240) Local MyCanvas:TGadget=CreateCanvas(10,10,290,140,MyWindow) Local mypixmap:TPixmap Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_GADGETPAINT SetGraphics CanvasGraphics (MyCanvas) DrawRect 20,20,50,80 mypixmap=GrabPixmap(0,0,GadgetWidth(mycanvas),GadgetHeight(mycanvas)) Flip End Select If mypixmap SavePixmapPNG(mypixmap,"test.png") Forever