2010-01-25 05:09 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbwin/win_tprn.prg
* contrib/hbwin/win_bmp.c
! Fixes to prev (in last minute modifications)
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-25 05:09 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbwin/win_tprn.prg
|
||||
* contrib/hbwin/win_bmp.c
|
||||
! Fixes to prev (in last minute modifications)
|
||||
|
||||
2010-01-25 05:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbwin/Makefile
|
||||
* contrib/hbwin/hbwin.hbc
|
||||
|
||||
@@ -133,7 +133,7 @@ HB_FUNC( WIN_LOADBITMAPFILE )
|
||||
#define CHECKPNGFORMAT 4120
|
||||
#endif
|
||||
|
||||
static int hbwin_BitmapIsSupported( HDC hDC, int iType, const void * pImgBuf, HB_SIZE nSize, int * piErrCode )
|
||||
static int hbwin_BitmapIsSupported( HDC hDC, int iType, const void * pImgBuf, HB_SIZE nSize )
|
||||
{
|
||||
if( hDC &&
|
||||
iType != HB_WIN_BITMAP_UNKNOWN &&
|
||||
@@ -187,7 +187,7 @@ HB_FUNC( WIN_DRAWBITMAP )
|
||||
/* TOFIX: No check is done on 2nd parameter which is a large security hole
|
||||
and may cause GPF in simple error cases.
|
||||
[vszakats] */
|
||||
if( hbwin_BitmapIsSupported( hDC, iType, pbmfh, nSize, NULL ) == 0 )
|
||||
if( hbwin_BitmapIsSupported( hDC, iType, pbmfh, nSize ) == 0 )
|
||||
{
|
||||
int iWidth = hb_parni( 7 );
|
||||
int iHeight = hb_parni( 8 );
|
||||
@@ -494,7 +494,6 @@ HB_FUNC( WIN_BITMAPDIMENSIONS )
|
||||
else if( iType == HB_WIN_BITMAP_PNG )
|
||||
{
|
||||
bRetVal = ( hb_png_get_param( ( const HB_BYTE * ) buffer, nSize, &iHeight, &iWidth, NULL, NULL ) == _PNG_RET_OK );
|
||||
hb_storni( err, 4 );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -780,7 +780,7 @@ CREATE CLASS WIN_BMP
|
||||
METHOD Create()
|
||||
METHOD Destroy()
|
||||
METHOD Draw( oPrn, aRectangle, aDimXY )
|
||||
METHOD IsSupported( oPrn, nErrCode )
|
||||
METHOD IsSupported( oPrn )
|
||||
|
||||
VAR Type INIT 0 // Type BitMap: 1 == BM, 2 == JPEG, 3 == PNG
|
||||
VAR DimXY INIT { 0, 0 } // Image Dimensions X Y pixels
|
||||
@@ -828,7 +828,7 @@ METHOD Draw( oPrn, aRectangle, aDimXY ) CLASS WIN_BMP // Pass a WIN_PRN object r
|
||||
ENDIF
|
||||
RETURN oPrn:DrawBitMap( Self )
|
||||
|
||||
METHOD IsSupported( oPrn, nErrCode ) CLASS WIN_BMP
|
||||
METHOD IsSupported( oPrn ) CLASS WIN_BMP
|
||||
RETURN win_BitmapIsSupported( oPrn:hPrinterDc, ::Bitmap ) == 0
|
||||
|
||||
#ifdef HB_COMPAT_XPP
|
||||
|
||||
Reference in New Issue
Block a user