#include <win32k.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
#define NDEBUG
#include <debug.h>
static
BOOL
FASTCALL
-IntArc( DC *dc,
+IntArc( DC *dc,
int Left,
int Top,
int Right,
{
PDC_ATTR pdcattr;
RECTL RectBounds, RectSEpts;
- PBRUSH pbrushPen;
+ PBRUSH pbrPen;
SURFACE *psurf;
BOOL ret = TRUE;
LONG PenWidth, PenOrigWidth;
pdcattr = dc->pdcattr;
- pbrushPen = PEN_LockPen(pdcattr->hpen);
- if (!pbrushPen)
+ pbrPen = PEN_ShareLockPen(pdcattr->hpen);
+ if (!pbrPen)
{
DPRINT1("Arc Fail 1\n");
- SetLastWin32Error(ERROR_INTERNAL_ERROR);
+ EngSetLastError(ERROR_INTERNAL_ERROR);
return FALSE;
}
- PenOrigWidth = PenWidth = pbrushPen->ptPenWidth.x;
- if (pbrushPen->ulPenStyle == PS_NULL) PenWidth = 0;
+ PenOrigWidth = PenWidth = pbrPen->ptPenWidth.x;
+ if (pbrPen->ulPenStyle == PS_NULL) PenWidth = 0;
- if (pbrushPen->ulPenStyle == PS_INSIDEFRAME)
+ if (pbrPen->ulPenStyle == PS_INSIDEFRAME)
{
if (2*PenWidth > (Right - Left)) PenWidth = (Right -Left + 1)/2;
if (2*PenWidth > (Bottom - Top)) PenWidth = (Bottom -Top + 1)/2;
}
if (!PenWidth) PenWidth = 1;
- pbrushPen->ptPenWidth.x = PenWidth;
+ pbrPen->ptPenWidth.x = PenWidth;
RectBounds.left = Left;
RectBounds.right = Right;
IntLPtoDP(dc, (LPPOINT)&RectBounds, 2);
IntLPtoDP(dc, (LPPOINT)&RectSEpts, 2);
-
+
RectBounds.left += dc->ptlDCOrig.x;
RectBounds.right += dc->ptlDCOrig.x;
RectBounds.top += dc->ptlDCOrig.y;
AngleStart,
AngleEnd,
arctype,
- pbrushPen);
+ pbrPen);
psurf = dc->dclevel.pSurface;
if (NULL == psurf)
{
DPRINT1("Arc Fail 2\n");
- PEN_UnlockPen(pbrushPen);
- SetLastWin32Error(ERROR_INTERNAL_ERROR);
+ PEN_ShareUnlockPen(pbrPen);
+ EngSetLastError(ERROR_INTERNAL_ERROR);
return FALSE;
}
}
if (arctype == GdiTypeChord)
PUTLINE(EfCx + CenterX, EfCy + CenterY, SfCx + CenterX, SfCy + CenterY, dc->eboLine);
-
- pbrushPen->ptPenWidth.x = PenOrigWidth;
- PEN_UnlockPen(pbrushPen);
+
+ pbrPen->ptPenWidth.x = PenOrigWidth;
+ PEN_ShareUnlockPen(pbrPen);
DPRINT("IntArc Exit.\n");
return ret;
}
pdcattr = dc->pdcattr;
- if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
- DC_vUpdateFillBrush(dc);
-
- if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
- DC_vUpdateLineBrush(dc);
-
if (arctype == GdiTypeArcTo)
{
if (dc->dclevel.flPath & DCPATH_CLOCKWISE)
pDC = DC_LockDc (hDC);
if(!pDC)
{
- SetLastWin32Error(ERROR_INVALID_HANDLE);
+ EngSetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pDC->dctype == DC_TYPE_INFO)
}
worker.l = dwStartAngle;
worker1.l = dwSweepAngle;
+ DC_vPrepareDCsForBlit(pDC, pDC->rosdc.CombinedClip->rclBounds,
+ NULL, pDC->rosdc.CombinedClip->rclBounds);
+ if (pDC->pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
+ DC_vUpdateFillBrush(pDC);
+ if (pDC->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
+ DC_vUpdateLineBrush(pDC);
Ret = IntGdiAngleArc( pDC, x, y, dwRadius, worker.f, worker1.f);
+ DC_vFinishBlit(pDC, NULL);
DC_UnlockDc( pDC );
return Ret;
}
dc = DC_LockDc (hDC);
if(!dc)
{
- SetLastWin32Error(ERROR_INVALID_HANDLE);
+ EngSetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (dc->dctype == DC_TYPE_INFO)
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);
+
Ret = IntGdiArcInternal(
arctype,
dc,
XEndArc,
YEndArc);
+ DC_vFinishBlit(dc, NULL);
DC_UnlockDc( dc );
return Ret;
}