if (dstp)
{
- color ^= color;
- WriteColor(dstp, hdcDest->format, color);
+ UINT32 dstColor = ReadColor(dstp, hdcDest->format);
+ dstColor ^= color;
+ WriteColor(dstp, hdcDest->format, dstColor);
}
}
}
#include <freerdp/gdi/region.h>
+#include <freerdp/log.h>
+
+#define TAG FREERDP_TAG("gdi.region")
+
/**
* Create a region from rectangular coordinates.\n
* @msdn{dd183514}
if (w > 0)
rect->right = x + w - 1;
else
- WLog_ERR("xxxxxx", "");
+ WLog_ERR(TAG, "Invalid width");
if (h > 0)
rect->bottom = y + h - 1;
else
- WLog_ERR("xxxxxx", "");
+ WLog_ERR(TAG, "Invalid height");
}
/**
{
*left = x;
*top = y;
- *right = x + w - 1;
- *bottom = y + h - 1;
+ *right = 0;
+
+ if (w > 0)
+ *right = x + w - 1;
+ else
+ WLog_ERR(TAG, "Invalid width");
+
+ *bottom = 0;
+
+ if (h > 0)
+ *bottom = y + h - 1;
+ else
+ WLog_ERR(TAG, "Invalid height");
}
/**