QB64 Phoenix Edition
Wiki Code Error on _PRINTIMAGE - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16)
+--- Forum: QB64 Phoenix Edition Wiki and Repo (https://staging.qb64phoenix.com/forumdisplay.php?fid=41)
+---- Forum: Wiki Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=25)
+---- Thread: Wiki Code Error on _PRINTIMAGE (/showthread.php?tid=1203)



Wiki Code Error on _PRINTIMAGE - NasaCow - 11-29-2022

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!


RE: Wiki Code Error on _PRINTIMAGE - RhoSigma - 11-29-2022

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


RE: Wiki Code Error on _PRINTIMAGE - NasaCow - 11-29-2022

(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


RE: Wiki Code Error on _PRINTIMAGE - bplus - 11-29-2022

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


RE: Wiki Code Error on _PRINTIMAGE - SMcNeill - 11-29-2022

(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


RE: Wiki Code Error on _PRINTIMAGE - bplus - 11-29-2022

Ah! thanks