Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DAY 009:_PutImage
#46
(08-28-2023, 01:33 AM)bplus Wrote: i -1 was about the letter indexes for the string. I am sure to keep the fist point drawn at x you have to subtract 1 from i to make a zero offset from x otherwise you will be a whole column right of where you need that first draw point.

Quote:
  • L16 - The reason we use 
    -1
     in 
    COLS * scale% -1
     and 
    ROWS * scale% - 1
     is because in the first iteration of the loop with 
    i%
     being 1, if we did not subtract one, it would offset them, and so the passed in desired positions would be actually offset for the first character.
Copy / paste above has odd format above, 

Anyway, honestly maybe the -1's might not be necessary. Mathologically sometimes you need a -1 and sometimes you don't. A screen with 0,0 top, left corner has bottom right corner at _width -1, _Height -1
If x, y is top, left corner add width, height for bottom right or add width -1, height -1?
Best way to tell is try both. I just tried with the -1's and didn't see any problems.
I think our letter boxes would overlap without the -1's. That is if we outlined the space each letter resides in as boxes, the boxes would overlap without the -1's, whereas the boxes would neatly abut one another with the -1's.

Aha! @grymmjack this proves the -1's do neatly place the box spaces next to each other without overlap.
https://qb64phoenix.com/forum/showthread...6#pid19096
I fixed my own "Font Print" sub by adding -1's to the Step when drawing the pixelated boxes that form a letter.
Notice how you can see each pixel individually specially at the bottom b+ with 5x5 font.
b = b + ...
Reply


Messages In This Thread
DAY 009:_PutImage - by bplus - 11-15-2022, 12:00 AM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 12:23 AM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 12:32 AM
RE: DAY 009:_PutImage - by PhilOfPerth - 11-15-2022, 01:25 AM
RE: DAY 009:_PutImage - by mnrvovrfc - 11-15-2022, 12:38 AM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 01:09 AM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 01:22 AM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 01:49 AM
RE: DAY 009:_PutImage - by PhilOfPerth - 11-15-2022, 01:58 AM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 02:19 AM
RE: DAY 009:_PutImage - by SMcNeill - 11-15-2022, 02:33 AM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 03:18 AM
RE: DAY 009:_PutImage - by Pete - 11-15-2022, 03:25 AM
RE: DAY 009:_PutImage - by grymmjack - 08-27-2023, 10:32 PM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 04:20 AM
RE: DAY 009:_PutImage - by SMcNeill - 11-15-2022, 11:23 AM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 04:32 PM
RE: DAY 009:_PutImage - by madscijr - 11-15-2022, 03:54 PM
RE: DAY 009:_PutImage - by SMcNeill - 11-15-2022, 04:37 PM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 04:43 PM
RE: DAY 009:_PutImage - by Pete - 11-15-2022, 04:43 PM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 04:52 PM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 07:19 PM
RE: DAY 009:_PutImage - by SMcNeill - 11-15-2022, 07:33 PM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 08:20 PM
RE: DAY 009:_PutImage - by james2464 - 11-15-2022, 08:49 PM
RE: DAY 009:_PutImage - by bplus - 11-15-2022, 11:22 PM
RE: DAY 009:_PutImage - by SMcNeill - 11-15-2022, 11:46 PM
RE: DAY 009:_PutImage - by james2464 - 11-16-2022, 12:10 AM
RE: DAY 009:_PutImage - by SMcNeill - 11-16-2022, 01:00 AM
RE: DAY 009:_PutImage - by james2464 - 11-16-2022, 01:27 AM
RE: DAY 009:_PutImage - by james2464 - 11-16-2022, 03:48 AM
RE: DAY 009:_PutImage - by SMcNeill - 11-16-2022, 03:55 AM
RE: DAY 009:_PutImage - by james2464 - 11-16-2022, 04:01 AM
RE: DAY 009:_PutImage - by bplus - 11-16-2022, 05:21 AM
RE: DAY 009:_PutImage - by SMcNeill - 11-16-2022, 04:07 AM
RE: DAY 009:_PutImage - by james2464 - 11-16-2022, 04:38 AM
RE: DAY 009:_PutImage - by grymmjack - 08-27-2023, 09:58 PM
RE: DAY 009:_PutImage - by bplus - 08-27-2023, 11:16 PM
RE: DAY 009:_PutImage - by grymmjack - 08-27-2023, 11:51 PM
RE: DAY 009:_PutImage - by grymmjack - 08-28-2023, 12:14 AM
RE: DAY 009:_PutImage - by a740g - 08-28-2023, 07:49 AM
RE: DAY 009:_PutImage - by grymmjack - 08-28-2023, 11:32 AM
RE: DAY 009:_PutImage - by grymmjack - 08-28-2023, 11:51 AM
RE: DAY 009:_PutImage - by bplus - 08-28-2023, 01:33 AM
RE: DAY 009:_PutImage - by bplus - 08-29-2023, 03:21 PM
RE: DAY 009:_PutImage - by grymmjack - 08-29-2023, 10:41 PM



Users browsing this thread: 5 Guest(s)