768 ! |
768 ! |
769 |
769 |
770 printImage: anImage |
770 printImage: anImage |
771 "Opens a print dialog and prints the given image" |
771 "Opens a print dialog and prints the given image" |
772 |
772 |
|
773 self printImage: anImage magnification:1. |
|
774 |
|
775 " |
|
776 WinPrinterContext printImage: (Image fromFile:'C:\vsw311\pavheadr.gif'). |
|
777 WinPrinterContext printImage: XPToolbarIconLibrary help32x32Icon. |
|
778 WinPrinterContext printImage: XPToolbarIconLibrary eraseXP28x28Icon. |
|
779 WinPrinterContext printImage: XPToolbarIconLibrary saveImageBlack22x22Icon. |
|
780 WinPrinterContext printImage: XPToolbarIconLibrary changesBrowser18x22Icon. |
|
781 " |
|
782 |
|
783 "Created: / 07-08-2006 / 11:46:52 / fm" |
|
784 "Modified: / 16-04-2007 / 15:37:34 / cg" |
|
785 ! |
|
786 |
|
787 printImage:anImage magnification:factor |
|
788 "Opens a print dialog and prints the given image" |
|
789 |
773 | printerInfo printer | |
790 | printerInfo printer | |
774 |
791 |
775 printerInfo := PrintingDialog getPrinterInfo. |
792 printerInfo := PrintingDialog getPrinterInfo. |
776 printerInfo isNil ifTrue:[^self]. |
793 printerInfo isNil ifTrue:[^self]. |
777 |
794 |
778 printer := self fromPrinterInfo: printerInfo. |
795 printer := self fromPrinterInfo: printerInfo. |
779 [ |
796 [ |
780 printer startPrintJob: 'Image'. |
797 printer startPrintJob: 'Image'. |
781 printer background:Color white. |
798 printer background:Color white. |
782 anImage displayOn:printer x:1000 y:1000. |
799 (anImage magnifiedBy:factor) displayOn:printer x:0 y:0. |
783 printer endPrintJob. |
800 printer endPrintJob. |
784 ] forkAt: 3 |
801 ] forkAt: 3 |
785 |
802 |
786 " |
803 " |
787 WinPrinterContext printImage: (Image fromFile:'C:\vsw311\pavheadr.gif'). |
804 WinPrinterContext printImage: (Image fromFile:'C:\vsw311\pavheadr.gif'). |