I'm trying to print an image using the Printer.PaintPicture method but I can't get it to work the way the documentation describes.
I'm allowing the user to define a margin around the page (held in the Margin(x) array in the order Top, Left, Bottom, Right) and if I draw a box to the Printer using this code it draws it perfectly with a 1.3cm margin around all sides:
However if I use the same approach with PaintPicture I get the Top and Left margins ok but the image stretches right to the bottom-right corner of the page instead of to the same area as the box in the code above.
My understanding of PaintPicture's width1 and height1 parameters are that the image will be resized to these dimensions if values are passed, but that doesn't seem to happen. Any clues?
- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
I'm allowing the user to define a margin around the page (held in the Margin(x) array in the order Top, Left, Bottom, Right) and if I draw a box to the Printer using this code it draws it perfectly with a 1.3cm margin around all sides:
Code:
Printer.Line (Margin(2), Margin(1))-(Printer.Width - Margin(4) - Margin(2), Printer.Height - Margin(3) - Margin(1)), 0, B
However if I use the same approach with PaintPicture I get the Top and Left margins ok but the image stretches right to the bottom-right corner of the page instead of to the same area as the box in the code above.
Code:
Printer.PaintPicture .pic_Pic(0).Image, Margin(2), Margin(1), Printer.Width - Margin(4) - Margin(2), Printer.Height - Margin(3) - Margin(1)
My understanding of PaintPicture's width1 and height1 parameters are that the image will be resized to these dimensions if values are passed, but that doesn't seem to happen. Any clues?
- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments