Printing in LiveCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Printing in LiveCode
Hey guys, complete beginner here,
I am attempting to have a way for the user to select a certain image that will be displayed on one card, then it will put it into another image field on a different card, and have the option to print the image from there. I tried at "put image into..." but it wouldn't work. Also, I have been searching online for a way to print the image but I haven't found anything that works yet.
Thanks so much!
Clanton
I am attempting to have a way for the user to select a certain image that will be displayed on one card, then it will put it into another image field on a different card, and have the option to print the image from there. I tried at "put image into..." but it wouldn't work. Also, I have been searching online for a way to print the image but I haven't found anything that works yet.
Thanks so much!
Clanton
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Printing in LiveCode
I just tried this (LC 8.1.3, Mac OS):
set the imageData of img "PicBOX" to the imageData of img id 1003
but got a very odd result indeed:
Not really what you want . . . sorry.
set the imageData of img "PicBOX" to the imageData of img id 1003
but got a very odd result indeed:
Not really what you want . . . sorry.
Re: Printing in LiveCode
Hi Richmond,
setting the imagedata of one image to another one REQUIRES to have both images the same dimension (height and width)!
Best
Klaus
setting the imagedata of one image to another one REQUIRES to have both images the same dimension (height and width)!
Best
Klaus
Re: Printing in LiveCode
Hi Clandon,
1. welcome to the forum!
2.
Let the user select an image file?
"Putting" that user selected image into another image object?
Printing the "other" card with the image?
All of the three?
Best
Klaus
1. welcome to the forum!

2.
what exactly do you have problems with?cbeethjr wrote:I am attempting to have a way for the user to select a certain image that will be displayed on one card, then it will put it into another image field on a different card, and have the option to print the image from there. I tried at "put image into..." but it wouldn't work. Also, I have been searching online for a way to print the image but I haven't found anything that works yet.
Let the user select an image file?
"Putting" that user selected image into another image object?
Printing the "other" card with the image?
All of the three?
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Printing in LiveCode
Frankly I'd just use a graphic object and do this sort of thing:
set the backGroundPattern of graphic "picFRAME" to the id of image "SugataMitra" and be done with it:
set the backGroundPattern of graphic "picFRAME" to the id of image "SugataMitra" and be done with it:
Last edited by richmond62 on Mon Mar 20, 2017 8:45 pm, edited 1 time in total.
Re: Printing in LiveCode
Which also requires that the the image and graphic object have identical dimensions to preventrichmond62 wrote:Frankly I'd just use a graphic object and do this sort of thing:
set the backGroundPattern of graphic "picFRAME" to the id of image "SugataMitra"...
the display of the "tiles" that setting a backgroundpattern will produce.

-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Printing in LiveCode
That's true, but one can resize the graphic either before or after the backGroundPattern is set and the image is OK,Which also requires that the the image and graphic object have identical dimensions
while setting imageData doesn't seem to work that way.
All this done with LC 8.1.3 on Mac OS 10.7.5: your mileage may vary

Re: Printing in LiveCode
I have never said the oppositerichmond62 wrote:That's true, but one can resize the graphic either before or after the backGroundPattern is set and the image is OK,
while setting imageData doesn't seem to work that way.

-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Printing in LiveCode
Sorry, no capisce!?
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Printing in LiveCode
German preciseness.
Last edited by richmond62 on Mon Mar 20, 2017 10:37 pm, edited 1 time in total.
Re: Printing in LiveCode
Sure, but I mean the image itself and the "at 4%"! 

-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Printing in LiveCode
The 4% is the strength of the beer.
My older son who stays in Munchen and prides himself on his Bayerische
can keep everyone quiet for at least 60 minutes with rude comments about Becks.
All I was doing was trying to find a picture, Klaus, that mentioned German Precision.
My older son who stays in Munchen and prides himself on his Bayerische
can keep everyone quiet for at least 60 minutes with rude comments about Becks.
All I was doing was trying to find a picture, Klaus, that mentioned German Precision.
Re: Printing in LiveCode
Ah, OK, get it now!
But I did not recognize anything in the picture but the text!
But I did not recognize anything in the picture but the text!

Re: Printing in LiveCode
German aside, what the OP wants is:
The quickest way to print is to use "print this card" but that isn't usually what you want. Most of the time you'd want to add the pixel dimensions as parameters. See the dictionary "print card" entry. You might want to use this syntax:
Code: Select all
set the text of img x of cd 2 to the text of img y of cd 1
Code: Select all
print card [from topLeft to rightBottom]
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com