Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
May 2021
- 86 participants
- 705 discussions
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/gdi32/tests/metafile.c | 1236 ++++++++++++++++++++++++++++++-----
1 file changed, 1087 insertions(+), 149 deletions(-)
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index 83a10264589..062eb4c8a44 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -1265,87 +1265,6 @@ static const unsigned char EMF_LINETO_MM_TEXT_BITS[] = {
0x14, 0x00, 0x00, 0x00
};
-static const unsigned char EMF_BITBLT[] =
-{
- 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
- 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
- 0x64, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x07, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00,
- 0xfc, 0x01, 0x00, 0x00, 0x3e, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
- 0x30, 0xda, 0x04, 0x00, 0x4c, 0x00, 0x00, 0x00,
- 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x4c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x62, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00,
- 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0a, 0xd7, 0xa3, 0x3b, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd7, 0x23, 0x3c,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x6c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x94, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
- 0x90, 0x01, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
- 0x14, 0x00, 0x00, 0x00
-};
-
static const unsigned char EMF_DCBRUSH_BITS[] =
{
0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
@@ -1909,83 +1828,1102 @@ static int compare_emf_bits(const HENHMETAFILE mf, const unsigned char *bits,
return 0;
}
+static const unsigned char EMF_STRETCHBLT_1BIT_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x2c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x9c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_4BIT_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x64, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,
+ 0xd4, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_8BIT_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x24, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xa4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00,
+ 0x94, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_16BIT_555_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xa0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
+ 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_24BIT_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
+ 0x94, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_32BIT_888_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x60, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_16BIT_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xa0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
+ 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_STRETCHBLT_32BIT_3X3[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x60, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x00,
+ 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_1BIT_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x24, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x94, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_4BIT_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x5c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00,
+ 0xcc, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_8BIT_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x1c, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0x9c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00,
+ 0x8c, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_16BIT_555_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7c, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
+ 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_24BIT_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x3c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
+ 0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_32BIT_888_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x58, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x98, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_16BIT_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x38, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf8, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00,
+ 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
+
+static const unsigned char EMF_BITBLT_32BIT_4X4[] =
+{
+ 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x4f, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,
+ 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
+ 0x58, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00, 0xd0, 0x03, 0x00, 0x00,
+ 0xfc, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
+ 0xb9, 0xf0, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00,
+ 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
+ 0x98, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
+};
/* tests blitting to an EMF */
static void test_emf_BitBlt(void)
{
- HDC hdcDisplay, hdcMetafile, hdcBitmap;
- HBITMAP hBitmap, hOldBitmap;
- HENHMETAFILE hMetafile;
-#define BMP_DIM 4
- BITMAPINFOHEADER bmih =
- {
- sizeof(BITMAPINFOHEADER),
- BMP_DIM,/* biWidth */
- BMP_DIM,/* biHeight */
- 1, /* biPlanes */
- 24, /* biBitCount */
- BI_RGB, /* biCompression */
- 0, /* biXPelsPerMeter */
- 0, /* biYPelsPerMeter */
- 0, /* biClrUsed */
- 0, /* biClrImportant */
- };
+ static const XFORM xform = {0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f};
+ static const int bitmap_width = 4, bitmap_height = 4;
+ unsigned char bmi_buffer[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
+ BITMAPINFO *bmi = (BITMAPINFO *)bmi_buffer;
+ HDC hdc, hdc_emf, hdc_emf2, hdc_bitmap;
+ HBITMAP hbitmap, old_hbitmap;
+ HENHMETAFILE hemf, hemf2;
+ int ret, test_idx;
void *bits;
- XFORM xform;
- BOOL ret;
- hdcDisplay = CreateDCA("DISPLAY", NULL, NULL, NULL);
- ok( hdcDisplay != 0, "CreateDCA error %d\n", GetLastError() );
-
- hdcBitmap = CreateCompatibleDC(hdcDisplay);
- ok( hdcBitmap != 0, "CreateCompatibleDC failed\n" );
- ok(SetGraphicsMode(hdcBitmap, GM_ADVANCED), "SetGraphicsMode failed\n");
- bmih.biXPelsPerMeter = MulDiv(GetDeviceCaps(hdcDisplay, LOGPIXELSX), 100, 3937);
- bmih.biYPelsPerMeter = MulDiv(GetDeviceCaps(hdcDisplay, LOGPIXELSY), 100, 3937);
- hBitmap = CreateDIBSection(hdcDisplay, (const BITMAPINFO *)&bmih,
- DIB_RGB_COLORS, &bits, NULL, 0);
- hOldBitmap = SelectObject(hdcBitmap, hBitmap);
-
- hdcMetafile = CreateEnhMetaFileA(hdcBitmap, NULL, NULL, NULL);
- ok( hdcMetafile != 0, "CreateEnhMetaFileA failed\n" );
-
- /* First fill the bitmap DC with something recognizable, like BLACKNESS */
- ret = BitBlt(hdcBitmap, 0, 0, BMP_DIM, BMP_DIM, 0, 0, 0, BLACKNESS);
- ok( ret, "BitBlt(BLACKNESS) failed\n" );
-
- ret = BitBlt(hdcMetafile, 0, 0, BMP_DIM, BMP_DIM, hdcBitmap, 0, 0, SRCCOPY);
- ok( ret, "BitBlt(SRCCOPY) failed\n" );
- ret = BitBlt(hdcMetafile, 0, 0, BMP_DIM, BMP_DIM, 0, 0, 0, WHITENESS);
- ok( ret, "BitBlt(WHITENESS) failed\n" );
-
- ok(SetMapMode(hdcBitmap, MM_ANISOTROPIC), "SetMapMode failed\n");
- ok(SetWindowOrgEx(hdcBitmap, 0, 0, NULL), "SetWindowOrgEx failed\n");
- ok(SetWindowExtEx(hdcBitmap, 400, 400, NULL), "SetWindowExtEx failed\n");
- ok(SetViewportOrgEx(hdcBitmap, 0, 0, NULL), "SetViewportOrgEx failed\n");
- ok(SetViewportExtEx(hdcBitmap, BMP_DIM, BMP_DIM, NULL), "SetViewportExtEx failed\n");
- memset(&xform, 0, sizeof(xform));
- xform.eM11 = 0.5;
- xform.eM22 = 1.0;
- ok(SetWorldTransform(hdcBitmap, &xform), "SetWorldTransform failed\n");
-
- ret = StretchBlt(hdcMetafile, 0, 0, BMP_DIM, BMP_DIM, hdcBitmap, 0, 0, 400, 400, SRCCOPY);
- ok( ret, "StretchBlt(SRCCOPY) failed\n" );
-
- hMetafile = CloseEnhMetaFile(hdcMetafile);
- ok( hMetafile != 0, "CloseEnhMetaFile failed\n" );
-
- if(compare_emf_bits(hMetafile, EMF_BITBLT, sizeof(EMF_BITBLT),
- "emf_BitBlt", FALSE) != 0)
+ static const struct
{
- dump_emf_bits(hMetafile, "emf_BitBlt");
- dump_emf_records(hMetafile, "emf_BitBlt");
+ WORD bpp;
+ int src_width;
+ int src_height;
+ WORD compression;
+ const void *bits;
+ size_t bits_count;
+ DWORD used_color_count;
+ DWORD color_count;
+ RGBQUAD colors[3];
+ }
+ tests[] =
+ {
+ {1, 3, 3, BI_RGB, EMF_STRETCHBLT_1BIT_3X3, sizeof(EMF_STRETCHBLT_1BIT_3X3), 1, 1, {{0xff, 0xff, 0xff}}},
+ {4, 3, 3, BI_RGB, EMF_STRETCHBLT_4BIT_3X3, sizeof(EMF_STRETCHBLT_4BIT_3X3), 1, 1, {{0xff, 0xff, 0xff}}},
+ {8, 3, 3, BI_RGB, EMF_STRETCHBLT_8BIT_3X3, sizeof(EMF_STRETCHBLT_8BIT_3X3), 1, 1, {{0xff, 0xff, 0xff}}},
+ {16, 3, 3, BI_RGB, EMF_STRETCHBLT_16BIT_555_3X3, sizeof(EMF_STRETCHBLT_16BIT_555_3X3)},
+ {24, 3, 3, BI_RGB, EMF_STRETCHBLT_24BIT_3X3, sizeof(EMF_STRETCHBLT_24BIT_3X3)},
+ {32, 3, 3, BI_RGB, EMF_STRETCHBLT_32BIT_888_3X3, sizeof(EMF_STRETCHBLT_32BIT_888_3X3)},
+ {16, 3, 3, BI_BITFIELDS, EMF_STRETCHBLT_16BIT_3X3, sizeof(EMF_STRETCHBLT_16BIT_3X3), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
+ {32, 3, 3, BI_BITFIELDS, EMF_STRETCHBLT_32BIT_3X3, sizeof(EMF_STRETCHBLT_32BIT_3X3), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
+ {1, 4, 4, BI_RGB, EMF_BITBLT_1BIT_4X4, sizeof(EMF_BITBLT_1BIT_4X4), 1, 1, {{0xff, 0xff, 0xff}}},
+ {4, 4, 4, BI_RGB, EMF_BITBLT_4BIT_4X4, sizeof(EMF_BITBLT_4BIT_4X4), 1, 1, {{0xff, 0xff, 0xff}}},
+ {8, 4, 4, BI_RGB, EMF_BITBLT_8BIT_4X4, sizeof(EMF_BITBLT_8BIT_4X4), 1, 1, {{0xff, 0xff, 0xff}}},
+ {16, 4, 4, BI_RGB, EMF_BITBLT_16BIT_555_4X4, sizeof(EMF_BITBLT_16BIT_555_4X4)},
+ {24, 4, 4, BI_RGB, EMF_BITBLT_24BIT_4X4, sizeof(EMF_BITBLT_24BIT_4X4)},
+ {32, 4, 4, BI_RGB, EMF_BITBLT_32BIT_888_4X4, sizeof(EMF_BITBLT_32BIT_888_4X4)},
+ {16, 4, 4, BI_BITFIELDS, EMF_BITBLT_16BIT_4X4, sizeof(EMF_BITBLT_16BIT_4X4), 0, 3, {{0x00, 0xf8, 0x00}, {0xe0, 0x07, 0x00}, {0x1f, 0x00, 0x00}}},
+ {32, 4, 4, BI_BITFIELDS, EMF_BITBLT_32BIT_4X4, sizeof(EMF_BITBLT_32BIT_4X4), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
+ };
+
+ hdc = GetDC(0);
+
+ /* Test that source DC cannot be an enhanced metafile */
+ hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
+ ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %d\n", GetLastError());
+ hdc_emf2 = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
+ ok(!!hdc_emf2, "CreateEnhMetaFileW failed, error %d\n", GetLastError());
+
+ ret = StretchBlt(hdc_emf, 0, 0, 1, 1, hdc_emf2, 0, 0, 1, 1, SRCCOPY);
+ ok(!ret, "StretchBlt succeeded\n");
+
+ hemf2 = CloseEnhMetaFile(hdc_emf2);
+ ok(!!hemf2, "CloseEnhMetaFile failed, error %d\n", GetLastError());
+ hemf = CloseEnhMetaFile(hdc_emf);
+ ok(!!hemf, "CloseEnhMetaFile failed, error %d\n", GetLastError());
+ DeleteEnhMetaFile(hemf2);
+ DeleteEnhMetaFile(hemf);
+
+ for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx)
+ {
+ winetest_push_context("Test %d", test_idx);
+
+ memset(bmi_buffer, 0, sizeof(bmi_buffer));
+ bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
+ bmi->bmiHeader.biHeight = bitmap_width;
+ bmi->bmiHeader.biWidth = bitmap_height;
+ bmi->bmiHeader.biBitCount = tests[test_idx].bpp;
+ bmi->bmiHeader.biPlanes = 1;
+ bmi->bmiHeader.biCompression = tests[test_idx].compression;
+ bmi->bmiHeader.biClrUsed = tests[test_idx].used_color_count;
+ memcpy(bmi->bmiColors, tests[test_idx].colors, sizeof(RGBQUAD) * tests[test_idx].color_count);
+
+ hbitmap = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, &bits, NULL, 0);
+ ok(!!hbitmap, "CreateDIBSection failed, error %d\n", GetLastError());
+ hdc_bitmap = CreateCompatibleDC(hdc);
+ ok(!!hdc_bitmap, "CreateCompatibleDC failed, error %d\n", GetLastError());
+ old_hbitmap = SelectObject(hdc_bitmap, hbitmap);
+
+ SetBkColor(hdc_bitmap, RGB(0xff, 0xff, 0xff));
+ ret = SetGraphicsMode(hdc_bitmap, GM_ADVANCED);
+ ok(ret, "SetGraphicsMode failed, error %d\n", GetLastError());
+ ret = SetWorldTransform(hdc_bitmap, &xform);
+ ok(ret, "SetWorldTransform failed, error %d\n", GetLastError());
+
+ hdc_emf = CreateEnhMetaFileW(hdc, NULL, NULL, NULL);
+ ok(!!hdc_emf, "CreateEnhMetaFileW failed, error %d\n", GetLastError());
+
+ ret = BitBlt(hdc_bitmap, 0, 0, bitmap_width, bitmap_height, 0, 0, 0, BLACKNESS);
+ ok(ret, "BitBlt failed, error %d\n", GetLastError());
+ if (tests[test_idx].src_width == bitmap_width && tests[test_idx].src_height == bitmap_height)
+ {
+ ret = BitBlt(hdc_emf, 0, 0, bitmap_width, bitmap_height, hdc_bitmap, 0, 0, SRCCOPY);
+ ok(ret, "BitBlt failed, error %d\n", GetLastError());
+ }
+ else
+ {
+ ret = StretchBlt(hdc_emf, 0, 0, bitmap_width, bitmap_height, hdc_bitmap, 0, 0,
+ tests[test_idx].src_width, tests[test_idx].src_height, SRCCOPY);
+ ok(ret, "StretchBlt failed, error %d\n", GetLastError());
+ }
+
+ hemf = CloseEnhMetaFile(hdc_emf);
+ ok(!!hemf, "CloseEnhMetaFile failed, error %d\n", GetLastError());
+
+ ret = compare_emf_bits(hemf, tests[test_idx].bits, tests[test_idx].bits_count,
+ "test_emf_BitBlt", FALSE);
+ if (ret)
+ {
+ dump_emf_bits(hemf, "test_emf_BitBlt");
+ dump_emf_records(hemf, "test_emf_BitBlt");
+ }
+
+ DeleteEnhMetaFile(hemf);
+ SelectObject(hdc_bitmap, old_hbitmap);
+ DeleteDC(hdc_bitmap);
+ DeleteObject(hbitmap);
+
+ winetest_pop_context();
}
- SelectObject(hdcBitmap, hOldBitmap);
- DeleteObject(hBitmap);
- DeleteDC(hdcBitmap);
- DeleteDC(hdcDisplay);
-#undef BMP_DIM
+ ReleaseDC(0, hdc);
}
static void test_emf_DCBrush(void)
--
2.30.2
3
2
[PATCH v2 3/6] gdi32: Use a common helper for emf StretchBlt and AlphaBlend.
by Zhiyi Zhang 07 Jun '21
by Zhiyi Zhang 07 Jun '21
07 Jun '21
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/gdi32/enhmfdrv/bitblt.c | 129 +++++++----------------------------
1 file changed, 23 insertions(+), 106 deletions(-)
diff --git a/dlls/gdi32/enhmfdrv/bitblt.c b/dlls/gdi32/enhmfdrv/bitblt.c
index 597a6110abd..f15acaa1f14 100644
--- a/dlls/gdi32/enhmfdrv/bitblt.c
+++ b/dlls/gdi32/enhmfdrv/bitblt.c
@@ -27,15 +27,17 @@
#include "enhmetafiledrv.h"
#include "wine/debug.h"
-BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst,
- PHYSDEV dev_src, struct bitblt_coords *src, BLENDFUNCTION func )
+/* Generate an EMRBITBLT, EMRSTRETCHBLT or EMRALPHABLEND record depending on the type parameter */
+static BOOL emfdrv_stretchblt( PHYSDEV dev_dst, struct bitblt_coords *dst, PHYSDEV dev_src,
+ struct bitblt_coords *src, DWORD rop, DWORD type )
{
unsigned char src_buffer[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
BITMAPINFO *src_info = (BITMAPINFO *)src_buffer;
UINT bits_size, bmi_size, emr_size, size, bpp;
+ EMRSTRETCHBLT *emr_stretchblt;
struct gdi_image_bits bits;
- EMRALPHABLEND *emr;
BITMAPINFO *bmi;
+ EMRBITBLT *emr;
DC *dc_src;
DWORD err;
BOOL ret = FALSE;
@@ -56,14 +58,15 @@ BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst,
bmi_size = sizeof(BITMAPINFOHEADER) + 3 * sizeof(RGBQUAD);
else
bmi_size = sizeof(BITMAPINFOHEADER);
- emr_size = sizeof(EMRALPHABLEND);
+ /* EMRSTRETCHBLT and EMRALPHABLEND have the same structure */
+ emr_size = type == EMR_BITBLT ? sizeof(EMRBITBLT) : sizeof(EMRSTRETCHBLT);
bits_size = src_info->bmiHeader.biSizeImage;
size = emr_size + bmi_size + bits_size;
emr = HeapAlloc(GetProcessHeap(), 0, size);
if (!emr) goto err;
- emr->emr.iType = EMR_ALPHABLEND;
+ emr->emr.iType = type;
emr->emr.nSize = size;
emr->rclBounds.left = dst->log_x;
emr->rclBounds.top = dst->log_y;
@@ -75,9 +78,13 @@ BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst,
emr->cyDest = dst->log_height;
emr->xSrc = src->log_x;
emr->ySrc = src->log_y;
- emr->cxSrc = src->log_width;
- emr->cySrc = src->log_height;
- emr->dwRop = *(DWORD *)&func;
+ if (type == EMR_STRETCHBLT || type == EMR_ALPHABLEND)
+ {
+ emr_stretchblt = (EMRSTRETCHBLT *)emr;
+ emr_stretchblt->cxSrc = src->log_width;
+ emr_stretchblt->cySrc = src->log_height;
+ }
+ emr->dwRop = rop;
GetTransform(dev_src->hdc, 0x204, &emr->xformSrc);
emr->crBkColorSrc = GetBkColor(dev_src->hdc);
emr->iUsageSrc = DIB_RGB_COLORS;
@@ -115,6 +122,12 @@ err:
return ret;
}
+BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst,
+ PHYSDEV dev_src, struct bitblt_coords *src, BLENDFUNCTION func )
+{
+ return emfdrv_stretchblt(dev_dst, dst, dev_src, src, *(DWORD *)&func, EMR_ALPHABLEND);
+}
+
BOOL CDECL EMFDRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
{
EMRBITBLT emr;
@@ -155,106 +168,10 @@ BOOL CDECL EMFDRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
BOOL CDECL EMFDRV_StretchBlt( PHYSDEV devDst, struct bitblt_coords *dst,
PHYSDEV devSrc, struct bitblt_coords *src, DWORD rop )
{
- BOOL ret;
- PEMRBITBLT pEMR;
- UINT emrSize;
- UINT bmiSize;
- UINT bitsSize;
- UINT size;
- BITMAP BM;
- WORD nBPP = 0;
- LPBITMAPINFOHEADER lpBmiH;
- HBITMAP hBitmap = NULL;
- DWORD emrType;
-
- if (devSrc->funcs == devDst->funcs) return FALSE; /* can't use a metafile DC as source */
-
if (src->log_width == dst->log_width && src->log_height == dst->log_height)
- {
- emrType = EMR_BITBLT;
- emrSize = sizeof(EMRBITBLT);
- }
+ return emfdrv_stretchblt(devDst, dst, devSrc, src, rop, EMR_BITBLT);
else
- {
- emrType = EMR_STRETCHBLT;
- emrSize = sizeof(EMRSTRETCHBLT);
- }
-
- hBitmap = GetCurrentObject(devSrc->hdc, OBJ_BITMAP);
-
- if(sizeof(BITMAP) != GetObjectW(hBitmap, sizeof(BITMAP), &BM))
- return FALSE;
-
- nBPP = BM.bmPlanes * BM.bmBitsPixel;
- if(nBPP > 8) nBPP = 24; /* FIXME Can't get 16bpp to work for some reason */
- bitsSize = get_dib_stride( BM.bmWidth, nBPP ) * BM.bmHeight;
- bmiSize = sizeof(BITMAPINFOHEADER) +
- (nBPP <= 8 ? 1 << nBPP : 0) * sizeof(RGBQUAD);
-
- size = emrSize + bmiSize + bitsSize;
-
- pEMR = HeapAlloc(GetProcessHeap(), 0, size);
- if (!pEMR) return FALSE;
-
- /* Initialize EMR */
- pEMR->emr.iType = emrType;
- pEMR->emr.nSize = size;
- pEMR->rclBounds.left = dst->log_x;
- pEMR->rclBounds.top = dst->log_y;
- pEMR->rclBounds.right = dst->log_x + dst->log_width - 1;
- pEMR->rclBounds.bottom = dst->log_y + dst->log_height - 1;
- pEMR->xDest = dst->log_x;
- pEMR->yDest = dst->log_y;
- pEMR->cxDest = dst->log_width;
- pEMR->cyDest = dst->log_height;
- pEMR->dwRop = rop;
- pEMR->xSrc = src->log_x;
- pEMR->ySrc = src->log_y;
- GetTransform(devSrc->hdc, 0x204, &pEMR->xformSrc);
- pEMR->crBkColorSrc = GetBkColor(devSrc->hdc);
- pEMR->iUsageSrc = DIB_RGB_COLORS;
- pEMR->offBmiSrc = emrSize;
- pEMR->offBitsSrc = emrSize + bmiSize;
- pEMR->cbBmiSrc = bmiSize;
- pEMR->cbBitsSrc = bitsSize;
- if (emrType == EMR_STRETCHBLT)
- {
- PEMRSTRETCHBLT pEMRStretch = (PEMRSTRETCHBLT)pEMR;
- pEMRStretch->cxSrc = src->log_width;
- pEMRStretch->cySrc = src->log_height;
- }
-
- /* Initialize BITMAPINFO structure */
- lpBmiH = (LPBITMAPINFOHEADER)((BYTE*)pEMR + pEMR->offBmiSrc);
-
- lpBmiH->biSize = sizeof(BITMAPINFOHEADER);
- lpBmiH->biWidth = BM.bmWidth;
- lpBmiH->biHeight = BM.bmHeight;
- lpBmiH->biPlanes = BM.bmPlanes;
- lpBmiH->biBitCount = nBPP;
- /* Assume the bitmap isn't compressed and set the BI_RGB flag. */
- lpBmiH->biCompression = BI_RGB;
- lpBmiH->biSizeImage = bitsSize;
- lpBmiH->biYPelsPerMeter = 0;
- lpBmiH->biXPelsPerMeter = 0;
- lpBmiH->biClrUsed = nBPP <= 8 ? 1 << nBPP : 0;
- /* Set biClrImportant to 0, indicating that all of the
- device colors are important. */
- lpBmiH->biClrImportant = 0;
-
- /* Initialize bitmap bits */
- if (GetDIBits(devSrc->hdc, hBitmap, 0, (UINT)lpBmiH->biHeight,
- (BYTE*)pEMR + pEMR->offBitsSrc,
- (LPBITMAPINFO)lpBmiH, DIB_RGB_COLORS))
- {
- ret = EMFDRV_WriteRecord(devDst, (EMR*)pEMR);
- if (ret) EMFDRV_UpdateBBox(devDst, &(pEMR->rclBounds));
- }
- else
- ret = FALSE;
-
- HeapFree( GetProcessHeap(), 0, pEMR);
- return ret;
+ return emfdrv_stretchblt(devDst, dst, devSrc, src, rop, EMR_STRETCHBLT);
}
INT CDECL EMFDRV_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT heightDst,
--
2.30.2
2
1
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/gdi32/mfdrv/dc.c | 5 +++
dlls/gdi32/mfdrv/init.c | 2 +-
dlls/gdi32/mfdrv/metafiledrv.h | 1 +
dlls/gdi32/tests/metafile.c | 79 ++++++++++++++++++++++++++++++++++
4 files changed, 86 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/mfdrv/dc.c b/dlls/gdi32/mfdrv/dc.c
index 61417bfd462..a036efe2d17 100644
--- a/dlls/gdi32/mfdrv/dc.c
+++ b/dlls/gdi32/mfdrv/dc.c
@@ -85,6 +85,11 @@ INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y )
return MFDRV_MetaParam2( dev, META_OFFSETCLIPRGN, x, y );
}
+DWORD CDECL MFDRV_SetLayout( PHYSDEV dev, DWORD layout )
+{
+ return MFDRV_MetaParam2( dev, META_SETLAYOUT, HIWORD(layout), LOWORD(layout) );
+}
+
INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode )
{
return MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c
index 2a215b70902..fe7aae631d7 100644
--- a/dlls/gdi32/mfdrv/init.c
+++ b/dlls/gdi32/mfdrv/init.c
@@ -201,7 +201,7 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
MFDRV_SetDIBitsToDevice, /* pSetDIBitsToDevice */
NULL, /* pSetDeviceClipping */
NULL, /* pSetDeviceGammaRamp */
- NULL, /* pSetLayout */
+ MFDRV_SetLayout, /* pSetLayout */
MFDRV_SetMapMode, /* pSetMapMode */
MFDRV_SetMapperFlags, /* pSetMapperFlags */
MFDRV_SetPixel, /* pSetPixel */
diff --git a/dlls/gdi32/mfdrv/metafiledrv.h b/dlls/gdi32/mfdrv/metafiledrv.h
index 7d3d1c41da5..429b95b3f40 100644
--- a/dlls/gdi32/mfdrv/metafiledrv.h
+++ b/dlls/gdi32/mfdrv/metafiledrv.h
@@ -113,6 +113,7 @@ extern COLORREF CDECL MFDRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_H
extern INT CDECL MFDRV_SetBkMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
extern COLORREF CDECL MFDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF CDECL MFDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
+extern DWORD CDECL MFDRV_SetLayout( PHYSDEV dev, DWORD layout ) DECLSPEC_HIDDEN;
extern INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
extern DWORD CDECL MFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags ) DECLSPEC_HIDDEN;
extern COLORREF CDECL MFDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index ab823dd443d..83a10264589 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -5072,6 +5072,84 @@ static void test_emf_text_extents(void)
ReleaseDC(0, dc);
}
+static const unsigned char MF_SETLAYOUT_BITS[] =
+{
+/* Winedump output. Note that there is no META_SELECTOBJECT records after META_SETLAYOUT.
+ *
+ * METAHEADER 00000012
+ * type 1 header_size 0x12 version 0x300 size 0x54 object_count 0 max_record_size 0xa parameter_count 0
+ * 0001 0009 0300 002a 0000 0000 0005 0000
+ * 0000
+ * META_SETLAYOUT 0000000a
+ * 0000 0000
+ * META_SETLAYOUT 0000000a
+ * 0001 0000
+ * META_SETLAYOUT 0000000a
+ * 0008 0000
+ * META_SETLAYOUT 0000000a
+ * 0000 8000
+ * META_SETLAYOUT 0000000a
+ * 0009 0000
+ * META_SETLAYOUT 0000000a
+ * 0001 8000
+ * META_EOF 00000006
+ */
+ 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x2a, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x49, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x49, 0x01, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x00, 0x00, 0x49, 0x01, 0x08, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0x49, 0x01, 0x00, 0x00,
+ 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x49, 0x01,
+ 0x09, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x49, 0x01, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+static void test_mf_SetLayout(void)
+{
+ static const DWORD tests[] =
+ {
+ LAYOUT_LTR,
+ LAYOUT_RTL,
+ LAYOUT_BITMAPORIENTATIONPRESERVED,
+ NOMIRRORBITMAP,
+ LAYOUT_RTL | LAYOUT_BITMAPORIENTATIONPRESERVED,
+ LAYOUT_RTL | NOMIRRORBITMAP,
+ };
+ DWORD layout;
+ HMETAFILE mf;
+ int ret, i;
+ HDC mf_dc;
+
+ mf_dc = CreateMetaFileW(NULL);
+ ok(!!mf_dc, "CreateMetaFileW failed, error %d\n", GetLastError());
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ winetest_push_context("Test %d", i);
+ layout = SetLayout(mf_dc, tests[i]);
+ ok(layout == LAYOUT_RTL, "Expected %#x, got %#x\n", tests[i], layout);
+ layout = GetLayout(mf_dc);
+ todo_wine ok(layout == GDI_ERROR, "Expected %#x, got %#x\n", GDI_ERROR, layout);
+ winetest_pop_context();
+ }
+
+ mf = CloseMetaFile(mf_dc);
+ ok(!!mf, "CloseMetaFile failed, error %d\n", GetLastError());
+
+ ret = compare_mf_bits(mf, MF_SETLAYOUT_BITS, sizeof(MF_SETLAYOUT_BITS), "mf_SetLayout");
+ ok(!ret, "Bits mismatch\n");
+ if (ret)
+ {
+ dump_mf_bits(mf, "mf_SetLayout");
+ EnumMetaFile(0, mf, mf_enum_proc, 0);
+ }
+
+ DeleteMetaFile(mf);
+}
+
START_TEST(metafile)
{
init_function_pointers();
@@ -5103,6 +5181,7 @@ START_TEST(metafile)
test_mf_ExtTextOut_on_path();
test_mf_clipping();
test_mf_GetPath();
+ test_mf_SetLayout();
/* For metafile conversions */
test_mf_conversions();
--
2.30.2
2
1
[PATCH v2 1/6] gdi32: Return correct color depth for display DCs in GetDeviceCaps().
by Zhiyi Zhang 07 Jun '21
by Zhiyi Zhang 07 Jun '21
07 Jun '21
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29184
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
v2: Supersede 205834 and 205844~205848.
Now that winex11.drv EnumDisplaySettingsW backend has a cache, performance shouldn't be an issue.
dlls/gdi32/driver.c | 19 ++++++++++++++++++-
dlls/user32/tests/monitor.c | 1 -
dlls/winex11.drv/init.c | 2 --
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index a2ebd018bca..2042701dd45 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -460,7 +460,24 @@ static INT CDECL nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
return pGetSystemMetrics ? pGetSystemMetrics( SM_CYSCREEN ) : 480;
}
- case BITSPIXEL: return 32;
+ case BITSPIXEL:
+ {
+ DEVMODEW devmode;
+ WCHAR *display;
+ DC *dc;
+
+ if (GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY && pEnumDisplaySettingsW)
+ {
+ dc = get_nulldrv_dc( dev );
+ display = dc->display[0] ? dc->display : NULL;
+ memset( &devmode, 0, sizeof(devmode) );
+ devmode.dmSize = sizeof(devmode);
+ if (pEnumDisplaySettingsW( display, ENUM_CURRENT_SETTINGS, &devmode )
+ && devmode.dmFields & DM_BITSPERPEL && devmode.dmBitsPerPel)
+ return devmode.dmBitsPerPel;
+ }
+ return 32;
+ }
case PLANES: return 1;
case NUMBRUSHES: return -1;
case NUMPENS: return -1;
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
index ab03837f5e6..654f77ed617 100644
--- a/dlls/user32/tests/monitor.c
+++ b/dlls/user32/tests/monitor.c
@@ -2068,7 +2068,6 @@ static void _check_display_dc(INT line, HDC hdc, const DEVMODEA *dm, BOOL allow_
dm->dmDisplayFrequency, value);
value = GetDeviceCaps(hdc, BITSPIXEL);
- todo_wine_if(dm->dmBitsPerPel != 32)
ok_(__FILE__, line)(value == dm->dmBitsPerPel, "Expected BITSPIXEL %d, got %d.\n",
dm->dmBitsPerPel, value);
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index d070c0f1171..ff3d5317697 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -162,8 +162,6 @@ static INT CDECL X11DRV_GetDeviceCaps( PHYSDEV dev, INT cap )
{
switch(cap)
{
- case BITSPIXEL:
- return screen_bpp;
case SIZEPALETTE:
return palette_size;
default:
--
2.30.2
3
2
07 Jun '21
It looks like GetOutlineTextMetrics no longer fails for bitmat fonts
under Windows 10.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51184
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/gdi32/tests/font.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index ed0acf8243a..ffb400ba838 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -353,7 +353,8 @@ if (0) /* these metrics are scaled too, but with rounding errors */
ok(otm.otmMacDescent < 0, "otm.otmMacDescent should be < 0\n");
ok(tm.tmDescent > 0, "tm.tmDescent should be > 0\n");
ok(otm.otmMacDescent == -tm.tmDescent, "descent %d != %d\n", otm.otmMacDescent, -tm.tmDescent);
- ok(otm.otmEMSquare == 2048, "expected 2048, got %d\n", otm.otmEMSquare);
+ if (otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE)
+ ok(otm.otmEMSquare == 2048, "expected 2048, got %d\n", otm.otmEMSquare);
}
else
{
--
2.31.1
2
1
[PATCH 1/2] strmbase: Leave critical section when waiting for the renderer state change.
by Anton Baskanov 07 Jun '21
by Anton Baskanov 07 Jun '21
07 Jun '21
Sometimes streaming thread gets stuck in IPin::EndOfStream trying to
acquire the filter critical section for more than 1 second, causing
intermittent test failures.
Signed-off-by: Anton Baskanov <baskanov(a)gmail.com>
---
dlls/strmbase/renderer.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index 01fabfc98de..150d712806a 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -290,10 +290,14 @@ static HRESULT renderer_cleanup_stream(struct strmbase_filter *iface)
static HRESULT renderer_wait_state(struct strmbase_filter *iface, DWORD timeout)
{
struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
+ HRESULT hr = S_OK;
+ LeaveCriticalSection(&filter->filter.filter_cs);
if (WaitForSingleObject(filter->state_event, timeout) == WAIT_TIMEOUT)
- return VFW_S_STATE_INTERMEDIATE;
- return S_OK;
+ hr = VFW_S_STATE_INTERMEDIATE;
+ EnterCriticalSection(&filter->filter.filter_cs);
+
+ return hr;
}
static const struct strmbase_filter_ops filter_ops =
--
2.25.1
2
3
[PATCH] msxml3/tests: add some tests for the non-standard MSXML regex escape sequences
by Damjan Jovanovic 03 Jun '21
by Damjan Jovanovic 03 Jun '21
03 Jun '21
Adds tests for all non-standard escaped sequences used by MSXML I could
find, such as "\$" (bug 29685), "\uXXXX" (bug 43581) and 13 others.
A patch to libxml2 implementing all those sequences is already available:
https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/116
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com>
---
dlls/msxml3/tests/schema.c | 175 +++++++++++++++++++++++++++++++++++++
1 file changed, 175 insertions(+)
2
1
Hi all,
After recent events at freenode[1], the Wine project has decided to
move our official IRC channels to Libera Chat[2]. We would like to
encourage everyone to please join us in #winehq and #winehackers on
irc.libera.chat/6697 (TLS enabled). More information on how to connect
and set up your client can be found at [3].
Henri
[1] https://lwn.net/Articles/856543/
[2] https://libera.chat/
[3] https://libera.chat/guides
1
1
[PATCH 1/7] d3dcompiler: Fix typo in struct d3dcompiler_shader_reflection.
by Matteo Bruni 01 Jun '21
by Matteo Bruni 01 Jun '21
01 Jun '21
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
dlls/d3dcompiler_43/reflection.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index 4415399793d..bd064793587 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -140,7 +140,7 @@ struct d3dcompiler_shader_reflection
UINT dynamic_flow_control_count;
UINT c_control_points;
D3D_TESSELLATOR_OUTPUT_PRIMITIVE hs_output_primitive;
- D3D_TESSELLATOR_PARTITIONING hs_prtitioning;
+ D3D_TESSELLATOR_PARTITIONING hs_partitioning;
D3D_TESSELLATOR_DOMAIN tessellator_domain;
struct d3dcompiler_shader_signature *isgn;
@@ -428,7 +428,7 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11Sha
desc->cGSInstanceCount = 0;
desc->cControlPoints = This->c_control_points;
desc->HSOutputPrimitive = This->hs_output_primitive;
- desc->HSPartitioning = This->hs_prtitioning;
+ desc->HSPartitioning = This->hs_partitioning;
desc->TessellatorDomain = This->tessellator_domain;
desc->cBarrierInstructions = 0;
desc->cInterlockedInstructions = 0;
@@ -1184,8 +1184,8 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c
r->hs_output_primitive = read_dword(&ptr);
TRACE("HSOutputPrimitive: %x\n", r->hs_output_primitive);
- r->hs_prtitioning = read_dword(&ptr);
- TRACE("HSPartitioning: %x\n", r->hs_prtitioning);
+ r->hs_partitioning = read_dword(&ptr);
+ TRACE("HSPartitioning: %x\n", r->hs_partitioning);
r->tessellator_domain = read_dword(&ptr);
TRACE("TessellatorDomain: %x\n", r->tessellator_domain);
--
2.26.3
5
22
[PATCH 3/4] shell32: Calculate known folder paths from parent and relative path
by Andrew Eikum 01 Jun '21
by Andrew Eikum 01 Jun '21
01 Jun '21
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
---
The actual path changes were in the previous patch. This one just
de-duplicates some static data.
dlls/shell32/shellpath.c | 249 ++++++++++++++-------------------------
1 file changed, 89 insertions(+), 160 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index b6af8f6f45a..3be759bf616 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -832,21 +832,8 @@ static const WCHAR AppUpdatesFolderW[] = {'A','p','p','U','p','d','a','t','e','s
static const WCHAR Administrative_ToolsW[] = {'A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'};
static const WCHAR AppDataW[] = {'A','p','p','D','a','t','a','\0'};
static const WCHAR AppData_RoamingW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\0'};
-static const WCHAR AppData_Roaming_Microsoft_Windows_Network_ShortcutsW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','N','e','t','w','o','r','k',' ','S','h','o','r','t','c','u','t','s',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_Printer_ShortcutsW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','P','r','i','n','t','e','r',' ','S','h','o','r','t','c','u','t','s',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_RecentW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','R','e','c','e','n','t',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_SendToW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','e','n','d','T','o',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_Start_MenuW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_Start_Menu_ProgramsW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_Start_Menu_Programs_StartupW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\\','S','t','a','r','t','u','p',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_Start_Menu_Programs_Administrative_ToolsW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\\','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s',0};
-static const WCHAR AppData_Roaming_Microsoft_Windows_TemplatesW[] = {'A','p','p','D','a','t','a','\\','R','o','a','m','i','n','g','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','T','e','m','p','l','a','t','e','s',0};
static const WCHAR AppData_LocalLowW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','L','o','w','\0'};
static const WCHAR AppData_LocalW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','\0'};
-static const WCHAR AppData_Local_Microsoft_Windows_Burn_BurnW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','B','u','r','n','\\','B','u','r','n',0};
-static const WCHAR AppData_Local_Microsoft_Windows_HistoryW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','H','i','s','t','o','r','y',0};
-static const WCHAR AppData_Local_Microsoft_Windows_INetCacheW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','I','N','e','t','C','a','c','h','e',0};
-static const WCHAR AppData_Local_Microsoft_Windows_INetCookiesW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','I','N','e','t','C','o','o','k','i','e','s',0};
static const WCHAR CacheW[] = {'C','a','c','h','e','\0'};
static const WCHAR CD_BurningW[] = {'C','D',' ','B','u','r','n','i','n','g','\0'};
static const WCHAR ChangeRemoveProgramsFolderW[] = {'C','h','a','n','g','e','R','e','m','o','v','e','P','r','o','g','r','a','m','s','F','o','l','d','e','r',0};
@@ -912,18 +899,12 @@ static const WCHAR Microsoft_Windows_RingtonesW[] = {'M','i','c','r','o','s','o'
static const WCHAR Microsoft_Windows_SendToW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','e','n','d','T','o',0};
static const WCHAR Microsoft_Windows_Sidebar_GadgetsW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ','S','i','d','e','b','a','r','\\','G','a','d','g','e','t','s',0};
static const WCHAR Microsoft_Windows_Start_MenuW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u',0};
-static const WCHAR Microsoft_Windows_Start_Menu_ProgramsW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\0'};
-static const WCHAR Microsoft_Windows_Start_Menu_Admin_ToolsW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\\','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'};
-static const WCHAR Microsoft_Windows_Start_Menu_StartupW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\\','S','t','a','r','t','U','p','\0'};
static const WCHAR Microsoft_Windows_TemplatesW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','T','e','m','p','l','a','t','e','s',0};
static const WCHAR Microsoft_Windows_ThemesW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','T','h','e','m','e','s',0};
static const WCHAR MoviesW[] = {'M','o','v','i','e','s','\0'};
static const WCHAR MusicW[] = {'M','u','s','i','c','\0'};
static const WCHAR MusicLibraryW[] = {'M','u','s','i','c','L','i','b','r','a','r','y',0};
static const WCHAR Music_librarymsW[] = {'M','u','s','i','c','.','l','i','b','r','a','r','y','-','m','s',0};
-static const WCHAR Music_PlaylistsW[] = {'M','u','s','i','c','\\','P','l','a','y','l','i','s','t','s','\0'};
-static const WCHAR Music_Sample_MusicW[] = {'M','u','s','i','c','\\','S','a','m','p','l','e',' ','M','u','s','i','c','\0'};
-static const WCHAR Music_Sample_PlaylistsW[] = {'M','u','s','i','c','\\','S','a','m','p','l','e',' ','P','l','a','y','l','i','s','t','s','\0'};
static const WCHAR My_MusicW[] = {'M','y',' ','M','u','s','i','c','\0'};
static const WCHAR My_PicturesW[] = {'M','y',' ','P','i','c','t','u','r','e','s','\0'};
static const WCHAR My_VideosW[] = {'M','y',' ','V','i','d','e','o','s','\0'};
@@ -938,8 +919,6 @@ static const WCHAR PhotoAlbumsW[] = {'P','h','o','t','o','A','l','b','u','m','s'
static const WCHAR PicturesW[] = {'P','i','c','t','u','r','e','s','\0'};
static const WCHAR PicturesLibraryW[] = {'P','i','c','t','u','r','e','s','L','i','b','r','a','r','y',0};
static const WCHAR Pictures_librarymsW[] = {'P','i','c','t','u','r','e','s','.','l','i','b','r','a','r','y','-','m','s',0};
-static const WCHAR Pictures_Sample_PicturesW[] = {'P','i','c','t','u','r','e','s','\\','S','a','m','p','l','e',' ','P','i','c','t','u','r','e','s','\0'};
-static const WCHAR Pictures_Slide_ShowsW[] = {'P','i','c','t','u','r','e','s','\\','S','l','i','d','e',' ','S','h','o','w','s','\0'};
static const WCHAR PlaylistsW[] = {'P','l','a','y','l','i','s','t','s',0};
static const WCHAR PrintersFolderW[] = {'P','r','i','n','t','e','r','s','F','o','l','d','e','r',0};
static const WCHAR PrintHoodW[] = {'P','r','i','n','t','H','o','o','d','\0'};
@@ -1003,7 +982,6 @@ static const WCHAR UsersPublicW[] = {'u','s','e','r','s','\\','P','u','b','l','i
static const WCHAR VideosW[] = {'V','i','d','e','o','s','\0'};
static const WCHAR VideosLibraryW[] = {'V','i','d','e','o','s','L','i','b','r','a','r','y',0};
static const WCHAR Videos_librarymsW[] = {'V','i','d','e','o','s','.','l','i','b','r','a','r','y','-','m','s',0};
-static const WCHAR Videos_Sample_VideosW[] = {'V','i','d','e','o','s','\\','S','a','m','p','l','e',' ','V','i','d','e','o','s','\0'};
static const WCHAR WindowsW[] = {'W','i','n','d','o','w','s',0};
static const WCHAR Windows_Sidebar_GadgetsW[] = {'W','i','n','d','o','w','s',' ','S','i','d','e','b','a','r','\\','G','a','d','g','e','t','s',0};
static const WCHAR DefaultW[] = {'.','D','e','f','a','u','l','t','\0'};
@@ -1229,7 +1207,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Desktop,
CSIDL_Type_User,
DesktopW,
- MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY),
+ NULL,
KF_CATEGORY_PERUSER, /* category */
DesktopW, /* name */
@@ -1269,7 +1247,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Programs,
CSIDL_Type_User,
ProgramsW,
- AppData_Roaming_Microsoft_Windows_Start_Menu_ProgramsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
ProgramsW, /* name */
@@ -1329,7 +1307,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Documents,
CSIDL_Type_User,
PersonalW,
- MAKEINTRESOURCEW(IDS_PERSONAL),
+ NULL,
KF_CATEGORY_PERUSER, /* category */
PersonalW, /* name */
@@ -1349,7 +1327,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Favorites,
CSIDL_Type_User,
FavoritesW,
- FavoritesW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
FavoritesW, /* name */
@@ -1369,7 +1347,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Startup,
CSIDL_Type_User,
StartUpW,
- AppData_Roaming_Microsoft_Windows_Start_Menu_Programs_StartupW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
StartupW, /* name */
@@ -1389,7 +1367,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Recent,
CSIDL_Type_User,
RecentW,
- AppData_Roaming_Microsoft_Windows_RecentW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
RecentW, /* name */
@@ -1409,7 +1387,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SendTo,
CSIDL_Type_User,
SendToW,
- AppData_Roaming_Microsoft_Windows_SendToW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
SendToW, /* name */
@@ -1449,7 +1427,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_StartMenu,
CSIDL_Type_User,
Start_MenuW,
- AppData_Roaming_Microsoft_Windows_Start_MenuW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
Start_MenuW, /* name */
@@ -1475,7 +1453,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Music,
CSIDL_Type_User,
My_MusicW,
- MAKEINTRESOURCEW(IDS_MYMUSIC),
+ NULL,
KF_CATEGORY_PERUSER, /* category */
My_MusicW, /* name */
@@ -1495,7 +1473,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Videos,
CSIDL_Type_User,
My_VideosW,
- MAKEINTRESOURCEW(IDS_MYVIDEOS),
+ NULL,
KF_CATEGORY_PERUSER, /* category */
My_VideoW, /* name */
@@ -1521,7 +1499,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Desktop,
CSIDL_Type_User,
DesktopW,
- MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY),
+ NULL,
KF_CATEGORY_PERUSER, /* category */
DesktopW, /* name */
@@ -1581,7 +1559,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_NetHood,
CSIDL_Type_User,
NetHoodW,
- AppData_Roaming_Microsoft_Windows_Network_ShortcutsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
NetHoodW, /* name */
@@ -1621,7 +1599,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Templates,
CSIDL_Type_User,
TemplatesW,
- AppData_Roaming_Microsoft_Windows_TemplatesW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
TemplatesW, /* name */
@@ -1641,7 +1619,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CommonStartMenu,
CSIDL_Type_ProgramData,
Common_Start_MenuW,
- Microsoft_Windows_Start_MenuW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_Start_MenuW, /* name */
@@ -1661,7 +1639,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CommonPrograms,
CSIDL_Type_ProgramData,
Common_ProgramsW,
- Microsoft_Windows_Start_Menu_ProgramsW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_ProgramsW, /* name */
@@ -1681,7 +1659,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CommonStartup,
CSIDL_Type_ProgramData,
Common_StartUpW,
- Microsoft_Windows_Start_Menu_StartupW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_StartupW, /* name */
@@ -1701,7 +1679,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicDesktop,
CSIDL_Type_AllUsers,
Common_DesktopW,
- MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY),
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_DesktopW, /* name */
@@ -1721,7 +1699,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_RoamingAppData,
CSIDL_Type_User,
AppDataW,
- AppData_RoamingW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
AppDataW, /* name */
@@ -1741,7 +1719,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PrintHood,
CSIDL_Type_User,
PrintHoodW,
- AppData_Roaming_Microsoft_Windows_Printer_ShortcutsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
PrintHoodW, /* name */
@@ -1761,7 +1739,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_LocalAppData,
CSIDL_Type_User,
Local_AppDataW,
- AppData_LocalW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
Local_AppDataW, /* name */
@@ -1793,7 +1771,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Favorites,
CSIDL_Type_AllUsers,
Common_FavoritesW,
- FavoritesW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
FavoritesW, /* name */
@@ -1813,7 +1791,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_InternetCache,
CSIDL_Type_User,
CacheW,
- AppData_Local_Microsoft_Windows_INetCacheW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
CacheW, /* name */
@@ -1833,7 +1811,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Cookies,
CSIDL_Type_User,
CookiesW,
- AppData_Local_Microsoft_Windows_INetCookiesW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
CookiesW, /* name */
@@ -1853,7 +1831,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_History,
CSIDL_Type_User,
HistoryW,
- AppData_Local_Microsoft_Windows_HistoryW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
HistoryW, /* name */
@@ -1953,7 +1931,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Pictures,
CSIDL_Type_User,
My_PicturesW,
- MAKEINTRESOURCEW(IDS_MYPICTURES),
+ NULL,
KF_CATEGORY_PERUSER, /* category */
My_PicturesW, /* name */
@@ -2073,7 +2051,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CommonTemplates,
CSIDL_Type_ProgramData,
Common_TemplatesW,
- Microsoft_Windows_TemplatesW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_TemplatesW, /* name */
@@ -2093,7 +2071,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicDocuments,
CSIDL_Type_AllUsers,
Common_DocumentsW,
- DocumentsW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_DocumentsW, /* name */
@@ -2113,7 +2091,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CommonAdminTools,
CSIDL_Type_ProgramData,
Common_Administrative_ToolsW,
- Microsoft_Windows_Start_Menu_Admin_ToolsW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
Common_Administrative_ToolsW, /* name */
@@ -2133,7 +2111,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_AdminTools,
CSIDL_Type_User,
Administrative_ToolsW,
- AppData_Roaming_Microsoft_Windows_Start_Menu_Programs_Administrative_ToolsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
Administrative_ToolsW, /* name */
@@ -2191,7 +2169,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicMusic,
CSIDL_Type_AllUsers,
CommonMusicW,
- MusicW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
CommonMusicW, /* name */
@@ -2211,7 +2189,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicPictures,
CSIDL_Type_AllUsers,
CommonPicturesW,
- PicturesW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
CommonPicturesW, /* name */
@@ -2231,7 +2209,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicVideos,
CSIDL_Type_AllUsers,
CommonVideoW,
- VideosW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
CommonVideoW, /* name */
@@ -2291,7 +2269,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CommonOEMLinks,
CSIDL_Type_ProgramData,
NULL,
- OEM_LinksW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
OEM_LinksW, /* name */
@@ -2311,7 +2289,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_CDBurning,
CSIDL_Type_User,
CD_BurningW,
- AppData_Local_Microsoft_Windows_Burn_BurnW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
CD_BurningW, /* name */
@@ -2429,7 +2407,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Contacts,
CSIDL_Type_User,
NULL,
- ContactsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
ContactsW, /* name */
@@ -2495,7 +2473,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Downloads,
CSIDL_Type_User,
NULL,
- DownloadsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
DownloadsW, /* name */
@@ -2615,7 +2593,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Links,
CSIDL_Type_User,
NULL,
- LinksW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
LinksW, /* name */
@@ -2635,7 +2613,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_LocalAppDataLow,
CSIDL_Type_User,
NULL,
- AppData_LocalLowW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
LocalAppDataLowW, /* name */
@@ -2695,7 +2673,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PhotoAlbums,
CSIDL_Type_User,
NULL,
- Pictures_Slide_ShowsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
PhotoAlbumsW, /* name */
@@ -2735,7 +2713,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_Playlists,
CSIDL_Type_User,
NULL,
- Music_PlaylistsW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
PlaylistsW, /* name */
@@ -2827,7 +2805,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicDownloads,
CSIDL_Type_AllUsers,
NULL,
- DownloadsW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
CommonDownloadsW, /* name */
@@ -2847,7 +2825,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicGameTasks,
CSIDL_Type_ProgramData,
NULL,
- Microsoft_Windows_GameExplorerW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
PublicGameTasksW, /* name */
@@ -2867,7 +2845,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicLibraries,
CSIDL_Type_AllUsers,
NULL,
- Microsoft_Windows_LibrariesW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
PublicLibrariesW, /* name */
@@ -2887,7 +2865,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_PublicRingtones,
CSIDL_Type_ProgramData,
NULL,
- Microsoft_Windows_RingtonesW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
CommonRingtonesW, /* name */
@@ -2967,7 +2945,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SampleMusic,
CSIDL_Type_AllUsers,
NULL,
- Music_Sample_MusicW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
SampleMusicW, /* name */
@@ -2987,7 +2965,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SamplePictures,
CSIDL_Type_AllUsers,
NULL,
- Pictures_Sample_PicturesW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
SamplePicturesW, /* name */
@@ -3007,7 +2985,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SamplePlaylists,
CSIDL_Type_AllUsers,
NULL,
- Music_Sample_PlaylistsW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
SamplePlaylistsW, /* name */
@@ -3027,7 +3005,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SampleVideos,
CSIDL_Type_AllUsers,
NULL,
- Videos_Sample_VideosW,
+ NULL,
KF_CATEGORY_COMMON, /* category */
SampleVideosW, /* name */
@@ -3047,7 +3025,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SavedGames,
CSIDL_Type_User,
NULL,
- Saved_GamesW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
SavedGamesW, /* name */
@@ -3067,7 +3045,7 @@ static const CSIDL_DATA CSIDL_Data[] =
&FOLDERID_SavedSearches,
CSIDL_Type_User,
NULL,
- SearchesW,
+ NULL,
KF_CATEGORY_PERUSER, /* category */
SearchesW, /* name */
@@ -3385,6 +3363,14 @@ static const CSIDL_DATA CSIDL_Data[] =
}
};
+static int csidl_from_id( const KNOWNFOLDERID *id )
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(CSIDL_Data); i++)
+ if (IsEqualGUID( CSIDL_Data[i].id, id )) return i;
+ return -1;
+}
+
static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest);
/* Gets the value named value from the registry key
@@ -3467,11 +3453,22 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix,
return hr;
}
+static void append_relative_path(BYTE folder, WCHAR *pszPath)
+{
+ if (CSIDL_Data[folder].pszRelativePath)
+ {
+ PathAddBackslashW(pszPath);
+ strcatW(pszPath, CSIDL_Data[folder].pszRelativePath);
+ }
+ else if (CSIDL_Data[folder].szDefaultPath)
+ {
+ PathAddBackslashW(pszPath);
+ strcatW(pszPath, CSIDL_Data[folder].szDefaultPath);
+ }
+}
+
/* Gets a 'semi-expanded' default value of the CSIDL with index folder into
* pszPath, based on the entries in CSIDL_Data. By semi-expanded, I mean:
- * - The entry's szDefaultPath may be either a string value or an integer
- * resource identifier. In the latter case, the string value of the resource
- * is written.
* - Depending on the entry's type, the path may begin with an (unexpanded)
* environment variable name. The caller is responsible for expanding
* environment strings if so desired.
@@ -3484,8 +3481,6 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix,
static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
{
HRESULT hr;
- WCHAR resourcePath[MAX_PATH];
- LPCWSTR pDefaultPath = NULL;
TRACE("0x%02x,%p\n", folder, pszPath);
@@ -3514,29 +3509,9 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
}
}
- if (CSIDL_Data[folder].szDefaultPath &&
- IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath))
- {
- if (LoadStringW(shell32_hInstance,
- LOWORD(CSIDL_Data[folder].szDefaultPath), resourcePath, MAX_PATH))
- {
- hr = S_OK;
- pDefaultPath = resourcePath;
- }
- else
- {
- FIXME("(%d,%s), LoadString failed, missing translation?\n", folder,
- debugstr_w(pszPath));
- hr = E_FAIL;
- }
- }
- else
- {
- hr = S_OK;
- pDefaultPath = CSIDL_Data[folder].szDefaultPath;
- }
- if (SUCCEEDED(hr))
+ if (IsEqualGUID(CSIDL_Data[folder].fidParent, &GUID_NULL))
{
+ /* hit the root, sub in env var */
switch (CSIDL_Data[folder].type)
{
case CSIDL_Type_User:
@@ -3554,12 +3529,15 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
default:
; /* no corresponding env. var, do nothing */
}
- if (pDefaultPath)
- {
- PathAddBackslashW(pszPath);
- strcatW(pszPath, pDefaultPath);
- }
+ hr = S_OK;
+ }else{
+ /* prepend with parent */
+ hr = _SHGetDefaultValue(csidl_from_id(CSIDL_Data[folder].fidParent), pszPath);
}
+
+ if (SUCCEEDED(hr))
+ append_relative_path(folder, pszPath);
+
TRACE("returning 0x%08x\n", hr);
return hr;
}
@@ -4519,35 +4497,17 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
break;
case CSIDL_Type_WindowsPath:
GetWindowsDirectoryW(szTemp, MAX_PATH);
- if (CSIDL_Data[folder].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) &&
- *CSIDL_Data[folder].szDefaultPath)
- {
- PathAddBackslashW(szTemp);
- strcatW(szTemp, CSIDL_Data[folder].szDefaultPath);
- }
+ append_relative_path(folder, szTemp);
hr = S_OK;
break;
case CSIDL_Type_SystemPath:
GetSystemDirectoryW(szTemp, MAX_PATH);
- if (CSIDL_Data[folder].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) &&
- *CSIDL_Data[folder].szDefaultPath)
- {
- PathAddBackslashW(szTemp);
- strcatW(szTemp, CSIDL_Data[folder].szDefaultPath);
- }
+ append_relative_path(folder, szTemp);
hr = S_OK;
break;
case CSIDL_Type_SystemX86Path:
if (!GetSystemWow64DirectoryW(szTemp, MAX_PATH)) GetSystemDirectoryW(szTemp, MAX_PATH);
- if (CSIDL_Data[folder].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) &&
- *CSIDL_Data[folder].szDefaultPath)
- {
- PathAddBackslashW(szTemp);
- strcatW(szTemp, CSIDL_Data[folder].szDefaultPath);
- }
+ append_relative_path(folder, szTemp);
hr = S_OK;
break;
case CSIDL_Type_CurrVer:
@@ -4707,12 +4667,7 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken,
else if (CSIDL_Data[folders[i]].type == CSIDL_Type_WindowsPath)
{
GetWindowsDirectoryW(path, MAX_PATH);
- if (CSIDL_Data[folders[i]].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folders[i]].szDefaultPath))
- {
- PathAddBackslashW(path);
- strcatW(path, CSIDL_Data[folders[i]].szDefaultPath);
- }
+ append_relative_path(folders[i], path);
}
else
hr = E_FAIL;
@@ -5118,14 +5073,6 @@ HRESULT WINAPI SHGetSpecialFolderLocation(
return hr;
}
-static int csidl_from_id( const KNOWNFOLDERID *id )
-{
- int i;
- for (i = 0; i < ARRAY_SIZE(CSIDL_Data); i++)
- if (IsEqualGUID( CSIDL_Data[i].id, id )) return i;
- return -1;
-}
-
/*************************************************************************
* SHGetKnownFolderPath [SHELL32.@]
*/
@@ -5165,35 +5112,17 @@ HRESULT WINAPI SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, DWORD flags, HANDLE t
break;
case CSIDL_Type_WindowsPath:
GetWindowsDirectoryW(tempW, MAX_PATH);
- if (CSIDL_Data[folder].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) &&
- *CSIDL_Data[folder].szDefaultPath)
- {
- PathAddBackslashW(tempW);
- strcatW(tempW, CSIDL_Data[folder].szDefaultPath);
- }
+ append_relative_path(folder, tempW);
hr = S_OK;
break;
case CSIDL_Type_SystemPath:
GetSystemDirectoryW(tempW, MAX_PATH);
- if (CSIDL_Data[folder].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) &&
- *CSIDL_Data[folder].szDefaultPath)
- {
- PathAddBackslashW(tempW);
- strcatW(tempW, CSIDL_Data[folder].szDefaultPath);
- }
+ append_relative_path(folder, tempW);
hr = S_OK;
break;
case CSIDL_Type_SystemX86Path:
if (!GetSystemWow64DirectoryW(tempW, MAX_PATH)) GetSystemDirectoryW(tempW, MAX_PATH);
- if (CSIDL_Data[folder].szDefaultPath &&
- !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) &&
- *CSIDL_Data[folder].szDefaultPath)
- {
- PathAddBackslashW(tempW);
- strcatW(tempW, CSIDL_Data[folder].szDefaultPath);
- }
+ append_relative_path(folder, tempW);
hr = S_OK;
break;
case CSIDL_Type_CurrVer:
--
2.31.1
2
2