Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Copy Bitmap Command

Author
Message
Silver Surfer57
19
Years of Service
User Offline
Joined: 27th Feb 2006
Location:
Posted: 27th Feb 2006 19:52
Although I teach introdutory programming, I'm new to DarkBASIC. I'm confused on the parameters for the COPY BITMAP 10 parameter command. What parts of the bitmap does Left, Top, Right, Bottom correlate to? I know it's X/Y coordinates, but an example I was looking at in Jonathan Harbour's book was confusing (the example he used was: Copy Bitmap 1,2,5,6,7,0,2,5,6,7).

Can some give me a detailed explanation?

Thanks!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Feb 2006 22:07 Edited at: 27th Feb 2006 22:10
The example that you have quoted is a bit odd. It is from bitmat 1 to bitmap 0 using tiny little pixels.


Copy Bitmap....From Bitmap,Left,Top,Right,Bottom,TO BITMAP,left,top,right,bottom

Doesn't really need any explaining.... it's

X,Y top to X,Y bottom

Silver Surfer57
19
Years of Service
User Offline
Joined: 27th Feb 2006
Location:
Posted: 28th Feb 2006 01:59
I know it's odd, but that was the example in Jonathan Harbour's book. In the example, the bitmap he was copying from was an 8x8 grid with a smilie. The resulting bitmap was a portion of the smile without the eyes.

I understand it now. You just make a "box" from the 2, 5 and the 6,7 coordinates and that's what's copied over. Makes perfect sense, but it wasn't explained in the book.

Thanks!

Login to post a reply

Server time is: 2025-05-23 09:23:12
Your offset time is: 2025-05-23 09:23:12