psurf,
&dc->eboFill.BrushObject,
Points,
- Count,
+ Count,
DestRect,
&BrushOrigin);
}
}
if (!PenWidth) PenWidth = 1;
- pbrush->ptPenWidth.x = PenWidth;
+ pbrush->ptPenWidth.x = PenWidth;
RectBounds.left = Left;
RectBounds.right = Right;
RectBounds.top = Top;
RectBounds.bottom = Bottom;
-
+
IntLPtoDP(dc, (LPPOINT)&RectBounds, 2);
-
+
RectBounds.left += dc->ptlDCOrig.x;
RectBounds.right += dc->ptlDCOrig.x;
RectBounds.top += dc->ptlDCOrig.y;
CenterX - RadiusX, CenterY + RadiusY, RadiusX*2, RadiusY*2);
pFillBrushObj = BRUSH_LockBrush(pdcattr->hbrush);
- if (NULL == pFillBrushObj)
+ if (NULL == pFillBrushObj)
{
DPRINT1("FillEllipse Fail\n");
SetLastWin32Error(ERROR_INTERNAL_ERROR);
return TRUE;
}
+ DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds,
+ NULL, dc->rosdc.CombinedClip->rclBounds);
+
+ if (dc->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+ DC_vUpdateFillBrush(dc);
+
+ if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+ DC_vUpdateLineBrush(dc);
+
/* Perform the actual work */
switch (iFunc)
{
}
/* Cleanup and return */
+ DC_vFinishBlit(dc, NULL);
DC_UnlockDc(dc);
ExFreePool(pTemp);
pdcattr = dc->pdcattr;
- /* Do we rotate or shear? */
- if (!(dc->dclevel.mxWorldToDevice.flAccel & MX_SCALE))
- {
-
- POINTL DestCoords[4];
- ULONG PolyCounts = 4;
- DestCoords[0].x = DestCoords[3].x = LeftRect;
- DestCoords[0].y = DestCoords[1].y = TopRect;
- DestCoords[1].x = DestCoords[2].x = RightRect;
- DestCoords[2].y = DestCoords[3].y = BottomRect;
- // Use IntGdiPolyPolygon so to support PATH.
- return IntGdiPolyPolygon(dc, DestCoords, &PolyCounts, 1);
- }
// Rectangle Path only.
if ( PATH_IsPathOpen(dc->dclevel) )
{
DestRect.bottom--;
}
+ DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
+
if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
DC_vUpdateFillBrush(dc);
ret = FALSE;
goto cleanup;
}
+
psurf = dc->dclevel.pSurface;
if (!psurf)
{
}
cleanup:
+ DC_vFinishBlit(dc, NULL);
+
/* Move current position in DC?
MSDN: The current position is neither used nor updated by Rectangle. */
return TRUE;
}
- ret = IntRectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
- DC_UnlockDc ( dc );
+ /* Do we rotate or shear? */
+ if (!(dc->dclevel.mxWorldToDevice.flAccel & MX_SCALE))
+ {
+ POINTL DestCoords[4];
+ ULONG PolyCounts = 4;
+
+ DestCoords[0].x = DestCoords[3].x = LeftRect;
+ DestCoords[0].y = DestCoords[1].y = TopRect;
+ DestCoords[1].x = DestCoords[2].x = RightRect;
+ DestCoords[2].y = DestCoords[3].y = BottomRect;
+ // Use IntGdiPolyPolygon so to support PATH.
+ ret = IntGdiPolyPolygon(dc, DestCoords, &PolyCounts, 1);
+ }
+ else
+ {
+ ret = IntRectangle(dc, LeftRect, TopRect, RightRect, BottomRect );
+ }
+
+ DC_UnlockDc(dc);
return ret;
}
}
if (!PenWidth) PenWidth = 1;
- pbrushLine->ptPenWidth.x = PenWidth;
+ pbrushLine->ptPenWidth.x = PenWidth;
RectBounds.left = Left;
RectBounds.top = Top;
RectBounds.bottom += dc->ptlDCOrig.y;
pbrushFill = BRUSH_LockBrush(pdcattr->hbrush);
- if (NULL == pbrushFill)
+ if (NULL == pbrushFill)
{
DPRINT1("FillRound Fail\n");
SetLastWin32Error(ERROR_INTERNAL_ERROR);
ret = FALSE;
- }
+ }
else
{
RtlCopyMemory(&brushTemp, pbrushFill, sizeof(brushTemp));
{
PDC pdc;
SURFACE *psurf;
- PPALETTE ppal;
EXLATEOBJ exlo;
RECTL rclExtent;
POINTL ptlDitherOrg;
ULONG i;
BOOL bRet;
- HPALETTE hDestPalette;
- /* Check parameters */
- if (ulMode == GRADIENT_FILL_TRIANGLE)
+ /* check parameters */
+ if (ulMode & GRADIENT_FILL_TRIANGLE)
{
PGRADIENT_TRIANGLE pTriangle = (PGRADIENT_TRIANGLE)pMesh;
/* Lock the output DC */
pdc = DC_LockDc(hdc);
- if (!pdc)
+ if(!pdc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- if (pdc->dctype == DC_TYPE_INFO)
+ if(pdc->dctype == DC_TYPE_INFO)
{
DC_UnlockDc(pdc);
/* Yes, Windows really returns TRUE in this case */
}
psurf = pdc->dclevel.pSurface;
- if (!psurf)
+ if(!psurf)
{
/* Memory DC with no surface selected */
DC_UnlockDc(pdc);
- return TRUE; // CHECKME
+ return TRUE; //CHECKME
}
/* calculate extent */
rclExtent.top = min(rclExtent.top, (pVertex + i)->y);
rclExtent.bottom = max(rclExtent.bottom, (pVertex + i)->y);
}
-
IntLPtoDP(pdc, (LPPOINT)&rclExtent, 2);
+
rclExtent.left += pdc->ptlDCOrig.x;
rclExtent.right += pdc->ptlDCOrig.x;
rclExtent.top += pdc->ptlDCOrig.y;
ptlDitherOrg.x = ptlDitherOrg.y = 0;
IntLPtoDP(pdc, (LPPOINT)&ptlDitherOrg, 1);
+
ptlDitherOrg.x += pdc->ptlDCOrig.x;
ptlDitherOrg.y += pdc->ptlDCOrig.y;
- hDestPalette = psurf->hDIBPalette;
- if (!hDestPalette) hDestPalette = pPrimarySurface->devinfo.hpalDefault;
-
- ppal = PALETTE_LockPalette(hDestPalette);
- EXLATEOBJ_vInitialize(&exlo, &gpalRGB, ppal, 0, 0, 0);
+ EXLATEOBJ_vInitialize(&exlo, &gpalRGB, psurf->ppal, 0, 0, 0);
ASSERT(pdc->rosdc.CombinedClip);
+ DC_vPrepareDCsForBlit(pdc, rclExtent, NULL, rclExtent);
+
bRet = IntEngGradientFill(&psurf->SurfObj,
- pdc->rosdc.CombinedClip,
- &exlo.xlo,
- pVertex,
- nVertex,
- pMesh,
- nMesh,
- &rclExtent,
- &ptlDitherOrg,
- ulMode);
+ pdc->rosdc.CombinedClip,
+ &exlo.xlo,
+ pVertex,
+ nVertex,
+ pMesh,
+ nMesh,
+ &rclExtent,
+ &ptlDitherOrg,
+ ulMode);
EXLATEOBJ_vCleanup(&exlo);
-
- if (ppal)
- PALETTE_UnlockPalette(ppal);
-
+ DC_vFinishBlit(pdc, NULL);
DC_UnlockDc(pdc);
return bRet;
return FALSE;
}
- cbVertex = nVertex * sizeof(TRIVERTEX);
- if (cbVertex + cbMesh <= cbVertex)
+ cbVertex = nVertex * sizeof(TRIVERTEX) ;
+ if(cbVertex + cbMesh <= cbVertex)
{
/* Overflow */
- return FALSE;
+ return FALSE ;
}
/* Allocate a kernel mode buffer */
SafeVertex = ExAllocatePoolWithTag(PagedPool, cbVertex + cbMesh, TAG_SHAPE);
- if (!SafeVertex)
+ if(!SafeVertex)
{
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
PDC dc;
PDC_ATTR pdcattr;
SURFACE *psurf = NULL;
- HPALETTE hpal;
- PPALETTE ppal;
EXLATEOBJ exlo;
BOOL Ret = FALSE;
RECTL DestRect;
goto cleanup;
}
- hpal = dc->dclevel.pSurface->hDIBPalette;
- if (!hpal) hpal = pPrimarySurface->devinfo.hpalDefault;
- ppal = PALETTE_ShareLockPalette(hpal);
-
- EXLATEOBJ_vInitialize(&exlo, &gpalRGB, ppal, 0, 0xffffff, 0);
+ EXLATEOBJ_vInitialize(&exlo, &gpalRGB, psurf->ppal, 0, 0xffffff, 0);
/* Only solid fills supported for now
* How to support pattern brushes and non standard surfaces (not offering dib functions):
Ret = DIB_XXBPP_FloodFillSolid(&psurf->SurfObj, &dc->eboFill.BrushObject, &DestRect, &Pt, ConvColor, FillType);
EXLATEOBJ_vCleanup(&exlo);
- PALETTE_ShareUnlockPalette(ppal);
cleanup:
DC_UnlockDc(dc);