Wiki Code Error on _PRINTIMAGE
#1
FYI

_printimage first code set throws a syntax error on line 24
_PRINTIMAGE - QB64 Phoenix Edition Wiki

[Image: image.png]

Changed the offending line from:
_PUTIMAGE Page&, Prev&

To:
_PUTIMAGE (0, 0), Page&, Prev&

And all good!
Reply
#2
Thanks for reporting @NasaCow,

the example has been corrected now, however only a comma is needed in front of Page& to designate the destination coordinate parameter is ommitted, which is slightly different from your solution:

_PUTIMAGE , sourceHandle&, destHandle& 'size full source to fit full destination area

_PUTIMAGE (dx1, dy1), sourceHandle&, destHandle& 'full source to top-left corner destination position

hence in your solution the Page wouldn't be scaled to fit the Preview, but it would simply put the Page in the top/left corner of the Preview, clipping areas of the Page, if it's larger than the Preview, which is probably not what you want for a print preview Big Grin
Reply
#3
(11-29-2022, 02:40 PM)RhoSigma Wrote: Thanks for reporting @NasaCow,

the example has been corrected now, however only a comma is needed in front of Page& to designate the destination coordinate parameter is ommitted, which is slightly different from your solution:

_PUTIMAGE , sourceHandle&, destHandle& 'size full source to fit full destination area

_PUTIMAGE (dx1, dy1), sourceHandle&, destHandle& 'full source to top-left corner destination position

hence in your solution the Page wouldn't be scaled to fit the Preview, but it would simply put the Page in the top/left corner of the Preview, clipping areas of the Page, if it's larger than the Preview, which is probably not what you want for a print preview Big Grin

There's always a catch when learning (didn't realize that option!) At least I got to understand it a bit better. Glad to give back  Big Grin
Reply
#4
I am confused the Title of Thread is _PrintImage and yet we are talking about _PutImage?

Typo in Title? Thing is we were just talking about _PrintImage for printer so possibly someone confused _PutImage with _PrintImage?

And for the record _PrintImage only takes an ImageHandle&, ie one argument.

It's true, _PutImage comes in very handy getting ready to _PrintImage Smile
b = b + ...
Reply
#5
(11-29-2022, 03:46 PM)bplus Wrote: I am confused the Title of Thread is _PrintImage and yet we are talking about _PutImage?

Typo in Title? Thing is we were just talking about _PrintImage for printer so possibly someone confused _PutImage with _PrintImage?

And for the record _PrintImage only takes an ImageHandle&, ie one argument.

It's true, _PutImage comes in very handy getting ready to _PrintImage Smile

Follow the link:  _PRINTIMAGE - QB64 Phoenix Edition Wiki

The glitch was in the wiki page for _PRINTIMAGE, but the glitch itself happened to be in a line which contained _PUTIMAGE on it.  

_PRINTIMAGE -- the wiki page with the glitch.
_PUTIMAGE -- the line on that page that was glitchy.  

And that's the breadcrumbs that led to the title and the post being as they are.  Big Grin
Reply
#6
Ah! thanks
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)