Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
from png tile, create symmetrical screen image
#8
Quote:Dammit menn, this is a programmers forum, not a quilting circle!!!!

Don't you know QB stands for Quilting Bee!
Code: (Select All)
_Title "PutImage Demo 7" ' b+ 2025-08-21
' modify demo 5 by tiling screen with an image and 3 rotations

Screen _NewImage(800, 600, 32) ' screen width, height, 32 is _RGBA colors
_Delay .2
Logo& = _LoadImage("qb64.png")

scale = 1 ' we are going to magnify the image by .755 and preserve the ratio of width to height
scaleW = scale * _Width(Logo&) '
scaleH = scale * _Height(Logo&)

' make an image Tile by
' put image, the actual size, into the middle of our screen

' then flip image mirror on x and y axis
_PutImage (_Width / 2, _Height / 2 - scaleH)-Step(scaleW, scaleH), Logo&, 0
_PutImage (_Width / 2, _Height / 2 - scaleH)-Step(-scaleW, scaleH), Logo&, 0
_PutImage (_Width / 2, _Height / 2 + scaleH)-Step(scaleW, -scaleH), Logo&, 0
_PutImage (_Width / 2, _Height / 2 + scaleH)-Step(-scaleW, -scaleH), Logo&, 0

myTile& = _NewImage(2 * scaleW, 2 * scaleH)
_PutImage (0, 0), 0, myTile&, (_Width / 2 - scaleW, _Height / 2 - scaleH)-Step(2 * scaleW, 2 * scaleH)
Cls
_PutImage (0, 0), myTile&, 0 ' check tile  'OK
For y = 0 To 600 Step 100
    For x = 0 To 800 Step 100
        _PutImage (x, y)-Step(100, 100), myTile&, 0
    Next
Next
Sleep

   

qb64.png
   
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: from png tile, create symmetrical screen image - by bplus - 08-21-2025, 08:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  error doing image collision detection with _MemGet madscijr 55 4,660 10-01-2025, 03:25 PM
Last Post: bplus
  need help printing a scaled string in a custom font to a 32-bit image madscijr 9 1,148 07-03-2025, 04:48 PM
Last Post: SMcNeill
  Trying to create a simple menu CMR 8 1,196 06-18-2025, 06:59 PM
Last Post: CookieOscar
  Erasing (or making a section of an image transparent) based on a mask from image #2? madscijr 17 2,403 04-14-2025, 09:19 PM
Last Post: madscijr
  program that stitches together a bunch of image files into one giant poster? madscijr 15 2,297 10-24-2024, 06:08 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)