I also found that you MUST use REDEFINE to get an oImage object.
Below is my code. Any suggestions?
James
- Code: Select all Expand view RUN
// Test Printing JPB image
#include "FiveWin.ch"
#include "image.ch"
//----------------------------------------------------------------------------//
function Main()
local oPrn, oImage, cFile:="fivewin.jpg"
//oImage:= TImage():new(1,1,150,150,,cFile ) // oImage is nil
//@ 0,0 image oImage file cFile // oImage is nil
//@ 0, 0 IMAGE oImage SIZE 150, 150 OF oPrn // oImage is nil
oImage:= TImage():redefine(,cFile,oPrn) // oImage is object
//msgInfo( valtype( oImage ) )
PRINT oPrn PREVIEW
oImage:oWnd:= oPrn
PAGE
//oPrn:sayBitmap( 200, 200, cFile) // works with bitmap
oPrn:SayImage( 20, 20, oImage ) // nothing shows
oPrn:say(500,200, "Text goes here.")
ENDPAGE
ENDPRINT
oImage:end()
return nil
//----------------------------------------------------------------------------//