// Get/SetBounds/Rect support.
#define DCB_WINDOWMGR 0x8000 // Queries the Windows bounding rectangle instead of the application's
+ /* DCPATH flPath */
+#define DCPATH_ACTIVE 0x0001
+#define DCPATH_SAVE 0x0002
+#define DCPATH_CLOCKWISE 0x0004
+
/* DC flags */
#define DC_SAVED 0x0002 /* It is a saved DC */
#define DC_DIRTY 0x0004 /* hVisRgn has to be updated */
switch (u)
{
case GdtGetSetCopyCount:
+ SafeResult = dc->ulCopyCount;
+ dc->ulCopyCount = dwIn;
break;
case GdiGetSetTextAlign:
SafeResult = Dc_Attr->lTextAlign;
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
Ret = FALSE;
+ break;
}
- SafeResult = dc->w.ArcDirection;
- dc->w.ArcDirection = dwIn;
+ if ( Dc_Attr->dwLayout & LAYOUT_RTL )
+ {
+ SafeResult = AD_CLOCKWISE - ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0);
+ if ( dwIn == AD_CLOCKWISE )
+ {
+ dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+ break;
+ }
+ dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
+ }
+ else
+ {
+ SafeResult = ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0) + AD_COUNTERCLOCKWISE;
+ if ( dwIn == AD_COUNTERCLOCKWISE)
+ {
+ dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+ break;
+ }
+ dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
+ }
+
+ SafeResult = dc->w.ArcDirection; // Fixme
+ dc->w.ArcDirection = dwIn; // Fixme
break;
default:
SetLastWin32Error(ERROR_INVALID_PARAMETER);