Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A faster way to scale images?
#12
I think the biggest issue you guys are having is in thinking of hardware images as being some sort of normal image.  The reason why you don't have to specify which handle to put them on is because they only have one place where they can go -- the hardware layer.

Our hardware layer is completely independent of any of our software layers.  Think of it as being on a separate piece of paper completely.  You draw on your software page, and then -- depending on your displayorder -- either lay that software page on top of the hardware page, or else lay the hardware page on top of the software page.  Two distinct pages, and what you do to one has absolutely no effect on the other.

Try this, for a mind opening example:
Code: (Select All)
tempScreen = _NEWIMAGE(200, 200, 32) 'a temp screen to draw a circle on
_DEST tempScreen ''destination is the temp screen
FOR i = 1 TO 100 'and a filled red circle
    CIRCLE (100, 100), i, &HFFFF0000
NEXT
_DEST 0 'destination back to our default screen
CircleHW = _COPYIMAGE(tempScreen, 33) 'make a hardware screen
_FREEIMAGE tempScreen 'free that temp screen

'Now at this point, we're going to work with a TEXT-only screen.
SCREEN 0

DO
    CLS
    PRINT "This is all in SCREEN 0!"
    PRINT "  How the heck do we have GRAPHICS on SCREEN 0?!!"
    _PUTIMAGE (50, 50)-(250, 250), CircleHW
    _DISPLAY
    _LIMIT 30
LOOP UNTIL _KEYHIT


Here I make a red circle and transform it into a hardware image.  I then work with a SCREEN 0 text only screen....   and still display my graphics!!

If that doesn't showcase that the two are completely separate layers, I don't know what'll show it any better!

_DISPLAYORDER _SOFTWARE, _HARDWARE   <-- change those as needed for what's on top on what's the base.

And that's why _PUTIMAGE doesn't need any handle specified as to where to put a hardware image -- they all go to the _HARDWARE layer.
Reply


Messages In This Thread
A faster way to scale images? - by johannhowitzer - 01-31-2023, 02:14 PM
RE: A faster way to scale images? - by SMcNeill - 01-31-2023, 02:46 PM
RE: A faster way to scale images? - by SMcNeill - 02-01-2023, 02:07 PM
RE: A faster way to scale images? - by SMcNeill - 02-13-2023, 01:30 PM
RE: A faster way to scale images? - by SMcNeill - 02-15-2023, 05:27 PM
RE: A faster way to scale images? - by SMcNeill - 02-16-2023, 07:39 PM



Users browsing this thread: 3 Guest(s)