Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #5651
| From | "Glen Townsley" <glen_nospam_!@pronamics,com.au> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Water mark in ReportPro |
| Date | 2013-08-06 05:50 +1000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ktovmr$9ho$1@speranza.aioe.org> (permalink) |
| References | <033639b1-1dd1-407f-9f89-0adc41bd963a@googlegroups.com> |
Phil,
I have up to 6 watermarks that I print on various reports. Here is the
method that prints them. Of course, the image must be designed to work as a
watermark. I find RGB values of 204, 230, 255 work well. This method is
called before the body text is printed.
Cheers
Glen Townsley
METHOD DrawWatermarks( lDemo, lEdu, lEst, lSpread, lCde, lCFlow, lPrint,
oPrinter ) CLASS ReportMaster
LOCAL nPRow AS FLOAT
LOCAL nBMPHeight AS FLOAT
LOCAL nBMPWidth AS FLOAT
LOCAL nWmks AS DWORD
LOCAL oBMP AS DIBMP
IF lDemo
++nWmks
ENDIF
IF lEdu
++nWmks
ENDIF
IF lEst
++nWmks
ENDIF
IF lSpread
++nWmks
ENDIF
IF lCde
++nWmks
ENDIF
IF lCFlow
++nWmks
ENDIF
// all watermarks are 60 pixels high so we need to start nWmks * 60 / 2
above the centre of the page
nPRow := ( oPrinter:PrintAreaLength / 2 ) + 20 - ( nWmks *
oPrinter:_xLateVLogical2UnitofMeasure( 60 ) / 2 )
IF lDemo
IF lPrint
oBMP := DIBMP{}
IF oBMP:LoadDIBFromResource( 'DEMOBMP', _GetInst() )
nBMPHeight := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Height )
nBMPWidth := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Width )
oPrinter:_DrawBmp( nPRow, ( oPrinter:PrintAreaWidth -
nBMPWidth ) / 2, oBMP, nBMPHeight, nBMPWidth, 1, 1, FALSE )
ENDIF
oBMP:Destroy()
ENDIF
nPRow += oPrinter:_xLateVLogical2UnitofMeasure( 60 )
ENDIF
IF lEdu
IF lPrint
oBMP := DIBMP{}
IF oBMP:LoadDIBFromResource( 'EDUCATIONALBMP', _GetInst() )
nBMPHeight := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Height )
nBMPWidth := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Width )
oPrinter:_DrawBmp( nPRow, ( oPrinter:PrintAreaWidth -
nBMPWidth ) / 2, oBMP, nBMPHeight, nBMPWidth, 1, 1, FALSE )
ENDIF
oBMP:Destroy()
ENDIF
nPRow += oPrinter:_xLateVLogical2UnitofMeasure( 60 )
ENDIF
IF lEst
IF lPrint
oBMP := DIBMP{}
IF oBMP:LoadDIBFromFile( WorkDir() - 'UpdateRequired.bmp' )
nBMPHeight := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Height )
nBMPWidth := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Width )
oPrinter:_DrawBmp( nPRow, ( oPrinter:PrintAreaWidth -
nBMPWidth ) / 2, oBMP, nBMPHeight, nBMPWidth, 1, 1, FALSE )
ENDIF
ENDIF
nPRow += oPrinter:_xLateVLogical2UnitofMeasure( 60 )
ENDIF
IF lSpread
IF lPrint
oBMP := DIBMP{}
IF oBMP:LoadDIBFromFile( WorkDir() - 'SpreadRequired.bmp' )
nBMPHeight := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Height )
nBMPWidth := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Width )
oPrinter:_DrawBmp( nPRow, ( oPrinter:PrintAreaWidth -
nBMPWidth ) / 2, oBMP, nBMPHeight, nBMPWidth, 1, 1, FALSE )
ENDIF
ENDIF
nPRow += oPrinter:_xLateVLogical2UnitofMeasure( 60 )
ENDIF
IF lCde
IF lPrint
oBMP := DIBMP{}
IF oBMP:LoadDIBFromFile( WorkDir() -
'CostCodeCalcRequired.bmp' )
nBMPHeight := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Height )
nBMPWidth := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Width )
oPrinter:_DrawBmp( nPRow, ( oPrinter:PrintAreaWidth -
nBMPWidth ) / 2, oBMP, nBMPHeight, nBMPWidth, 1, 1, FALSE )
ENDIF
ENDIF
nPRow += oPrinter:_xLateVLogical2UnitofMeasure( 60 )
ENDIF
IF lCFlow
IF lPrint
oBMP := DIBMP{}
IF oBMP:LoadDIBFromFile( WorkDir() -
'CashFlowCalcRequired.bmp' )
nBMPHeight := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Height )
nBMPWidth := oPrinter:_xLateVLogical2UnitofMeasure(
oBMP:Width )
oPrinter:_DrawBmp( nPRow, ( oPrinter:PrintAreaWidth -
nBMPWidth ) / 2, oBMP, nBMPHeight, nBMPWidth, 1, 1, FALSE )
ENDIF
ENDIF
nPRow += oPrinter:_xLateVLogical2UnitofMeasure( 60 )
ENDIF
RETURN NIL
"Sherlock" wrote in message
news:033639b1-1dd1-407f-9f89-0adc41bd963a@googlegroups.com...
Voer's
Using Reportpro what techniques are you using to Watermark a company logo
behind the print text of a report ??
I have printed many JPGS and LOGOS but not behind text.
ANy ideas welcome..
Phil McGuinness
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Water mark in ReportPro Sherlock <sherlock@sherlock.com.au> - 2013-08-04 19:39 -0700
Re: Water mark in ReportPro Camille Kater <katercam@pt.lu> - 2013-08-05 09:39 +0200
Re: Water mark in ReportPro Sherlock <sherlock@sherlock.com.au> - 2013-08-05 06:54 -0700
Re: Water mark in ReportPro "Glen Townsley" <glen_nospam_!@pronamics,com.au> - 2013-08-06 05:50 +1000
Re: Water mark in ReportPro Sherlock <sherlock@sherlock.com.au> - 2013-08-06 01:26 -0700
Re: Water mark in ReportPro "Glen Townsley" <glen_nospam_!@pronamics,com.au> - 2013-08-07 05:56 +1000
csiph-web