Author Topic: Just a ridiculous code sample: PUT (graphics statement)  (Read 2875 times)

0 Members and 1 Guest are viewing this topic.

Offline CharlieJV

  • Newbie
  • Posts: 89
    • View Profile
Just a ridiculous code sample: PUT (graphics statement)
« on: February 15, 2022, 09:03:02 pm »
I was just playing around to firm up in my head the results of the various "color action" options.

Silly code to share, but I figured what the heck:

Code: QB64: [Select]
  1. dim array(1000) as integer
  2. print "HOWDY"
  3. get (0,0)-(50, 12), array()
  4. for x = 0 to 100 step 4
  5.     _delay 0.125
  6.     put (10 + x,30 + x), array(), pset
  7.     put (100 + x,30 + x), array(), preset
  8.     put (190 + x,30 + x), array(), and
  9.     put (280 + x,30 + x), array(), or
  10.     put (370 + x,30 + x), array(), xor
  11. locate 13,1
  12. print "  pset", "preset", "and", "or", "xor"
  13.  


Offline CharlieJV

  • Newbie
  • Posts: 89
    • View Profile
Re: Just a ridiculous code sample: PUT (graphics statement)
« Reply #1 on: February 15, 2022, 11:54:04 pm »
Some more "exploratory" code to experience those color actions with actual color.

Code: QB64: [Select]
  1. dim array(10000) as integer
  2. line (0,0)-(640,0), 10
  3. line (0,1)-(640,1), 10
  4. line (0,3)-(640,3), 11
  5. line (0,4)-(640,4), 11
  6. line (0,6)-(640,6), 12
  7. line (0,7)-(640,7), 12
  8. line (0,9)-(640,9), 13
  9. line (0,10)-(640,10), 13
  10. line (0,12)-(640,12), 14
  11. line (0,13)-(640,13), 14
  12. line (0,15)-(640,15), 15
  13. line (0,16)-(640,16), 15
  14. get (0,0)-(639,16), array
  15. locate 4,1
  16. print "PSET, PRESET, AND, OR, XOR"
  17. circle (320, 240), 150, 14
  18. paint (320, 240), 14
  19. put (0, 150), array, PSET
  20. put (0, 180), array, PRESET
  21. put (0, 210), array, AND
  22. put (0, 240), array, OR
  23. put (0, 270), array, XOR
  24.  
  25.  

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Just a ridiculous code sample: PUT (graphics statement)
« Reply #2 on: February 16, 2022, 08:01:54 am »
Pretty cool,  reminds me of something similar Steve did with PUTIMAGE https://qb64forum.alephc.xyz/index.php?topic=4591.0