2992 lines
122 KiB
C
2992 lines
122 KiB
C
/**
|
|
* FreeRDP: A Remote Desktop Protocol Client
|
|
* GDI Unit Tests
|
|
*
|
|
* Copyright 2010 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <freerdp/freerdp.h>
|
|
|
|
#include <freerdp/gdi/gdi.h>
|
|
|
|
#include <freerdp/gdi/dc.h>
|
|
#include <freerdp/gdi/pen.h>
|
|
#include <freerdp/gdi/line.h>
|
|
#include <freerdp/gdi/shape.h>
|
|
#include <freerdp/gdi/brush.h>
|
|
#include <freerdp/gdi/region.h>
|
|
#include <freerdp/gdi/bitmap.h>
|
|
#include <freerdp/gdi/palette.h>
|
|
#include <freerdp/gdi/drawing.h>
|
|
#include <freerdp/gdi/clipping.h>
|
|
#include <freerdp/gdi/32bpp.h>
|
|
|
|
#include "test_libgdi.h"
|
|
|
|
int init_libgdi_suite(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int clean_libgdi_suite(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int add_libgdi_suite(void)
|
|
{
|
|
add_test_suite(libgdi);
|
|
|
|
add_test_function(gdi_GetDC);
|
|
add_test_function(gdi_CreateCompatibleDC);
|
|
add_test_function(gdi_CreateBitmap);
|
|
add_test_function(gdi_CreateCompatibleBitmap);
|
|
add_test_function(gdi_CreatePen);
|
|
add_test_function(gdi_CreateSolidBrush);
|
|
add_test_function(gdi_CreatePatternBrush);
|
|
add_test_function(gdi_CreateRectRgn);
|
|
add_test_function(gdi_CreateRect);
|
|
add_test_function(gdi_GetPixel);
|
|
add_test_function(gdi_SetPixel);
|
|
add_test_function(gdi_SetROP2);
|
|
add_test_function(gdi_MoveToEx);
|
|
add_test_function(gdi_LineTo);
|
|
add_test_function(gdi_Ellipse);
|
|
add_test_function(gdi_PtInRect);
|
|
add_test_function(gdi_FillRect);
|
|
add_test_function(gdi_BitBlt_32bpp);
|
|
add_test_function(gdi_BitBlt_16bpp);
|
|
add_test_function(gdi_BitBlt_8bpp);
|
|
add_test_function(gdi_ClipCoords);
|
|
add_test_function(gdi_InvalidateRegion);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* BitBlt() Test Data */
|
|
|
|
/* source bitmap (16x16) */
|
|
unsigned char bmp_SRC[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* destination bitmap (16x16) */
|
|
unsigned char bmp_DST[256] =
|
|
{
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
/* pattern bitmap (8x8) */
|
|
unsigned char bmp_PAT[64] =
|
|
{
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
};
|
|
|
|
/* SRCCOPY (0x00CC0020) */
|
|
unsigned char bmp_SRCCOPY[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* BLACKNESS (0x00000042) */
|
|
unsigned char bmp_BLACKNESS[256] =
|
|
{
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
/* WHITENESS (0x00FF0062) */
|
|
unsigned char bmp_WHITENESS[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x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[256] =
|
|
{
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
/* SRCPAINT (0x00EE0086) */
|
|
unsigned char bmp_SRCPAINT[256] =
|
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FF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* SRCINVERT (0x00660046) */
|
|
unsigned char bmp_SRCINVERT[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* SRCERASE (0x00440328) */
|
|
unsigned char bmp_SRCERASE[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* NOTSRCCOPY (0x00330008) */
|
|
unsigned char bmp_NOTSRCCOPY[256] =
|
|
{
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
/* NOTSRCERASE (0x001100A6) */
|
|
unsigned char bmp_NOTSRCERASE[256] =
|
|
{
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
/* DSTINVERT (0x00550009) */
|
|
unsigned char bmp_DSTINVERT[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* SPna (0x000C0324) */
|
|
unsigned char bmp_SPna[256] =
|
|
{
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\x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FF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
/* MERGECOPY (0x00C000CA) */
|
|
unsigned char bmp_MERGECOPY[256] =
|
|
{
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
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xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
};
|
|
|
|
/* PATCOPY (0x00F00021) */
|
|
unsigned char bmp_PATCOPY[256] =
|
|
{
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
};
|
|
|
|
/* PATINVERT (0x005A0049) */
|
|
unsigned char bmp_PATINVERT[256] =
|
|
{
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
|
|
"\x00\x00\xFF\xFF\x00\x00\xFF\xF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x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* Ellipse() Test Data */
|
|
|
|
unsigned char ellipse_case_1[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
unsigned char ellipse_case_2[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
unsigned char ellipse_case_3[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
/* Polygon() Test Data */
|
|
|
|
unsigned char polygon_case_1[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
|
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
|
|
"\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
};
|
|
|
|
unsigned char polygon_case_2[256] =
|
|
{
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
|
};
|
|
|
|
int CompareBitmaps(HGDI_BITMAP hBmp1, HGDI_BITMAP hBmp2)
|
|
{
|
|
int x, y;
|
|
uint8 *p1, *p2;
|
|
|
|
int minw = (hBmp1->width < hBmp2->width) ? hBmp1->width : hBmp2->width;
|
|
int minh = (hBmp1->height < hBmp2->height) ? hBmp1->height : hBmp2->height;
|
|
|
|
if (hBmp1->bitsPerPixel == hBmp2->bitsPerPixel)
|
|
{
|
|
p1 = hBmp1->data;
|
|
p2 = hBmp2->data;
|
|
int bpp = hBmp1->bitsPerPixel;
|
|
|
|
if (bpp == 32)
|
|
{
|
|
for (y = 0; y < minh; y++)
|
|
{
|
|
for (x = 0; x < minw; x++)
|
|
{
|
|
if (*p1 != *p2)
|
|
return 0;
|
|
p1++;
|
|
p2++;
|
|
|
|
if (*p1 != *p2)
|
|
return 0;
|
|
p1++;
|
|
p2++;
|
|
|
|
if (*p1 != *p2)
|
|
return 0;
|
|
p1 += 2;
|
|
p2 += 2;
|
|
}
|
|
}
|
|
}
|
|
else if (bpp == 16)
|
|
{
|
|
for (y = 0; y < minh; y++)
|
|
{
|
|
for (x = 0; x < minw; x++)
|
|
{
|
|
if (*p1 != *p2)
|
|
return 0;
|
|
p1++;
|
|
p2++;
|
|
|
|
if (*p1 != *p2)
|
|
return 0;
|
|
p1++;
|
|
p2++;
|
|
}
|
|
}
|
|
}
|
|
else if (bpp == 8)
|
|
{
|
|
for (y = 0; y < minh; y++)
|
|
{
|
|
for (x = 0; x < minw; x++)
|
|
{
|
|
if (*p1 != *p2)
|
|
return 0;
|
|
p1++;
|
|
p2++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
void dump_bitmap(HGDI_BITMAP hBmp, char* name)
|
|
{
|
|
dump_data(hBmp->data, hBmp->width * hBmp->height * hBmp->bytesPerPixel, hBmp->width * hBmp->bytesPerPixel, name);
|
|
}
|
|
|
|
void assertBitmapsEqual(HGDI_BITMAP hBmpActual, HGDI_BITMAP hBmpExpected, char *name)
|
|
{
|
|
int bitmapsEqual = CompareBitmaps(hBmpActual, hBmpExpected);
|
|
|
|
if (bitmapsEqual != 1)
|
|
{
|
|
printf("\n%s\n", name);
|
|
dump_bitmap(hBmpActual, "Actual");
|
|
dump_bitmap(hBmpExpected, "Expected");
|
|
}
|
|
|
|
CU_ASSERT(bitmapsEqual == 1);
|
|
}
|
|
|
|
void test_gdi_GetDC(void)
|
|
{
|
|
HGDI_DC hdc = gdi_GetDC();
|
|
CU_ASSERT(hdc->bytesPerPixel == 4);
|
|
CU_ASSERT(hdc->bitsPerPixel == 32);
|
|
CU_ASSERT(hdc->drawMode == GDI_R2_BLACK);
|
|
}
|
|
|
|
void test_gdi_CreateCompatibleDC(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_DC chdc;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 2;
|
|
hdc->bitsPerPixel = 16;
|
|
hdc->drawMode = GDI_R2_XORPEN;
|
|
|
|
chdc = gdi_CreateCompatibleDC(hdc);
|
|
|
|
CU_ASSERT(chdc->bytesPerPixel == hdc->bytesPerPixel);
|
|
CU_ASSERT(chdc->bitsPerPixel == hdc->bitsPerPixel);
|
|
CU_ASSERT(chdc->drawMode == hdc->drawMode);
|
|
}
|
|
|
|
void test_gdi_CreateBitmap(void)
|
|
{
|
|
int bpp;
|
|
int width;
|
|
int height;
|
|
uint8* data;
|
|
HGDI_BITMAP hBitmap;
|
|
|
|
bpp = 32;
|
|
width = 32;
|
|
height = 16;
|
|
data = (uint8*) malloc(width * height * 4);
|
|
hBitmap = gdi_CreateBitmap(width, height, bpp, data);
|
|
|
|
CU_ASSERT(hBitmap->objectType == GDIOBJECT_BITMAP);
|
|
CU_ASSERT(hBitmap->bitsPerPixel == bpp);
|
|
CU_ASSERT(hBitmap->width == width);
|
|
CU_ASSERT(hBitmap->height == height);
|
|
CU_ASSERT(hBitmap->data == data);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
|
}
|
|
|
|
void test_gdi_CreateCompatibleBitmap(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
int width;
|
|
int height;
|
|
HGDI_BITMAP hBitmap;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 4;
|
|
hdc->bitsPerPixel = 32;
|
|
|
|
width = 32;
|
|
height = 16;
|
|
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
|
|
|
CU_ASSERT(hBitmap->objectType == GDIOBJECT_BITMAP);
|
|
CU_ASSERT(hBitmap->bytesPerPixel == hdc->bytesPerPixel);
|
|
CU_ASSERT(hBitmap->bitsPerPixel == hdc->bitsPerPixel);
|
|
CU_ASSERT(hBitmap->width == width);
|
|
CU_ASSERT(hBitmap->height == height);
|
|
CU_ASSERT(hBitmap->data != NULL);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
|
}
|
|
|
|
void test_gdi_CreatePen(void)
|
|
{
|
|
HGDI_PEN hPen = gdi_CreatePen(GDI_PS_SOLID, 8, 0xAABBCCDD);
|
|
CU_ASSERT(hPen->style == GDI_PS_SOLID);
|
|
CU_ASSERT(hPen->width == 8);
|
|
CU_ASSERT(hPen->color == 0xAABBCCDD);
|
|
gdi_DeleteObject((HGDIOBJECT) hPen);
|
|
}
|
|
|
|
void test_gdi_CreateSolidBrush(void)
|
|
{
|
|
HGDI_BRUSH hBrush = gdi_CreateSolidBrush(0xAABBCCDD);
|
|
CU_ASSERT(hBrush->objectType == GDIOBJECT_BRUSH);
|
|
CU_ASSERT(hBrush->style == GDI_BS_SOLID);
|
|
CU_ASSERT(hBrush->color == 0xAABBCCDD);
|
|
gdi_DeleteObject((HGDIOBJECT) hBrush);
|
|
}
|
|
|
|
void test_gdi_CreatePatternBrush(void)
|
|
{
|
|
HGDI_BRUSH hBrush;
|
|
HGDI_BITMAP hBitmap;
|
|
|
|
hBitmap = gdi_CreateBitmap(64, 64, 32, NULL);
|
|
hBrush = gdi_CreatePatternBrush(hBitmap);
|
|
|
|
CU_ASSERT(hBrush->objectType == GDIOBJECT_BRUSH);
|
|
CU_ASSERT(hBrush->style == GDI_BS_PATTERN);
|
|
CU_ASSERT(hBrush->pattern == hBitmap);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
|
}
|
|
|
|
void test_gdi_CreateRectRgn(void)
|
|
{
|
|
int x1 = 32;
|
|
int y1 = 64;
|
|
int x2 = 128;
|
|
int y2 = 256;
|
|
|
|
HGDI_RGN hRegion = gdi_CreateRectRgn(x1, y1, x2, y2);
|
|
|
|
CU_ASSERT(hRegion->objectType == GDIOBJECT_REGION);
|
|
CU_ASSERT(hRegion->x == x1);
|
|
CU_ASSERT(hRegion->y == y1);
|
|
CU_ASSERT(hRegion->w == x2 - x1 + 1);
|
|
CU_ASSERT(hRegion->h == y2 - y1 + 1);
|
|
CU_ASSERT(hRegion->null == 0);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hRegion);
|
|
}
|
|
|
|
void test_gdi_CreateRect(void)
|
|
{
|
|
int x1 = 32;
|
|
int y1 = 64;
|
|
int x2 = 128;
|
|
int y2 = 256;
|
|
|
|
HGDI_RECT hRect = gdi_CreateRect(x1, y1, x2, y2);
|
|
|
|
CU_ASSERT(hRect->objectType == GDIOBJECT_RECT);
|
|
CU_ASSERT(hRect->left == x1);
|
|
CU_ASSERT(hRect->top == y1);
|
|
CU_ASSERT(hRect->right == x2);
|
|
CU_ASSERT(hRect->bottom == y2);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hRect);
|
|
}
|
|
|
|
void test_gdi_GetPixel(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
int width = 128;
|
|
int height = 64;
|
|
HGDI_BITMAP hBitmap;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 4;
|
|
hdc->bitsPerPixel = 32;
|
|
|
|
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) hBitmap);
|
|
|
|
hBitmap->data[(64 * width * 4) + 32 * 4 + 0] = 0xDD;
|
|
hBitmap->data[(64 * width * 4) + 32 * 4 + 1] = 0xCC;
|
|
hBitmap->data[(64 * width * 4) + 32 * 4 + 2] = 0xBB;
|
|
hBitmap->data[(64 * width * 4) + 32 * 4 + 3] = 0xAA;
|
|
|
|
CU_ASSERT(gdi_GetPixel(hdc, 32, 64) == 0xAABBCCDD);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
|
}
|
|
|
|
void test_gdi_SetPixel(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
int width = 128;
|
|
int height = 64;
|
|
HGDI_BITMAP hBitmap;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 4;
|
|
hdc->bitsPerPixel = 32;
|
|
|
|
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) hBitmap);
|
|
|
|
gdi_SetPixel(hdc, 32, 64, 0xAABBCCDD);
|
|
CU_ASSERT(gdi_GetPixel(hdc, 32, 64) == 0xAABBCCDD);
|
|
|
|
gdi_SetPixel(hdc, width - 1, height - 1, 0xAABBCCDD);
|
|
CU_ASSERT(gdi_GetPixel(hdc, width - 1, height - 1) == 0xAABBCCDD);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
|
}
|
|
|
|
void test_gdi_SetROP2(void)
|
|
{
|
|
HGDI_DC hdc = gdi_GetDC();
|
|
gdi_SetROP2(hdc, GDI_R2_BLACK);
|
|
CU_ASSERT(hdc->drawMode == GDI_R2_BLACK);
|
|
}
|
|
|
|
void test_gdi_MoveToEx(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_PEN hPen;
|
|
HGDI_POINT prevPoint;
|
|
|
|
hdc = gdi_GetDC();
|
|
hPen = gdi_CreatePen(GDI_PS_SOLID, 8, 0xAABBCCDD);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) hPen);
|
|
gdi_MoveToEx(hdc, 128, 256, NULL);
|
|
|
|
CU_ASSERT(hdc->pen->posX == 128);
|
|
CU_ASSERT(hdc->pen->posY == 256);
|
|
|
|
prevPoint = (HGDI_POINT) malloc(sizeof(GDI_POINT));
|
|
memset(prevPoint, '\0', sizeof(GDI_POINT));
|
|
|
|
gdi_MoveToEx(hdc, 64, 128, prevPoint);
|
|
|
|
CU_ASSERT(prevPoint->x == 128);
|
|
CU_ASSERT(prevPoint->y == 256);
|
|
CU_ASSERT(hdc->pen->posX == 64);
|
|
CU_ASSERT(hdc->pen->posY == 128);
|
|
}
|
|
|
|
void test_gdi_LineTo(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_PEN pen;
|
|
uint8* data;
|
|
HGDI_BITMAP hBmp;
|
|
HGDI_BITMAP hBmp_LineTo_1;
|
|
HGDI_BITMAP hBmp_LineTo_2;
|
|
HGDI_BITMAP hBmp_LineTo_3;
|
|
HGDI_BITMAP hBmp_LineTo_4;
|
|
HGDI_BITMAP hBmp_LineTo_5;
|
|
HGDI_BITMAP hBmp_LineTo_6;
|
|
HGDI_BITMAP hBmp_LineTo_7;
|
|
HGDI_BITMAP hBmp_LineTo_8;
|
|
HGDI_BITMAP hBmp_LineTo_9;
|
|
HGDI_BITMAP hBmp_LineTo_10;
|
|
HGDI_BITMAP hBmp_LineTo_11;
|
|
HGDI_BITMAP hBmp_LineTo_R2_BLACK;
|
|
HGDI_BITMAP hBmp_LineTo_R2_NOTMERGEPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_MASKNOTPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_NOTCOPYPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_MASKPENNOT;
|
|
HGDI_BITMAP hBmp_LineTo_R2_NOT;
|
|
HGDI_BITMAP hBmp_LineTo_R2_XORPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_NOTMASKPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_MASKPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_NOTXORPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_NOP;
|
|
HGDI_BITMAP hBmp_LineTo_R2_MERGENOTPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_COPYPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_MERGEPENNOT;
|
|
HGDI_BITMAP hBmp_LineTo_R2_MERGEPEN;
|
|
HGDI_BITMAP hBmp_LineTo_R2_WHITE;
|
|
rdpPalette* hPalette;
|
|
HCLRCONV clrconv;
|
|
int bitsPerPixel = 8;
|
|
int bytesPerPixel = 1;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bitsPerPixel = bitsPerPixel;
|
|
hdc->bytesPerPixel = bytesPerPixel;
|
|
gdi_SetNullClipRgn(hdc);
|
|
|
|
pen = gdi_CreatePen(1, 1, 0);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) pen);
|
|
|
|
hBmp = gdi_CreateCompatibleBitmap(hdc, 16, 16);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) hBmp);
|
|
|
|
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
|
|
|
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
|
clrconv->alpha = 1;
|
|
clrconv->invert = 0;
|
|
clrconv->palette = hPalette;
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_4 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_6 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_7 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_8 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_9 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_10 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_11 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_BLACK = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_NOTMERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_MASKNOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_NOTCOPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_MASKPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_NOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_XORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_NOTMASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_MASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_NOTXORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_NOP = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_MERGENOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_COPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_MERGEPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_MERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_LineTo_R2_WHITE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
/* Test Case 1: (0,0) -> (15, 15) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_LineTo(hdc, 15, 15);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_1, "Case 1");
|
|
|
|
/* Test Case 2: (15,15) -> (0,0) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 15, 15, NULL);
|
|
gdi_LineTo(hdc, 0, 0);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_2, "Case 2");
|
|
|
|
/* Test Case 3: (15,0) -> (0,15) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 15, 0, NULL);
|
|
gdi_LineTo(hdc, 0, 15);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_3, "Case 3");
|
|
|
|
/* Test Case 4: (0,15) -> (15,0) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 0, 15, NULL);
|
|
gdi_LineTo(hdc, 15, 0);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_4, "Case 4");
|
|
|
|
/* Test Case 4: (0,15) -> (15,0) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 0, 15, NULL);
|
|
gdi_LineTo(hdc, 15, 0);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_4, "Case 4");
|
|
|
|
/* Test Case 5: (0,8) -> (15,8) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 0, 8, NULL);
|
|
gdi_LineTo(hdc, 15, 8);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_5, "Case 5");
|
|
|
|
/* Test Case 6: (15,8) -> (0,8) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 15, 8, NULL);
|
|
gdi_LineTo(hdc, 0, 8);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_6, "Case 6");
|
|
|
|
/* Test Case 7: (8,0) -> (8,15) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 8, 0, NULL);
|
|
gdi_LineTo(hdc, 8, 15);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_7, "Case 7");
|
|
|
|
/* Test Case 8: (8,15) -> (8,0) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 8, 15, NULL);
|
|
gdi_LineTo(hdc, 8, 0);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_8, "Case 8");
|
|
|
|
/* Test Case 9: (4,4) -> (12,12) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 4, 4, NULL);
|
|
gdi_LineTo(hdc, 12, 12);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_9, "Case 9");
|
|
|
|
/* Test Case 10: (12,12) -> (4,4) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_MoveToEx(hdc, 12, 12, NULL);
|
|
gdi_LineTo(hdc, 4, 4);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_10, "Case 10");
|
|
|
|
/* Test Case 11: (0,0) -> (+10,+10) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_LineTo(hdc, 16 + 10, 16 + 10);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_11, "Case 11");
|
|
|
|
/* Test Case 12: (0,0) -> (16,16), R2_BLACK */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_BLACK);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_BLACK, "Case 12");
|
|
|
|
/* Test Case 13: (0,0) -> (16,16), R2_NOTMERGEPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_NOTMERGEPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_NOTMERGEPEN, "Case 13");
|
|
|
|
/* Test Case 14: (0,0) -> (16,16), R2_MASKNOTPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_MASKNOTPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_MASKNOTPEN, "Case 14");
|
|
|
|
/* Test Case 15: (0,0) -> (16,16), R2_NOTCOPYPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_NOTCOPYPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_NOTCOPYPEN, "Case 15");
|
|
|
|
/* Test Case 16: (0,0) -> (16,16), R2_MASKPENNOT */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_MASKPENNOT);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_MASKPENNOT, "Case 16");
|
|
|
|
/* Test Case 17: (0,0) -> (16,16), R2_NOT */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_NOT);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_NOT, "Case 17");
|
|
|
|
/* Test Case 18: (0,0) -> (16,16), R2_XORPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_XORPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_XORPEN, "Case 18");
|
|
|
|
/* Test Case 19: (0,0) -> (16,16), R2_NOTMASKPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_NOTMASKPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_NOTMASKPEN, "Case 19");
|
|
|
|
/* Test Case 20: (0,0) -> (16,16), R2_MASKPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_MASKPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_MASKPEN, "Case 20");
|
|
|
|
/* Test Case 21: (0,0) -> (16,16), R2_NOTXORPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_NOTXORPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_NOTXORPEN, "Case 21");
|
|
|
|
/* Test Case 22: (0,0) -> (16,16), R2_NOP */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_NOP);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_NOP, "Case 22");
|
|
|
|
/* Test Case 23: (0,0) -> (16,16), R2_MERGENOTPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_MERGENOTPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_MERGENOTPEN, "Case 23");
|
|
|
|
/* Test Case 24: (0,0) -> (16,16), R2_COPYPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_COPYPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_COPYPEN, "Case 24");
|
|
|
|
/* Test Case 25: (0,0) -> (16,16), R2_MERGEPENNOT */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_MERGEPENNOT);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_MERGEPENNOT, "Case 25");
|
|
|
|
/* Test Case 26: (0,0) -> (16,16), R2_MERGEPEN */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_MERGEPEN);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_MERGEPEN, "Case 26");
|
|
|
|
/* Test Case 27: (0,0) -> (16,16), R2_WHITE */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_SetClipRgn(hdc, 0, 0, 16, 16);
|
|
gdi_MoveToEx(hdc, 0, 0, NULL);
|
|
gdi_SetROP2(hdc, GDI_R2_WHITE);
|
|
gdi_LineTo(hdc, 16, 16);
|
|
assertBitmapsEqual(hBmp, hBmp_LineTo_R2_WHITE, "Case 27");
|
|
}
|
|
|
|
void test_gdi_Ellipse(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_PEN pen;
|
|
uint8* data;
|
|
HGDI_BITMAP hBmp;
|
|
HGDI_BITMAP hBmp_Ellipse_1;
|
|
HGDI_BITMAP hBmp_Ellipse_2;
|
|
HGDI_BITMAP hBmp_Ellipse_3;
|
|
rdpPalette* hPalette;
|
|
HCLRCONV clrconv;
|
|
int bitsPerPixel = 8;
|
|
int bytesPerPixel = 1;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bitsPerPixel = bitsPerPixel;
|
|
hdc->bytesPerPixel = bytesPerPixel;
|
|
gdi_SetNullClipRgn(hdc);
|
|
|
|
pen = gdi_CreatePen(1, 1, 0);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) pen);
|
|
|
|
hBmp = gdi_CreateCompatibleBitmap(hdc, 16, 16);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) hBmp);
|
|
|
|
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
|
|
|
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
|
clrconv->alpha = 1;
|
|
clrconv->invert = 0;
|
|
clrconv->palette = hPalette;
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_Ellipse_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
/* Test Case 1: (0,0) -> (16, 16) */
|
|
gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS);
|
|
gdi_Ellipse(hdc, 0, 0, 16, 16);
|
|
//assertBitmapsEqual(hBmp, hBmp_Ellipse_1, "Case 1");
|
|
}
|
|
|
|
void test_gdi_PtInRect(void)
|
|
{
|
|
HGDI_RECT hRect;
|
|
int left = 20;
|
|
int top = 40;
|
|
int right = 60;
|
|
int bottom = 80;
|
|
|
|
hRect = gdi_CreateRect(left, top, right, bottom);
|
|
|
|
CU_ASSERT(gdi_PtInRect(hRect, 0, 0) == 0);
|
|
CU_ASSERT(gdi_PtInRect(hRect, 500, 500) == 0);
|
|
CU_ASSERT(gdi_PtInRect(hRect, 40, 100) == 0);
|
|
CU_ASSERT(gdi_PtInRect(hRect, 10, 40) == 0);
|
|
CU_ASSERT(gdi_PtInRect(hRect, 30, 50) == 1);
|
|
CU_ASSERT(gdi_PtInRect(hRect, left, top) == 1);
|
|
CU_ASSERT(gdi_PtInRect(hRect, right, bottom) == 1);
|
|
CU_ASSERT(gdi_PtInRect(hRect, right, 60) == 1);
|
|
CU_ASSERT(gdi_PtInRect(hRect, 40, bottom) == 1);
|
|
}
|
|
|
|
void test_gdi_FillRect(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_RECT hRect;
|
|
HGDI_BRUSH hBrush;
|
|
HGDI_BITMAP hBitmap;
|
|
GDI_COLOR color;
|
|
GDI_COLOR pixel;
|
|
GDI_COLOR rawPixel;
|
|
|
|
int x, y;
|
|
int badPixels;
|
|
int goodPixels;
|
|
int width = 200;
|
|
int height = 300;
|
|
|
|
int left = 20;
|
|
int top = 40;
|
|
int right = 60;
|
|
int bottom = 80;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 4;
|
|
hdc->bitsPerPixel = 32;
|
|
|
|
hRect = gdi_CreateRect(left, top, right, bottom);
|
|
|
|
hBitmap = gdi_CreateCompatibleBitmap(hdc, width, height);
|
|
memset(hBitmap->data, 0, width * height * hdc->bytesPerPixel);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) hBitmap);
|
|
|
|
color = (GDI_COLOR) ARGB32(0xFF, 0xAA, 0xBB, 0xCC);
|
|
hBrush = gdi_CreateSolidBrush(color);
|
|
|
|
gdi_FillRect(hdc, hRect, hBrush);
|
|
|
|
badPixels = 0;
|
|
goodPixels = 0;
|
|
|
|
for (x = 0; x < width; x++)
|
|
{
|
|
for (y = 0; y < height; y++)
|
|
{
|
|
rawPixel = gdi_GetPixel(hdc, x, y);
|
|
pixel = gdi_get_color_32bpp(hdc, rawPixel);
|
|
|
|
if (gdi_PtInRect(hRect, x, y))
|
|
{
|
|
if (pixel == color) {
|
|
goodPixels++;
|
|
}
|
|
else {
|
|
printf("actual:%04X expected:%04X\n", gdi_GetPixel(hdc, x, y), color);
|
|
badPixels++;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (pixel == color) {
|
|
badPixels++;
|
|
}
|
|
else {
|
|
goodPixels++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
CU_ASSERT(goodPixels == width * height);
|
|
CU_ASSERT(badPixels == 0);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) hBrush);
|
|
gdi_DeleteObject((HGDIOBJECT) hBitmap);
|
|
}
|
|
|
|
void test_gdi_BitBlt_32bpp(void)
|
|
{
|
|
uint8* data;
|
|
HGDI_DC hdcSrc;
|
|
HGDI_DC hdcDst;
|
|
HGDI_BRUSH hBrush;
|
|
HGDI_BITMAP hBmpSrc;
|
|
HGDI_BITMAP hBmpDst;
|
|
HGDI_BITMAP hBmpPat;
|
|
HGDI_BITMAP hBmp_SPna;
|
|
HGDI_BITMAP hBmp_BLACKNESS;
|
|
HGDI_BITMAP hBmp_WHITENESS;
|
|
HGDI_BITMAP hBmp_SRCCOPY;
|
|
HGDI_BITMAP hBmp_SRCAND;
|
|
HGDI_BITMAP hBmp_SRCPAINT;
|
|
HGDI_BITMAP hBmp_SRCINVERT;
|
|
HGDI_BITMAP hBmp_SRCERASE;
|
|
HGDI_BITMAP hBmp_NOTSRCCOPY;
|
|
HGDI_BITMAP hBmp_NOTSRCERASE;
|
|
HGDI_BITMAP hBmp_DSTINVERT;
|
|
HGDI_BITMAP hBmp_MERGECOPY;
|
|
HGDI_BITMAP hBmp_MERGEPAINT;
|
|
HGDI_BITMAP hBmp_PATCOPY;
|
|
HGDI_BITMAP hBmp_PATPAINT;
|
|
HGDI_BITMAP hBmp_PATINVERT;
|
|
HGDI_BITMAP hBmpDstOriginal;
|
|
rdpPalette* hPalette;
|
|
HCLRCONV clrconv;
|
|
|
|
int bytesPerPixel = 4;
|
|
int bitsPerPixel = 32;
|
|
|
|
hdcSrc = gdi_GetDC();
|
|
hdcSrc->bytesPerPixel = bytesPerPixel;
|
|
hdcSrc->bitsPerPixel = bitsPerPixel;
|
|
|
|
hdcDst = gdi_GetDC();
|
|
hdcDst->bytesPerPixel = bytesPerPixel;
|
|
hdcDst->bitsPerPixel = bitsPerPixel;
|
|
|
|
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
|
|
|
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
|
clrconv->alpha = 1;
|
|
clrconv->invert = 0;
|
|
clrconv->palette = hPalette;
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
|
|
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBmpDst);
|
|
|
|
/* SRCCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCCOPY) == 1)
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* BLACKNESS */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_BLACKNESS);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_BLACKNESS) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* WHITENESS */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_WHITENESS);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_WHITENESS) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCAND */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCAND);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCAND) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCINVERT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCERASE */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCERASE);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCERASE) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* NOTSRCCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_NOTSRCCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_NOTSRCCOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* NOTSRCERASE */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_NOTSRCERASE);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_NOTSRCERASE) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* DSTINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_DSTINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_DSTINVERT) == 1);
|
|
|
|
/* select a brush for operations using a pattern */
|
|
hBrush = gdi_CreatePatternBrush(hBmpPat);
|
|
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBrush);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* MERGECOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_MERGECOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_MERGECOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* MERGEPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_MERGEPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_MERGEPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATCOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATINVERT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SPna */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SPna);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SPna) == 1)
|
|
}
|
|
|
|
void test_gdi_BitBlt_16bpp(void)
|
|
{
|
|
uint8* data;
|
|
HGDI_DC hdcSrc;
|
|
HGDI_DC hdcDst;
|
|
HGDI_BRUSH hBrush;
|
|
HGDI_BITMAP hBmpSrc;
|
|
HGDI_BITMAP hBmpDst;
|
|
HGDI_BITMAP hBmpPat;
|
|
HGDI_BITMAP hBmp_SPna;
|
|
HGDI_BITMAP hBmp_BLACKNESS;
|
|
HGDI_BITMAP hBmp_WHITENESS;
|
|
HGDI_BITMAP hBmp_SRCCOPY;
|
|
HGDI_BITMAP hBmp_SRCAND;
|
|
HGDI_BITMAP hBmp_SRCPAINT;
|
|
HGDI_BITMAP hBmp_SRCINVERT;
|
|
HGDI_BITMAP hBmp_SRCERASE;
|
|
HGDI_BITMAP hBmp_NOTSRCCOPY;
|
|
HGDI_BITMAP hBmp_NOTSRCERASE;
|
|
HGDI_BITMAP hBmp_DSTINVERT;
|
|
HGDI_BITMAP hBmp_MERGECOPY;
|
|
HGDI_BITMAP hBmp_MERGEPAINT;
|
|
HGDI_BITMAP hBmp_PATCOPY;
|
|
HGDI_BITMAP hBmp_PATPAINT;
|
|
HGDI_BITMAP hBmp_PATINVERT;
|
|
HGDI_BITMAP hBmpDstOriginal;
|
|
rdpPalette* hPalette;
|
|
HCLRCONV clrconv;
|
|
|
|
int bytesPerPixel = 2;
|
|
int bitsPerPixel = 16;
|
|
|
|
hdcSrc = gdi_GetDC();
|
|
hdcSrc->bytesPerPixel = bytesPerPixel;
|
|
hdcSrc->bitsPerPixel = bitsPerPixel;
|
|
|
|
hdcDst = gdi_GetDC();
|
|
hdcDst->bytesPerPixel = bytesPerPixel;
|
|
hdcDst->bitsPerPixel = bitsPerPixel;
|
|
|
|
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
|
|
|
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
|
clrconv->alpha = 1;
|
|
clrconv->invert = 0;
|
|
clrconv->palette = hPalette;
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
|
|
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBmpDst);
|
|
|
|
/* SRCCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCCOPY) == 1)
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* BLACKNESS */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_BLACKNESS);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_BLACKNESS) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* WHITENESS */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_WHITENESS);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_WHITENESS) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCAND */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCAND);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCAND) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCINVERT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCERASE */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCERASE);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCERASE) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* NOTSRCCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_NOTSRCCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_NOTSRCCOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* NOTSRCERASE */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_NOTSRCERASE);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_NOTSRCERASE) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* DSTINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_DSTINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_DSTINVERT) == 1);
|
|
|
|
/* select a brush for operations using a pattern */
|
|
hBrush = gdi_CreatePatternBrush(hBmpPat);
|
|
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBrush);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* MERGECOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_MERGECOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_MERGECOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* MERGEPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_MERGEPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_MERGEPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATCOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATINVERT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SPna */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SPna);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SPna) == 1)
|
|
}
|
|
|
|
void test_gdi_BitBlt_8bpp(void)
|
|
{
|
|
uint8* data;
|
|
HGDI_DC hdcSrc;
|
|
HGDI_DC hdcDst;
|
|
HGDI_BRUSH hBrush;
|
|
HGDI_BITMAP hBmpSrc;
|
|
HGDI_BITMAP hBmpDst;
|
|
HGDI_BITMAP hBmpPat;
|
|
HGDI_BITMAP hBmp_SPna;
|
|
HGDI_BITMAP hBmp_BLACKNESS;
|
|
HGDI_BITMAP hBmp_WHITENESS;
|
|
HGDI_BITMAP hBmp_SRCCOPY;
|
|
HGDI_BITMAP hBmp_SRCAND;
|
|
HGDI_BITMAP hBmp_SRCPAINT;
|
|
HGDI_BITMAP hBmp_SRCINVERT;
|
|
HGDI_BITMAP hBmp_SRCERASE;
|
|
HGDI_BITMAP hBmp_NOTSRCCOPY;
|
|
HGDI_BITMAP hBmp_NOTSRCERASE;
|
|
HGDI_BITMAP hBmp_DSTINVERT;
|
|
HGDI_BITMAP hBmp_MERGECOPY;
|
|
HGDI_BITMAP hBmp_MERGEPAINT;
|
|
HGDI_BITMAP hBmp_PATCOPY;
|
|
HGDI_BITMAP hBmp_PATPAINT;
|
|
HGDI_BITMAP hBmp_PATINVERT;
|
|
HGDI_BITMAP hBmpDstOriginal;
|
|
rdpPalette* hPalette;
|
|
HCLRCONV clrconv;
|
|
|
|
int bytesPerPixel = 1;
|
|
int bitsPerPixel = 8;
|
|
|
|
hdcSrc = gdi_GetDC();
|
|
hdcSrc->bytesPerPixel = bytesPerPixel;
|
|
hdcSrc->bitsPerPixel = bitsPerPixel;
|
|
|
|
hdcDst = gdi_GetDC();
|
|
hdcDst->bytesPerPixel = bytesPerPixel;
|
|
hdcDst->bitsPerPixel = bitsPerPixel;
|
|
|
|
hPalette = (rdpPalette*) gdi_GetSystemPalette();
|
|
|
|
clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
|
clrconv->alpha = 1;
|
|
clrconv->invert = 0;
|
|
clrconv->palette = hPalette;
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
|
|
hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
|
|
hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
|
|
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBmpDst);
|
|
|
|
/* SRCCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCCOPY) == 1)
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* BLACKNESS */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_BLACKNESS);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_BLACKNESS) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* WHITENESS */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_WHITENESS);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_WHITENESS) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCAND */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCAND);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCAND) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCINVERT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SRCERASE */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCERASE);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SRCERASE) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* NOTSRCCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_NOTSRCCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_NOTSRCCOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* NOTSRCERASE */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_NOTSRCERASE);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_NOTSRCERASE) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* DSTINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_DSTINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_DSTINVERT) == 1);
|
|
|
|
/* select a brush for operations using a pattern */
|
|
hBrush = gdi_CreatePatternBrush(hBmpPat);
|
|
gdi_SelectObject(hdcDst, (HGDIOBJECT) hBrush);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* MERGECOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_MERGECOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_MERGECOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* MERGEPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_MERGEPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_MERGEPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATCOPY */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATCOPY);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATCOPY) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATINVERT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATINVERT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATINVERT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* PATPAINT */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_PATPAINT);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_PATPAINT) == 1);
|
|
|
|
/* restore original destination bitmap */
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpDstOriginal);
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SRCCOPY);
|
|
gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
|
|
|
|
/* SPna */
|
|
gdi_BitBlt(hdcDst, 0, 0, 16, 16, hdcSrc, 0, 0, GDI_SPna);
|
|
CU_ASSERT(CompareBitmaps(hBmpDst, hBmp_SPna) == 1)
|
|
}
|
|
|
|
void test_gdi_ClipCoords(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_RGN rgn1;
|
|
HGDI_RGN rgn2;
|
|
HGDI_BITMAP bmp;
|
|
int draw;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 4;
|
|
hdc->bitsPerPixel = 32;
|
|
bmp = gdi_CreateBitmap(1024, 768, 4, NULL);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) bmp);
|
|
gdi_SetNullClipRgn(hdc);
|
|
|
|
rgn1 = gdi_CreateRectRgn(0, 0, 0, 0);
|
|
rgn2 = gdi_CreateRectRgn(0, 0, 0, 0);
|
|
rgn1->null = 1;
|
|
rgn2->null = 1;
|
|
|
|
/* null clipping region */
|
|
gdi_SetNullClipRgn(hdc);
|
|
gdi_SetRgn(rgn1, 20, 20, 100, 100);
|
|
gdi_SetRgn(rgn2, 20, 20, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* region all inside clipping region */
|
|
gdi_SetClipRgn(hdc, 0, 0, 1024, 768);
|
|
gdi_SetRgn(rgn1, 20, 20, 100, 100);
|
|
gdi_SetRgn(rgn2, 20, 20, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* region all outside clipping region, on the left */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 20, 20, 100, 100);
|
|
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
|
|
|
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(draw == 0);
|
|
|
|
/* region all outside clipping region, on the right */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 420, 420, 100, 100);
|
|
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
|
|
|
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(draw == 0);
|
|
|
|
/* region all outside clipping region, on top */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 20, 100, 100);
|
|
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
|
|
|
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(draw == 0);
|
|
|
|
/* region all outside clipping region, at the bottom */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 420, 100, 100);
|
|
gdi_SetRgn(rgn2, 0, 0, 0, 0);
|
|
|
|
draw = gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(draw == 0);
|
|
|
|
/* left outside, right = clip, top = clip, bottom = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 100, 300, 300, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* left outside, right inside, top = clip, bottom = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 100, 300, 250, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 50, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* left = clip, right outside, top = clip, bottom = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 300, 300, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* left inside, right outside, top = clip, bottom = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 350, 300, 200, 100);
|
|
gdi_SetRgn(rgn2, 350, 300, 50, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* top outside, bottom = clip, left = clip, right = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 100, 300, 300);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* top = clip, bottom outside, left = clip, right = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 300, 100, 200);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
|
|
/* top = clip, bottom = clip, top = clip, bottom = clip */
|
|
gdi_SetClipRgn(hdc, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_ClipCoords(hdc, &(rgn1->x), &(rgn1->y), &(rgn1->w), &(rgn1->h), NULL, NULL);
|
|
CU_ASSERT(gdi_EqualRgn(rgn1, rgn2) == 1);
|
|
}
|
|
|
|
void test_gdi_InvalidateRegion(void)
|
|
{
|
|
HGDI_DC hdc;
|
|
HGDI_RGN rgn1;
|
|
HGDI_RGN rgn2;
|
|
HGDI_RGN invalid;
|
|
HGDI_BITMAP bmp;
|
|
|
|
hdc = gdi_GetDC();
|
|
hdc->bytesPerPixel = 4;
|
|
hdc->bitsPerPixel = 32;
|
|
bmp = gdi_CreateBitmap(1024, 768, 4, NULL);
|
|
gdi_SelectObject(hdc, (HGDIOBJECT) bmp);
|
|
gdi_SetNullClipRgn(hdc);
|
|
|
|
hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND));
|
|
hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0);
|
|
hdc->hwnd->invalid->null = 1;
|
|
invalid = hdc->hwnd->invalid;
|
|
|
|
hdc->hwnd->count = 16;
|
|
hdc->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * hdc->hwnd->count);
|
|
|
|
rgn1 = gdi_CreateRectRgn(0, 0, 0, 0);
|
|
rgn2 = gdi_CreateRectRgn(0, 0, 0, 0);
|
|
rgn1->null = 1;
|
|
rgn2->null = 1;
|
|
|
|
/* no previous invalid region */
|
|
invalid->null = 1;
|
|
gdi_SetRgn(rgn1, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* region same as invalid region */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 100);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* left outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 100, 300, 300, 100);
|
|
gdi_SetRgn(rgn2, 100, 300, 300, 100);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* right outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 300, 300, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 300, 100);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* top outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 100, 100, 300);
|
|
gdi_SetRgn(rgn2, 300, 100, 100, 300);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* bottom outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 300, 100, 300);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 300);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* left outside, right outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 100, 300, 600, 300);
|
|
gdi_SetRgn(rgn2, 100, 300, 600, 300);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* top outside, bottom outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 100, 100, 500);
|
|
gdi_SetRgn(rgn2, 300, 100, 100, 500);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* all outside, left */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 100, 300, 100, 100);
|
|
gdi_SetRgn(rgn2, 100, 300, 300, 100);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* all outside, right */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 700, 300, 100, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 500, 100);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* all outside, top */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 100, 100, 100);
|
|
gdi_SetRgn(rgn2, 300, 100, 100, 300);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* all outside, bottom */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 300, 500, 100, 100);
|
|
gdi_SetRgn(rgn2, 300, 300, 100, 300);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* all outside */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 100, 100, 600, 600);
|
|
gdi_SetRgn(rgn2, 100, 100, 600, 600);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
|
|
/* everything */
|
|
gdi_SetRgn(invalid, 300, 300, 100, 100);
|
|
gdi_SetRgn(rgn1, 0, 0, 1024, 768);
|
|
gdi_SetRgn(rgn2, 0, 0, 1024, 768);
|
|
|
|
gdi_InvalidateRegion(hdc, rgn1->x, rgn1->y, rgn1->w, rgn1->h);
|
|
CU_ASSERT(gdi_EqualRgn(invalid, rgn2) == 1);
|
|
}
|