📄 pdc16.h
字号:
//
// Windows CE Software Graphics Library
// pdc16.h
//
// Copyright (c) 2000 Microsoft Corporation. All rights reserved.
//
// This header file contains the function template for special case blit
// fill routines with 16 Bpp destinations and constant fill values.
#if !defined(FUNCTION)
#error Must define FUNCTION
#endif
#if !defined(BLOCK_OP) && !defined(WORD_OP)
#error Must define either BLOCK_OP or WORD_OP
#endif
#if defined(BLOCK_OP) && defined(WORD_OP)
#error Cannot define both BLOCK_OP and WORD_OP
#endif
BOOL
FUNCTION(
BLT_PARAM * Parameters
)
{
// Local variables.
// Destination-related info.
const RECT * DstRect = Parameters->DestRect;
LONG DstScanStride = Parameters->Destination->Stride / sizeof(WORD);
WORD * DstScanLine = (WORD *)Parameters->Destination->Ptr +
DstRect->top * DstScanStride +
DstRect->left;
WORD Color = (WORD)Parameters->FillValue;
ULONG Rows = RectHeight(DstRect);
ULONG Cols = RectWidth(DstRect);
ULONG Row;
// Check parameters.
// !TODO!
#ifdef WORD_OP
WORD * DstPixel;
WORD * Lim;
for (Row = 0; Row < Rows; Row++) {
DstPixel = DstScanLine;
Lim = DstPixel + Cols;
while (DstPixel < Lim) {
*DstPixel = WORD_OP(*DstPixel, Color);
DstPixel++;
SrcPixel++;
}
DstScanLine += DstScanStride;
}
#endif
#ifdef BLOCK_OP
for (Row = 0; Row < Rows; Row++) {
BLOCK_OP(DstScanLine, Color, (Cols * sizeof(WORD)));
DstScanLine += DstScanStride;
}
#endif
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -