1999-07-10 12:21:03 +02:00
|
|
|
/*
|
|
|
|
* PostScript driver BitBlt, StretchBlt and PatBlt
|
|
|
|
*
|
|
|
|
* Copyright 1999 Huw D M Davies
|
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-07-10 12:21:03 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "psdrv.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-07-10 12:21:03 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
|
1999-07-10 12:21:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
*
|
|
|
|
* PSDRV_PatBlt
|
|
|
|
*/
|
2011-07-13 14:56:12 +02:00
|
|
|
BOOL PSDRV_PatBlt(PHYSDEV dev, struct bitblt_coords *dst, DWORD dwRop)
|
1999-07-10 12:21:03 +02:00
|
|
|
{
|
|
|
|
switch(dwRop) {
|
|
|
|
case PATCOPY:
|
2011-07-07 13:29:17 +02:00
|
|
|
PSDRV_SetClip(dev);
|
|
|
|
PSDRV_WriteGSave(dev);
|
2011-07-11 13:59:05 +02:00
|
|
|
PSDRV_WriteRectangle(dev, dst->visrect.left, dst->visrect.top,
|
|
|
|
dst->visrect.right - dst->visrect.left,
|
|
|
|
dst->visrect.bottom - dst->visrect.top );
|
2011-07-07 13:29:17 +02:00
|
|
|
PSDRV_Brush(dev, FALSE);
|
|
|
|
PSDRV_WriteGRestore(dev);
|
|
|
|
PSDRV_ResetClip(dev);
|
1999-07-10 12:21:03 +02:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case BLACKNESS:
|
|
|
|
case WHITENESS:
|
|
|
|
{
|
|
|
|
PSCOLOR pscol;
|
|
|
|
|
2011-07-07 13:29:17 +02:00
|
|
|
PSDRV_SetClip(dev);
|
|
|
|
PSDRV_WriteGSave(dev);
|
2011-07-11 13:59:05 +02:00
|
|
|
PSDRV_WriteRectangle(dev, dst->visrect.left, dst->visrect.top,
|
|
|
|
dst->visrect.right - dst->visrect.left,
|
|
|
|
dst->visrect.bottom - dst->visrect.top );
|
2011-07-07 13:29:17 +02:00
|
|
|
PSDRV_CreateColor( dev, &pscol, (dwRop == BLACKNESS) ? RGB(0,0,0) : RGB(0xff,0xff,0xff) );
|
|
|
|
PSDRV_WriteSetColor(dev, &pscol);
|
|
|
|
PSDRV_WriteFill(dev);
|
|
|
|
PSDRV_WriteGRestore(dev);
|
|
|
|
PSDRV_ResetClip(dev);
|
1999-07-10 12:21:03 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
default:
|
2011-07-11 13:59:05 +02:00
|
|
|
FIXME("Unsupported rop %06x\n", dwRop);
|
1999-07-10 12:21:03 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|