ReactOS  0.4.15-dev-5131-g311fcc6
line.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Win32k Subsystem
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: win32ss/gdi/ntgdi/line.c
5  * PURPOSE: Line functions
6  * PROGRAMMERS: ...
7  */
8 
9 #include <win32k.h>
10 
11 #define NDEBUG
12 #include <debug.h>
13 
14 // Some code from the WINE project source (www.winehq.com)
15 
18 {
19  DWORD join, endcap;
20  RECTL bounds, rect;
21  LONG lWidth;
22  PBRUSH pbrLine;
23 
24  /* Get BRUSH from current pen. */
25  pbrLine = dc->dclevel.pbrLine;
26  ASSERT(pbrLine);
27 
28  lWidth = 0;
29 
30  // Setup bounds
31  bounds.left = bounds.top = INT_MAX;
32  bounds.right = bounds.bottom = INT_MIN;
33 
34  if (((pbrLine->ulPenStyle & PS_TYPE_MASK) & PS_GEOMETRIC) || pbrLine->lWidth > 1)
35  {
36  /* Windows uses some heuristics to estimate the distance from the point that will be painted */
37  lWidth = pbrLine->lWidth + 2;
38  endcap = (PS_ENDCAP_MASK & pbrLine->ulPenStyle);
39  join = (PS_JOIN_MASK & pbrLine->ulPenStyle);
40  if (join == PS_JOIN_MITER)
41  {
42  lWidth *= 5;
43  if (endcap == PS_ENDCAP_SQUARE) lWidth = (lWidth * 3 + 1) / 2;
44  }
45  else
46  {
47  if (endcap == PS_ENDCAP_SQUARE) lWidth -= lWidth / 4;
48  else lWidth = (lWidth + 1) / 2;
49  }
50  }
51 
52  while (count-- > 0)
53  {
54  rect.left = points->x - lWidth;
55  rect.top = points->y - lWidth;
56  rect.right = points->x + lWidth + 1;
57  rect.bottom = points->y + lWidth + 1;
58  RECTL_bUnionRect(&bounds, &bounds, &rect);
59  points++;
60  }
61 
62  DPRINT("APLB dc %p l %d t %d\n",dc,rect.left,rect.top);
63  DPRINT(" r %d b %d\n",rect.right,rect.bottom);
64 
65  {
66  RECTL rcRgn = dc->erclClip; // Use the clip box for now.
67 
68  if (RECTL_bIntersectRect( &rcRgn, &rcRgn, &bounds ))
69  IntUpdateBoundsRect(dc, &rcRgn);
70  else
71  IntUpdateBoundsRect(dc, &bounds);
72  }
73 }
74 
75 // Should use Fx in Point
76 //
79  int X,
80  int Y,
81  LPPOINT Point)
82 {
83  PDC_ATTR pdcattr = dc->pdcattr;
84  if ( Point )
85  {
86  if ( pdcattr->ulDirty_ & DIRTY_PTLCURRENT ) // Double hit!
87  {
88  Point->x = pdcattr->ptfxCurrent.x; // ret prev before change.
89  Point->y = pdcattr->ptfxCurrent.y;
90  IntDPtoLP ( dc, Point, 1); // Reconvert back.
91  }
92  else
93  {
94  Point->x = pdcattr->ptlCurrent.x;
95  Point->y = pdcattr->ptlCurrent.y;
96  }
97  }
98  pdcattr->ptlCurrent.x = X;
99  pdcattr->ptlCurrent.y = Y;
100  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
101  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
103 
104  return TRUE;
105 }
106 
109  INT x,
110  INT y,
111  LPPOINT pptOut)
112 {
113  BOOL Ret;
114  PDC dc;
115  if (!(dc = DC_LockDc(hdc)))
116  {
118  return FALSE;
119  }
120  Ret = IntGdiMoveToEx(dc, x, y, pptOut);
121  DC_UnlockDc(dc);
122  return Ret;
123 }
124 
125 // Should use Fx in pt
126 //
129 {
130  PDC_ATTR pdcattr = dc->pdcattr;
131 
132  if ( pt )
133  {
134  if (pdcattr->ulDirty_ & DIRTY_PTFXCURRENT)
135  {
136  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
137  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
139  }
140  pt->x = pdcattr->ptlCurrent.x;
141  pt->y = pdcattr->ptlCurrent.y;
142  }
143 }
144 
147  int XEnd,
148  int YEnd)
149 {
150  SURFACE *psurf;
151  BOOL Ret = TRUE;
152  PBRUSH pbrLine;
153  RECTL Bounds;
154  POINT Points[2];
155  PDC_ATTR pdcattr;
156  PPATH pPath;
157 
159 
160  pdcattr = dc->pdcattr;
161 
162  if (PATH_IsPathOpen(dc->dclevel))
163  {
164  Ret = PATH_LineTo(dc, XEnd, YEnd);
165  }
166  else
167  {
168  psurf = dc->dclevel.pSurface;
169  if (NULL == psurf)
170  {
172  return FALSE;
173  }
174 
175  Points[0].x = pdcattr->ptlCurrent.x;
176  Points[0].y = pdcattr->ptlCurrent.y;
177  Points[1].x = XEnd;
178  Points[1].y = YEnd;
179 
180  IntLPtoDP(dc, Points, 2);
181 
182  /* The DCOrg is in device coordinates */
183  Points[0].x += dc->ptlDCOrig.x;
184  Points[0].y += dc->ptlDCOrig.y;
185  Points[1].x += dc->ptlDCOrig.x;
186  Points[1].y += dc->ptlDCOrig.y;
187 
188  Bounds.left = min(Points[0].x, Points[1].x);
189  Bounds.top = min(Points[0].y, Points[1].y);
190  Bounds.right = max(Points[0].x, Points[1].x);
191  Bounds.bottom = max(Points[0].y, Points[1].y);
192 
193  /* Get BRUSH from current pen. */
194  pbrLine = dc->dclevel.pbrLine;
195  ASSERT(pbrLine);
196 
197  if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR))
198  {
199  DPRINT("Bounds dc %p l %d t %d\n",dc,Bounds.left,Bounds.top);
200  DPRINT(" r %d b %d\n",Bounds.right,Bounds.bottom);
201  AddPenLinesBounds(dc, 2, Points);
202  }
203 
204  if (!(pbrLine->flAttrs & BR_IS_NULL))
205  {
206  if (IntIsEffectiveWidePen(pbrLine))
207  {
208  /* Clear the path */
209  PATH_Delete(dc->dclevel.hPath);
210  dc->dclevel.hPath = NULL;
211 
212  /* Begin a path */
213  pPath = PATH_CreatePath(2);
214  dc->dclevel.flPath |= DCPATH_ACTIVE;
215  dc->dclevel.hPath = pPath->BaseObject.hHmgr;
216  IntGetCurrentPositionEx(dc, &pPath->pos);
217  IntLPtoDP(dc, &pPath->pos, 1);
218 
219  PATH_MoveTo(dc, pPath);
220  PATH_LineTo(dc, XEnd, YEnd);
221 
222  /* Close the path */
223  pPath->state = PATH_Closed;
224  dc->dclevel.flPath &= ~DCPATH_ACTIVE;
225 
226  /* Actually stroke a path */
227  Ret = PATH_StrokePath(dc, pPath);
228 
229  /* Clear the path */
230  PATH_UnlockPath(pPath);
231  PATH_Delete(dc->dclevel.hPath);
232  dc->dclevel.hPath = NULL;
233  }
234  else
235  {
236  Ret = IntEngLineTo(&psurf->SurfObj,
237  (CLIPOBJ *)&dc->co,
238  &dc->eboLine.BrushObject,
239  Points[0].x, Points[0].y,
240  Points[1].x, Points[1].y,
241  &Bounds,
242  ROP2_TO_MIX(pdcattr->jROP2));
243  }
244  }
245  }
246 
247  if (Ret)
248  {
249  pdcattr->ptlCurrent.x = XEnd;
250  pdcattr->ptlCurrent.y = YEnd;
251  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
252  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
254  }
255 
256  return Ret;
257 }
258 
261  LPPOINT pt,
262  DWORD Count)
263 {
264  BOOL ret = FALSE; // Default to FAILURE
265 
266  if ( PATH_IsPathOpen(dc->dclevel) )
267  {
268  return PATH_PolyBezier ( dc, pt, Count );
269  }
270 
271  /* We'll convert it into line segments and draw them using Polyline */
272  {
273  POINT *Pts;
274  INT nOut;
275 
276  Pts = GDI_Bezier ( pt, Count, &nOut );
277  if ( Pts )
278  {
279  ret = IntGdiPolyline(dc, Pts, nOut);
281  }
282  }
283 
284  return ret;
285 }
286 
289  LPPOINT pt,
290  DWORD Count)
291 {
292  BOOL ret = FALSE; // Default to failure
293  PDC_ATTR pdcattr = dc->pdcattr;
294 
295  if ( PATH_IsPathOpen(dc->dclevel) )
296  ret = PATH_PolyBezierTo ( dc, pt, Count );
297  else /* We'll do it using PolyBezier */
298  {
299  POINT *npt;
301  sizeof(POINT) * (Count + 1),
302  TAG_BEZIER);
303  if ( npt )
304  {
305  npt[0].x = pdcattr->ptlCurrent.x;
306  npt[0].y = pdcattr->ptlCurrent.y;
307  memcpy(npt + 1, pt, sizeof(POINT) * Count);
308  ret = IntGdiPolyBezier(dc, npt, Count+1);
310  }
311  }
312  if ( ret )
313  {
314  pdcattr->ptlCurrent.x = pt[Count-1].x;
315  pdcattr->ptlCurrent.y = pt[Count-1].y;
316  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
317  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
319  }
320 
321  return ret;
322 }
323 
326  LPPOINT pt,
327  int Count)
328 {
329  SURFACE *psurf;
330  BRUSH *pbrLine;
331  LPPOINT Points;
332  BOOL Ret = TRUE;
333  LONG i;
334  PDC_ATTR pdcattr = dc->pdcattr;
335  PPATH pPath;
336 
337  if (!dc->dclevel.pSurface)
338  {
339  return TRUE;
340  }
341 
343  psurf = dc->dclevel.pSurface;
344 
345  /* Get BRUSHOBJ from current pen. */
346  pbrLine = dc->dclevel.pbrLine;
347  ASSERT(pbrLine);
348 
349  if (!(pbrLine->flAttrs & BR_IS_NULL))
350  {
351  Points = EngAllocMem(0, Count * sizeof(POINT), GDITAG_TEMP);
352  if (Points != NULL)
353  {
354  RtlCopyMemory(Points, pt, Count * sizeof(POINT));
355  IntLPtoDP(dc, Points, Count);
356 
357  /* Offset the array of points by the DC origin */
358  for (i = 0; i < Count; i++)
359  {
360  Points[i].x += dc->ptlDCOrig.x;
361  Points[i].y += dc->ptlDCOrig.y;
362  }
363 
364  if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR))
365  {
366  AddPenLinesBounds(dc, Count, Points);
367  }
368 
369  if (IntIsEffectiveWidePen(pbrLine))
370  {
371  /* Clear the path */
372  PATH_Delete(dc->dclevel.hPath);
373  dc->dclevel.hPath = NULL;
374 
375  /* Begin a path */
376  pPath = PATH_CreatePath(Count);
377  dc->dclevel.flPath |= DCPATH_ACTIVE;
378  dc->dclevel.hPath = pPath->BaseObject.hHmgr;
379  pPath->pos = pt[0];
380  IntLPtoDP(dc, &pPath->pos, 1);
381 
382  PATH_MoveTo(dc, pPath);
383  for (i = 1; i < Count; ++i)
384  {
385  PATH_LineTo(dc, pt[i].x, pt[i].y);
386  }
387 
388  /* Close the path */
389  pPath->state = PATH_Closed;
390  dc->dclevel.flPath &= ~DCPATH_ACTIVE;
391 
392  /* Actually stroke a path */
393  Ret = PATH_StrokePath(dc, pPath);
394 
395  /* Clear the path */
396  PATH_UnlockPath(pPath);
397  PATH_Delete(dc->dclevel.hPath);
398  dc->dclevel.hPath = NULL;
399  }
400  else
401  {
402  Ret = IntEngPolyline(&psurf->SurfObj,
403  (CLIPOBJ *)&dc->co,
404  &dc->eboLine.BrushObject,
405  Points,
406  Count,
407  ROP2_TO_MIX(pdcattr->jROP2));
408  }
409  EngFreeMem(Points);
410  }
411  else
412  {
413  Ret = FALSE;
414  }
415  }
416 
418 
419  return Ret;
420 }
421 
424  LPPOINT pt,
425  DWORD Count)
426 {
427  BOOL ret = FALSE; // Default to failure
428  PDC_ATTR pdcattr = dc->pdcattr;
429 
430  if (PATH_IsPathOpen(dc->dclevel))
431  {
433  }
434  else /* Do it using Polyline */
435  {
437  sizeof(POINT) * (Count + 1),
438  TAG_SHAPE);
439  if ( pts )
440  {
441  pts[0].x = pdcattr->ptlCurrent.x;
442  pts[0].y = pdcattr->ptlCurrent.y;
443  memcpy( pts + 1, pt, sizeof(POINT) * Count);
444  ret = IntGdiPolyline(dc, pts, Count + 1);
446  }
447  }
448  if ( ret )
449  {
450  pdcattr->ptlCurrent.x = pt[Count-1].x;
451  pdcattr->ptlCurrent.y = pt[Count-1].y;
452  pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
453  CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
455  }
456 
457  return ret;
458 }
459 
460 
463  LPPOINT pt,
464  PULONG PolyPoints,
465  DWORD Count)
466 {
467  ULONG i;
468  LPPOINT pts;
469  PULONG pc;
470  BOOL ret = FALSE; // Default to failure
471  pts = pt;
472  pc = PolyPoints;
473 
474  if (PATH_IsPathOpen(dc->dclevel))
475  {
476  return PATH_PolyPolyline( dc, pt, PolyPoints, Count );
477  }
478  for (i = 0; i < Count; i++)
479  {
480  ret = IntGdiPolyline ( dc, pts, *pc );
481  if (ret == FALSE)
482  {
483  return ret;
484  }
485  pts+=*pc++;
486  }
487 
488  return ret;
489 }
490 
491 /******************************************************************************/
492 
493 BOOL
494 APIENTRY
496  int XEnd,
497  int YEnd)
498 {
499  DC *dc;
500  BOOL Ret;
501  RECT rcLockRect ;
502 
503  dc = DC_LockDc(hDC);
504  if (!dc)
505  {
507  return FALSE;
508  }
509 
510  rcLockRect.left = dc->pdcattr->ptlCurrent.x;
511  rcLockRect.top = dc->pdcattr->ptlCurrent.y;
512  rcLockRect.right = XEnd;
513  rcLockRect.bottom = YEnd;
514 
515  IntLPtoDP(dc, (PPOINT)&rcLockRect, 2);
516 
517  /* The DCOrg is in device coordinates */
518  rcLockRect.left += dc->ptlDCOrig.x;
519  rcLockRect.top += dc->ptlDCOrig.y;
520  rcLockRect.right += dc->ptlDCOrig.x;
521  rcLockRect.bottom += dc->ptlDCOrig.y;
522 
523  DC_vPrepareDCsForBlit(dc, &rcLockRect, NULL, NULL);
524 
525  Ret = IntGdiLineTo(dc, XEnd, YEnd);
526 
528 
529  DC_UnlockDc(dc);
530  return Ret;
531 }
532 
533 // FIXME: This function is completely broken
534 BOOL
535 APIENTRY
537  IN HDC hdc,
538  IN LPPOINT lppt,
539  IN LPBYTE lpbTypes,
540  IN ULONG cCount)
541 {
542  PDC dc;
543  PDC_ATTR pdcattr;
544  POINT bzr[4];
545  volatile PPOINT line_pts, line_pts_old, bzr_pts;
546  INT num_pts, num_bzr_pts, space, space_old, size;
547  ULONG i;
548  BOOL result = FALSE;
549 
550  dc = DC_LockDc(hdc);
551  if (!dc) return FALSE;
552  pdcattr = dc->pdcattr;
553 
554  if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
556 
557  if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
559 
560  if (!cCount)
561  {
562  DC_UnlockDc(dc);
563  return TRUE;
564  }
565 
566  line_pts = NULL;
567  line_pts_old = NULL;
568  bzr_pts = NULL;
569 
570  _SEH2_TRY
571  {
572  ProbeArrayForRead(lppt, sizeof(POINT), cCount, sizeof(LONG));
573  ProbeArrayForRead(lpbTypes, sizeof(BYTE), cCount, sizeof(BYTE));
574 
575  if (PATH_IsPathOpen(dc->dclevel))
576  {
577  result = PATH_PolyDraw(dc, (const POINT *)lppt, (const BYTE *)lpbTypes, cCount);
578  _SEH2_LEAVE;
579  }
580 
581  /* Check for valid point types */
582  for (i = 0; i < cCount; i++)
583  {
584  switch (lpbTypes[i])
585  {
586  case PT_MOVETO:
587  case PT_LINETO | PT_CLOSEFIGURE:
588  case PT_LINETO:
589  break;
590  case PT_BEZIERTO:
591  if((i + 2 < cCount) && (lpbTypes[i + 1] == PT_BEZIERTO) &&
592  ((lpbTypes[i + 2] & ~PT_CLOSEFIGURE) == PT_BEZIERTO))
593  {
594  i += 2;
595  break;
596  }
597  default:
598  _SEH2_LEAVE;
599  }
600  }
601 
602  space = cCount + 300;
603  line_pts = ExAllocatePoolWithTag(PagedPool, space * sizeof(POINT), TAG_SHAPE);
604  if (line_pts == NULL)
605  {
606  result = FALSE;
607  _SEH2_LEAVE;
608  }
609 
610  num_pts = 1;
611 
612  line_pts[0].x = pdcattr->ptlCurrent.x;
613  line_pts[0].y = pdcattr->ptlCurrent.y;
614 
615  for ( i = 0; i < cCount; i++ )
616  {
617  switch (lpbTypes[i])
618  {
619  case PT_MOVETO:
620  if (num_pts >= 2) IntGdiPolyline( dc, line_pts, num_pts );
621  num_pts = 0;
622  line_pts[num_pts++] = lppt[i];
623  break;
624  case PT_LINETO:
625  case (PT_LINETO | PT_CLOSEFIGURE):
626  line_pts[num_pts++] = lppt[i];
627  break;
628  case PT_BEZIERTO:
629  bzr[0].x = line_pts[num_pts - 1].x;
630  bzr[0].y = line_pts[num_pts - 1].y;
631  RtlCopyMemory( &bzr[1], &lppt[i], 3 * sizeof(POINT) );
632 
633  if ((bzr_pts = GDI_Bezier( bzr, 4, &num_bzr_pts )))
634  {
635  size = num_pts + (cCount - i) + num_bzr_pts;
636  if (space < size)
637  {
638  space_old = space;
639  space = size * 2;
640  line_pts_old = line_pts;
641  line_pts = ExAllocatePoolWithTag(PagedPool, space * sizeof(POINT), TAG_SHAPE);
642  if (!line_pts) _SEH2_LEAVE;
643  RtlCopyMemory(line_pts, line_pts_old, space_old * sizeof(POINT));
644  ExFreePoolWithTag(line_pts_old, TAG_SHAPE);
645  line_pts_old = NULL;
646  }
647  RtlCopyMemory( &line_pts[num_pts], &bzr_pts[1], (num_bzr_pts - 1) * sizeof(POINT) );
648  num_pts += num_bzr_pts - 1;
649  ExFreePoolWithTag(bzr_pts, TAG_BEZIER);
650  bzr_pts = NULL;
651  }
652  i += 2;
653  break;
654  }
655  if (lpbTypes[i] & PT_CLOSEFIGURE) line_pts[num_pts++] = line_pts[0];
656  }
657 
658  if (num_pts >= 2) IntGdiPolyline( dc, line_pts, num_pts );
659  IntGdiMoveToEx( dc, line_pts[num_pts - 1].x, line_pts[num_pts - 1].y, NULL );
660  result = TRUE;
661  }
663  {
665  }
666  _SEH2_END;
667 
668  if (line_pts != NULL)
669  {
670  ExFreePoolWithTag(line_pts, TAG_SHAPE);
671  }
672 
673  if ((line_pts_old != NULL) && (line_pts_old != line_pts))
674  {
675  ExFreePoolWithTag(line_pts_old, TAG_SHAPE);
676  }
677 
678  if (bzr_pts != NULL)
679  {
680  ExFreePoolWithTag(bzr_pts, TAG_BEZIER);
681  }
682 
683  DC_UnlockDc(dc);
684 
685  return result;
686 }
687 
688 /*
689  * @implemented
690  */
691 _Success_(return != FALSE)
692 BOOL
693 APIENTRY
694 NtGdiMoveTo(
695  IN HDC hdc,
696  IN INT x,
697  IN INT y,
699 {
700  PDC pdc;
701  BOOL Ret;
702  POINT Point;
703 
704  pdc = DC_LockDc(hdc);
705  if (!pdc) return FALSE;
706 
707  Ret = IntGdiMoveToEx(pdc, x, y, &Point);
708 
709  if (Ret && pptOut)
710  {
711  _SEH2_TRY
712  {
713  ProbeForWrite(pptOut, sizeof(POINT), 1);
714  RtlCopyMemory(pptOut, &Point, sizeof(POINT));
715  }
717  {
719  Ret = FALSE; // CHECKME: is this correct?
720  }
721  _SEH2_END;
722  }
723 
724  DC_UnlockDc(pdc);
725 
726  return Ret;
727 }
728 
729 /* EOF */
_SEH2_TRY
Definition: create.c:4226
#define ROP2_TO_MIX(Rop2)
Definition: inteng.h:40
#define IN
Definition: typedefs.h:39
#define max(a, b)
Definition: svc.c:63
#define PS_ENDCAP_SQUARE
Definition: wingdi.h:595
BOOL FASTCALL IntGdiLineTo(DC *dc, int XEnd, int YEnd)
Definition: line.c:146
BOOL APIENTRY NtGdiPolyDraw(IN HDC hdc, IN LPPOINT lppt, IN LPBYTE lpbTypes, IN ULONG cCount)
Definition: line.c:536
#define GDITAG_TEMP
Definition: tags.h:167
VOID FASTCALL DC_vUpdateLineBrush(PDC pdc)
Definition: dcobjs.c:62
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:217
long y
Definition: polytest.cpp:48
#define INT_MAX
Definition: limits.h:40
GLuint64EXT * result
Definition: glext.h:11304
#define Y(I)
long x
Definition: polytest.cpp:48
BOOL FASTCALL PATH_StrokePath(DC *dc, PPATH pPath)
Definition: path.c:1598
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
#define EngFreeMem
Definition: polytest.cpp:56
PPATH FASTCALL PATH_CreatePath(int count)
Definition: path.c:35
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define DC_PEN_DIRTY
Definition: ntgdihdl.h:136
BOOL FASTCALL PATH_MoveTo(PDC dc, PPATH pPath)
Definition: path.c:554
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
Definition: path.h:34
static HDC
Definition: imagelist.c:92
LONG top
Definition: windef.h:307
long bottom
Definition: polytest.cpp:53
BOOL FASTCALL PATH_PolyPolyline(PDC dc, const POINT *pts, const DWORD *counts, DWORD polylines)
Definition: path.c:1338
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define PS_JOIN_MITER
Definition: wingdi.h:598
LONG left
Definition: windef.h:306
_SEH2_END
Definition: create.c:4400
BOOL FASTCALL GreMoveTo(HDC hdc, INT x, INT y, LPPOINT pptOut)
Definition: line.c:108
ULONG flAttrs
Definition: brush.h:19
LONG right
Definition: windef.h:308
#define PS_GEOMETRIC
Definition: wingdi.h:583
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:58
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
& rect
Definition: startmenu.cpp:1413
#define TAG_SHAPE
Definition: tags.h:14
LONG y
Definition: windef.h:330
#define DIRTY_PTFXCURRENT
Definition: ntgdihdl.h:132
long right
Definition: polytest.cpp:53
BOOL FASTCALL IntGdiPolylineTo(DC *dc, LPPOINT pt, DWORD Count)
Definition: line.c:423
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL FASTCALL PATH_PolyBezierTo(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1131
long LONG
Definition: pedump.c:60
BOOL FASTCALL IntGdiPolyBezierTo(DC *dc, LPPOINT pt, DWORD Count)
Definition: line.c:288
long top
Definition: polytest.cpp:53
SURFOBJ SurfObj
Definition: surface.h:8
HGDIOBJ hHmgr(VOID)
Definition: baseobj.hpp:95
#define TAG_BEZIER
Definition: tags.h:13
BOOL FASTCALL PATH_PolyDraw(PDC dc, const POINT *pts, const BYTE *types, DWORD cbPoints)
Definition: path.c:1180
LOCAL int join(int *aux, int a, int b)
Definition: match.c:560
#define PATH_UnlockPath(pPath)
Definition: path.h:71
long left
Definition: polytest.cpp:53
ULONG ulDirty_
Definition: ntgdihdl.h:290
Definition: types.h:100
VOID FASTCALL IntGetCurrentPositionEx(PDC dc, LPPOINT pt)
Definition: line.c:128
#define PATH_IsPathOpen(dclevel)
Definition: path.h:72
_Success_(return !=FALSE)
Definition: line.c:691
#define DIRTY_STYLESTATE
Definition: ntgdihdl.h:133
int Count
Definition: noreturn.cpp:7
BOOL FASTCALL PATH_PolylineTo(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1264
POINT pos
Definition: path.h:58
Definition: polytest.cpp:40
BOOL FASTCALL IntGdiPolyPolyline(DC *dc, LPPOINT pt, PULONG PolyPoints, DWORD Count)
Definition: line.c:462
GLsizeiptr size
Definition: glext.h:5919
#define ASSERT(a)
Definition: mode.c:44
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
BOOL FASTCALL IntGdiPolyline(DC *dc, LPPOINT pt, int Count)
Definition: line.c:325
Definition: brush.hpp:15
BYTE jROP2
Definition: ntgdihdl.h:303
BOOL FASTCALL RECTL_bUnionRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:18
BOOL FASTCALL RECTL_bIntersectRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
Definition: rect.c:55
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BR_IS_NULL
Definition: brush.h:101
LONG x
Definition: windef.h:329
BOOL FASTCALL PATH_LineTo(PDC dc, INT x, INT y)
Definition: path.c:583
POINT * GDI_Bezier(const POINT *Points, INT count, INT *nPtsOut)
Definition: bezier.c:189
void IntEngLineTo(SURFOBJ *, CLIPOBJ, PBRUSHOBJ, int x1, int y1, int x2, int y2, RECTL *, MIX mix)
Definition: polytest.cpp:107
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
GLsizei const GLfloat * points
Definition: glext.h:8112
BOOL FASTCALL PATH_PolyBezier(PDC dc, const POINT *pts, DWORD cbPoints)
Definition: path.c:1154
int ret
struct Point Point
#define DIRTY_FILL
Definition: ntgdihdl.h:123
HDC hdc
Definition: main.c:9
static const WCHAR space[]
Definition: ConsoleCP.c:24
_In_ UINT _Out_ PPOINTL pptOut
Definition: ntgdi.h:2197
#define ASSERT_DC_PREPARED(pdc)
Definition: dc.h:297
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
POINTL ptfxCurrent
Definition: ntgdihdl.h:308
BOOL APIENTRY IntEngPolyline(SURFOBJ *DestSurf, CLIPOBJ *Clip, BRUSHOBJ *Brush, CONST LPPOINT pt, LONG dCount, MIX mix)
Definition: lineto.c:703
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:37
unsigned char BYTE
Definition: xxhash.c:193
static BOOLEAN IntDPtoLP(DC *pdc, PPOINTL ppt, UINT count)
Definition: coord.h:192
#define INT_MIN
Definition: limits.h:39
static HDC hDC
Definition: 3dtext.c:33
#define PS_TYPE_MASK
Definition: wingdi.h:603
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:235
#define DIRTY_PTLCURRENT
Definition: ntgdihdl.h:131
#define IntIsEffectiveWidePen(pbrLine)
Definition: pen.h:33
BOOL APIENTRY NtGdiLineTo(HDC hDC, int XEnd, int YEnd)
Definition: line.c:495
#define PS_ENDCAP_MASK
Definition: wingdi.h:602
#define PS_JOIN_MASK
Definition: wingdi.h:600
unsigned int * PULONG
Definition: retypes.h:1
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
#define DC_BRUSH_DIRTY
Definition: ntgdihdl.h:135
VOID FASTCALL DC_vPrepareDCsForBlit(PDC pdcDest, const RECT *rcDest, PDC pdcSrc, const RECT *rcSrc)
Definition: dclife.c:505
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL FASTCALL IntGdiPolyBezier(DC *dc, LPPOINT pt, DWORD Count)
Definition: line.c:260
VOID FASTCALL DC_vFinishBlit(PDC pdc1, PDC pdc2)
Definition: dclife.c:614
#define CoordLPtoDP(pdc, ppt)
Definition: coord.h:187
#define PT_CLOSEFIGURE
Definition: wingdi.h:887
#define OUT
Definition: typedefs.h:40
#define PT_LINETO
Definition: wingdi.h:885
#define PT_MOVETO
Definition: wingdi.h:884
VOID FASTCALL IntUpdateBoundsRect(PDC, PRECTL)
Definition: dcutil.c:694
BOOL FASTCALL IntGdiMoveToEx(DC *dc, int X, int Y, LPPOINT Point)
Definition: line.c:78
unsigned int ULONG
Definition: retypes.h:1
BASEOBJECT BaseObject
Definition: path.h:36
LONG bottom
Definition: windef.h:309
VOID FASTCALL AddPenLinesBounds(PDC dc, int count, POINT *points)
Definition: line.c:17
#define DIRTY_LINE
Definition: ntgdihdl.h:124
static const WCHAR dc[]
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
FLONG state
Definition: path.h:52
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:40
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_LEAVE
Definition: filesup.c:20
#define DPRINT
Definition: sndvol32.h:71
#define PT_BEZIERTO
Definition: wingdi.h:886
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
POINTL ptlCurrent
Definition: ntgdihdl.h:307
BOOL FASTCALL PATH_Delete(HPATH hPath)
Definition: path.c:90
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:28
#define APIENTRY
Definition: api.h:79
#define X(b, s)
VOID FASTCALL DC_vUpdateFillBrush(PDC pdc)
Definition: dcobjs.c:16
static BOOLEAN IntLPtoDP(DC *pdc, PPOINTL ppt, UINT count)
Definition: coord.h:182
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68