pdcattr->ptlWindowOrg.x += XOffset;
pdcattr->ptlWindowOrg.y += YOffset;
- pdcattr->flXform |= PAGE_XLATE_CHANGED;
+ pdcattr->flXform |= PAGE_XLATE_CHANGED|DEVICE_TO_WORLD_INVALID;
DC_UnlockDc(dc);
pdcattr->flXform |= (PAGE_EXTENTS_CHANGED |
INVALIDATE_ATTRIBUTES |
DEVICE_TO_WORLD_INVALID);
-
-// DC_UpdateXforms(pdc);
}
// NtGdiSetLayout
}
/* Do we rotate or shear? */
- if (!(dc->dclevel.mxWorldToDevice.flAccel & XFORM_SCALE))
+ if (!(dc->pdcattr->mxWorldToDevice.flAccel & XFORM_SCALE))
{
POINTL DestCoords[4];
ULONG PolyCounts = 4;
pdcattr = dc->pdcattr;
- MatrixS2XForm(&xForm, &dc->dclevel.mxWorldToDevice);
+ MatrixS2XForm(&xForm, &dc->pdcattr->mxWorldToDevice);
eM11 = xForm.eM11;
hFont = pdcattr->hlfntNew;
{
FLOAT x, y;
XFORM xformWorld2Vport;
-
- MatrixS2XForm(&xformWorld2Vport, &dc->dclevel.mxWorldToDevice);
+
+ MatrixS2XForm(&xformWorld2Vport, &dc->pdcattr->mxWorldToDevice);
/* Perform the transformation */
x = point->x;
{
XFORMOBJ xo;
- XFORMOBJ_vInit(&xo, &pdc->dclevel.mxDeviceToWorld);
+ XFORMOBJ_vInit(&xo, &pdc->pdcattr->mxDeviceToWorld);
return XFORMOBJ_bApplyXform(&xo, XF_LTOL, count, (PPOINTL)ppt, (PPOINTL)ppt);
}
* tests show that resetting the graphics mode to GM_COMPATIBLE does
* not reset the world transform.
*/
- MatrixS2XForm(&xform, &dc->dclevel.mxWorldToPage);
+ MatrixS2XForm(&xform, &dc->pdcattr->mxWorldToPage);
/* Set MM_TEXT */
// IntGdiSetMapMode( dc, MM_TEXT );
szWindowExt = dc->pdcattr->szlWindowExt;
ptWindowOrg = dc->pdcattr->ptlWindowOrg;
- MatrixS2XForm(&xform, &dc->dclevel.mxWorldToPage);
+ MatrixS2XForm(&xform, &dc->pdcattr->mxWorldToPage);
/* Set MM_TEXT */
pdcattr->iMapMode = MM_TEXT;
pdcattr->ptlViewportOrg.y = ptViewportOrg.y;
/* Restore the world transform */
- XForm2MatrixS(&dc->dclevel.mxWorldToPage, &xform);
+ XForm2MatrixS(&dc->pdcattr->mxWorldToPage, &xform);
/* If we've moved the current point then get its new position
which will be in device (MM_TEXT) co-ords, convert it to
pmxDst->efM21 = pmxSrc->efM21;
FLOATOBJ_Div(&pmxDst->efM21, &foDet);
+ /* Calculate the inverted x shift: Dx' = -Dx * M11' - Dy * M21' */
+ pmxDst->efDx = pmxSrc->efDx;
+ FLOATOBJ_Neg(&pmxDst->efDx);
+ MulSub(&pmxDst->efDx, &pmxDst->efDx, &pmxDst->efM11, &pmxSrc->efDy, &pmxDst->efM21);
+
+ /* Calculate the inverted y shift: Dy' = -Dy * M22' - Dx * M12' */
+ pmxDst->efDy = pmxSrc->efDy;
+ FLOATOBJ_Neg(&pmxDst->efDy);
+ MulSub(&pmxDst->efDy, &pmxDst->efDy, &pmxDst->efM22, &pmxSrc->efDx, &pmxDst->efM12);
+
/* Update accelerators and return complexity */
return XFORMOBJ_UpdateAccel(pxoDst);
}