Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Question on Drawing over an Image
Author | Message | ||||
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 379 |
I have some puzzling behavior going on in a program I am writing, and I am hoping somebody can help. If I do this simple thing: Mode 1,12 Load PNG "blah.png" line 0, 0, 799, 599,, RGB(RED) everything works as I expect; that is, the image is shown and then the red line is drawn on top of the image. (I am using 12-bit color because I will eventually want to draw translucent stuff on top of the image.) However, if I do this instead: Mode 1,12 page write 1 load PNG "blah.png" page write 0 page copy 1 to 0, B line 0, 0, 799, 599,, RGB(RED) The line does NOT appear on top of the image! (My actual code is more complicated but this is the essence.) There must be something magic about the page copy but I can't imagine what it is. -Bill |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1081 |
The line is on top of the image on page 0. However, page 1 is on top of page 0. Edited 2021-04-09 08:06 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5867 |
From my help pages (which came from Peter): Mode 1,12 page write 0 load PNG "blah.png" page write 1 line 0, 0, 799, 599,, RGB(RED) do:loop until inkey$ <> "" Jim VK7JH MMedit MMBasic Help |
||||
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 379 |
Thanks! I always thought pages 1 and 2 were totally offscreen. That explains a lot! -Bill |
||||
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 379 |
It works great, once I changed which page was which. Thanks much, vegipete and TassyJim, you guys certainly deserve your Guru labels! -Bill |
||||
Print this page |