mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
- Handle indexed palettes in IntEngCreateSrcMonoXlate.
svn path=/trunk/; revision=10135
This commit is contained in:
parent
e7d21fa39e
commit
3ab4ec1f54
1 changed files with 15 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: xlate.c,v 1.41 2004/07/14 20:48:57 navaraf Exp $
|
||||
/* $Id: xlate.c,v 1.42 2004/07/15 21:14:51 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -375,6 +375,20 @@ IntEngCreateSrcMonoXlate(HPALETTE PaletteDest,
|
|||
XlateGDI->translationTable[0] = ShiftAndMask(XlateGDI, BackgroundColor);
|
||||
XlateGDI->translationTable[1] = ShiftAndMask(XlateGDI, ForegroundColor);
|
||||
|
||||
if (XlateObj->iDstType == PAL_INDEXED)
|
||||
{
|
||||
XlateGDI->translationTable[0] =
|
||||
ClosestColorMatch(XlateGDI,
|
||||
(LPPALETTEENTRY)&XlateGDI->translationTable[0],
|
||||
DestPalGDI->IndexedColors,
|
||||
DestPalGDI->NumColors);
|
||||
XlateGDI->translationTable[1] =
|
||||
ClosestColorMatch(XlateGDI,
|
||||
(LPPALETTEENTRY)&XlateGDI->translationTable[1],
|
||||
DestPalGDI->IndexedColors,
|
||||
DestPalGDI->NumColors);
|
||||
}
|
||||
|
||||
PALETTE_UnlockPalette(PaletteDest);
|
||||
|
||||
return XlateObj;
|
||||
|
|
Loading…
Reference in a new issue