At the beginning, in the local's declaration, add gState
Change this line
Code: Select all | Expand
local image, oRect, nRet, aSize
Code: Select all | Expand
local image, oRect, nRet, aSize, gState
Code: Select all | Expand
if !Empty( cUrl )
::SetLinkToURL( oRect:aRect, cURL )
endif
HPDF_Page_DrawImage( ::hPage, image, oRect:nLeft, ::nHeight - oRect:nTop - oRect:nHeight, ;
oRect:nWidth, oRect:nHeight /* iw, ih*/)
nRet := oRect:nBottom
::Pix2Units( nil, @nRet, , , cUnits )
return nRet
Code: Select all | Expand
if !Empty( cUrl )
::SetLinkToURL( oRect:aRect, cURL )
endif
if nAlpha != nil
HPDF_Page_GSave( ::hPage )
gState := HPDF_CreateExtGState( ::hPdf )
HPDF_ExtGState_SetAlphaFill( gState, nAlpha/255 )
HPDF_Page_SetExtGState( ::hPage, gState )
endif
HPDF_Page_DrawImage( ::hPage, image, oRect:nLeft, ::nHeight - oRect:nTop - oRect:nHeight, ;
oRect:nWidth, oRect:nHeight /* iw, ih*/)
nRet := oRect:nBottom
::Pix2Units( nil, @nRet, , , cUnits )
if nAlpha != nil
HPDF_Page_GRestore( ::hPage )
endif
return nRet