Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about Hardware Images and _DisplayOrder,Help!
#2
Do
    Line (0, 0)-(799, 599), Peach, BF

    _PutImage (10, 10), sImgW
    _PutImage (10, 110), sImgB
    _Display
Loop Until InKey$ = Chr$(27)

Notice what I've highlighted here and you'll see the problem.  

The line statement is basically putting a solid color over the entire screen. layer.
You're then putting your images over the hardware layer.

Thing of these as two different sheets of glass.   Normally when layering sheets of glass, you'd use TRANSPARENT glass.  

Think along the lines of a piece of glass ten inches by ten inches in size, with a logo etched all nice and colorful on it that's three inches by three inches.

Now, think think of a second piece of glass that is solid PEACH color and layer those sheets of glass.

If your Peach sheet of glass is on the bottom, and the transparent piece with the logo is on top, all is fine.  When you look at that layered masterpiece, you'd see the peach background and then the logo would be visible over it.

But flip that order around.  Lay the transparent glass with the logo on the bottom and then put that solid peach sheet on top of it.  You can't see through that solid sheet of peach color and thus that logo is invisible and hidden completely.

That's what you've got going on here.   I don't know enough about SVG files to decipher the images you're making this early in the morning, so I don't know if they're full alpha images or not (solid colors with no background for layering), but the LINE statement *IS* creating a solid peach background image.   If it's on the bottom and the hardware images laid on top of it, then you should be able to see those hardware images.  But if it's on the top and the hardware images below it, you're not going to see anything.

And note that with your RED square, it's still on the SOFTWARE layer.  It's basically part of the peach background, like some kid stuck a nice red sticker to that layer of solid peach colored glass.  If you put that solid logo over it, like in the case of the black hardware image here, then you're not going to see it.

It's all a case of 100% alpha and solid colors working with those layers.  I seems like what you're looking for is something with three layers to it, and in that case you'd probably want that red box to be the THIRD layer.

redbox = _NEWIMAGE(boxWide, boxTall, 32) 'make a screen the size of that red box that you want
CLS ,RED, redbox 'color it red
redboxHW = _COPYIMAGE(redbox, 33) 'make a hardware version of that red box
_FREEIMAGE redbox 'free the software version as you're not going to use it for anything else.

LINE (....), PEACH 'put the peach background down
_PUTIMAGE (....), hardImage 'put your hardware image over it
_PUTIMAGE (....), redboxHW, 1 'put the red box on the second hardware image and lay it over the first.


All of these are solid alpha colors and non-transparent.  Layering is absolute and matters completely.  You can't just draw on your same software layer and then expect it to be BOTH below and above your hardware layer.  If you're looking for that effect, you need THREE layers.

_DISPLAYORDER Software, _Hardware, _Hardware1

Software on the bottom, the hardware circle on top of it, the redbox on top of that.

Drawing the redbox on the same screen as the peach background just isn't going to cut it.  You have two layers and since both are solid, whichever is on top is going to cover the other.  Either the peach background with a red box will cover the black circles, or the black circles will cover the peach background with the red box.  It's impossible to layer that black circle between the peach and red when they're both on the same sheet of glass.  You need three layers for this to work properly and you only have two.
Reply


Messages In This Thread
RE: about Hardware Images and _DisplayOrder,Help! - by SMcNeill - 02-10-2026, 01:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Nth problem with hardware images Ikerkaz 9 507 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 478 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 747 09-22-2025, 11:12 PM
Last Post: TempodiBasic
  Transparency with Hardware Images NakedApe 8 1,040 07-10-2025, 09:47 AM
Last Post: Pete
  How does QB64 support saving 8bit images? CMR 4 798 04-27-2025, 04:46 PM
Last Post: CMR

Forum Jump:


Users browsing this thread: 1 Guest(s)