giant-canvas problem
BlitzPlus Forums/BlitzPlus Programming/giant-canvas problem
| ||
The purpose is to make something that loads one concert-ticket (1240x877), tiles them, puts a unique number on each ticket.. (using text x,y,t$ or some whatever what routine..) In the end I wish to create a new image on which I place all the images and texts, and then use SaveImage (and save that one in photoshop) ... ... it's foolproof :) However, on some computer here in the house, the canvas looks messed-up with random memory junk orso.. on my own machine the mess is gone, but drawing is fubar'ed .. I see only ~ 40% of the picture.. The other PC has the same OS, the same amount of mem, and is even a bit faster.. I can't even get at those coordinates, since the text (can you see it? :P) @ 2000x3000 isn't shown. Is there .. uh .. a maximum canvas size? Or is displaying a resized canvas a no-succes situation anyway? app=CreateWindow("o_O",0,0,440,630,0,1) canv=CreateCanvas (8,8,1240*2,877*4,app) SetGadgetShape canv,8,8,GadgetWidth(canv)/6,GadgetHeight(canv)/6 im=CreateImage(1240,877) ; draw one (1) giant cross SetBuffer ImageBuffer(im) Color 255,255,255 For k=0 To 3 Line k,0,1240+k,877 Line 1240-k,0,3-k,877 Next SetBuffer DesktopBuffer() SetBuffer CanvasBuffer(canv) If im TileBlock im,0,0 Text 200,300,"BLAHBLAHBLAH" Text 2000,3000,"BLAHBLAHBLAH" FlipCanvas canv Repeat WaitEvent() If EventID()=$803 quit=True Until quit End |
| ||
I would try using a different driver (opengl or system) as it might be that the default directx driver has some issues with images larger than the backbuffer. The docs are wrong but I think the example should explain: http://www.blitzbasic.com/bpdocs/command.php?name=SetGfxDriver&ref=2d_a-z |
| ||
hm.. gfx driver 2 (opengl) seems to work .. great! tnx |
| ||
uh no.. it doesn't work o_O 1 native 2 opengl 3 directdraw 1 and 3 bug, and using 2 can't create a canvas without getting this legend here: 'attempt to release <unknown> object' That is, I can create a canvas, and drawing seems to work.. but when the program halts I get this error.. yet better, if for some naive reason I use 'setbuffer desktopbufer()' then I get a crash (this program has performed an illegal operation and will be shut down) .. and I can only restart my system to work on it again .. (98se) So, somehow I fear I can't do this program at all..! |
| ||
very strange, it seems to manage a really big power of 2 size for the canvas ok, so more investigation required... if you want some more torture and haven't already done so you may also want to play with the image flags with createimage app=CreateWindow("o_O",0,0,440,630,0,1) canv=CreateCanvas (0,0,4096,4096,app) SetGadgetShape canv,8,8,400,400 im=CreateImage(1240,877) ; draw one (1) giant cross SetBuffer ImageBuffer(im) Color 255,255,255 For k=0 To 3 Line k,0,1240+k,877 Line 1240-k,0,3-k,877 Next SetBuffer DesktopBuffer() SetBuffer CanvasBuffer(canv) If im TileBlock im,0,0 Text 200,300,"BLAHBLAHBLAH" Text 3200,3000,"BLAHBLAHBLAH" FlipCanvas canv Repeat WaitEvent() If EventID()=$803 quit=True Until quit End |