ReactOS  0.4.15-dev-2103-g9dff498
dib1bpp.c
Go to the documentation of this file.
1 /*
2  * PROJECT: Win32 subsystem
3  * LICENSE: See COPYING in the top level directory
4  * FILE: win32ss/gdi/dib/dib1bpp.c
5  * PURPOSE: Device Independant Bitmap functions, 1bpp
6  * PROGRAMMERS: Jason Filby
7  * Doug Lyons
8  */
9 
10 #include <win32k.h>
11 
12 #define NDEBUG
13 #include <debug.h>
14 
15 #define DEC_OR_INC(var, decTrue, amount) \
16  ((var) = (decTrue) ? ((var) - (amount)) : ((var) + (amount)))
17 
18 VOID
20 {
21  PBYTE addr = (PBYTE)SurfObj->pvScan0 + y * SurfObj->lDelta + (x >> 3);
22 
23  if (0 == (c & 0x01))
24  *addr &= ~MASK1BPP(x);
25  else
26  *addr |= MASK1BPP(x);
27 }
28 
29 ULONG
31 {
32  PBYTE addr = (PBYTE)SurfObj->pvScan0 + y * SurfObj->lDelta + (x >> 3);
33 
34  return (*addr & MASK1BPP(x) ? 1 : 0);
35 }
36 
37 VOID
39 {
40  while(x1 < x2)
41  {
42  DIB_1BPP_PutPixel(SurfObj, x1, y, c);
43  x1++;
44  }
45 }
46 
47 VOID
49 {
50  while(y1 < y2)
51  {
52  DIB_1BPP_PutPixel(SurfObj, x, y1, c);
53  y1++;
54  }
55 }
56 
57 static
58 void
60  SURFOBJ* DestSurf,
61  SURFOBJ* SourceSurf,
62  XLATEOBJ* pxlo,
63  PRECTL DestRect,
64  POINTL *SourcePoint,
65  BOOLEAN bTopToBottom,
66  BOOLEAN bLeftToRight )
67 {
68 
69  DPRINT("bLeftToRight is '%d' and bTopToBottom is '%d'.\n", bLeftToRight, bTopToBottom);
70 
71  // The 'window' in this sense is the x-position that corresponds
72  // to the left-edge of the 8-pixel byte we are currently working with.
73  // dwx is current x-window, dwx2 is the 'last' window we need to process.
74  int dwx, dwx2; // Destination window x-position
75  int swx; // Source window x-position
76 
77  // Left and right edges of source and dest rectangles
78  int dl = DestRect->left; // dest left
79  int dr = DestRect->right-1; // dest right (inclusive)
80  int sl = SourcePoint->x; // source left
81  int sr = sl + dr - dl; // source right (inclusive)
82 
83  // Which direction are we going?
84  int xinc;
85  int yinc;
86  int ySrcDelta, yDstDelta;
87 
88  // The following 4 variables are used for the y-sweep
89  int dy; // dest y
90  int dy1; // dest y start
91  int dy2; // dest y end
92  int sy1; // src y start
93 
94  int shift;
95  BYTE srcmask, dstmask, xormask;
96 
97  // 'd' and 's' are the dest & src buffer pointers that I use on my x-sweep
98  // 'pd' and 'ps' are the dest & src buffer pointers used on the inner y-sweep
99  PBYTE d, pd; // dest ptrs
100  PBYTE s, ps; // src ptrs
101 
102  shift = (dl-sl)&7;
103 
104  xormask = 0xFF * (BYTE)XLATEOBJ_iXlate(pxlo, 0);
105 
106  if ( DestRect->top <= SourcePoint->y )
107  {
108  DPRINT("Moving up (scan top -> bottom).\n");
109  // Moving up (scan top -> bottom)
110  dy1 = DestRect->top;
111  dy2 = DestRect->bottom - 1;
112  if (bTopToBottom)
113  {
114  sy1 = SourcePoint->y + dy2 - dy1;
115  ySrcDelta = -SourceSurf->lDelta;
116  }
117  else
118  {
119  sy1 = SourcePoint->y;
120  ySrcDelta = SourceSurf->lDelta;
121  }
122  yinc = 1;
123  yDstDelta = DestSurf->lDelta;
124  }
125  else
126  {
127  DPRINT("Moving down (scan bottom -> top).\n");
128  // Moving down (scan bottom -> top)
129  dy1 = DestRect->bottom - 1;
130  dy2 = DestRect->top;
131  if (bTopToBottom)
132  {
133  sy1 = SourcePoint->y;
134  ySrcDelta = SourceSurf->lDelta;
135  }
136  else
137  {
138  sy1 = SourcePoint->y + dy1 - dy2;
139  ySrcDelta = -SourceSurf->lDelta;
140  }
141  yinc = -1;
142  yDstDelta = -DestSurf->lDelta;
143  }
144  if ( DestRect->left <= SourcePoint->x )
145  {
146  DPRINT("Moving left (scan left->right).\n");
147  // Moving left (scan left->right)
148  dwx = dl&~7;
149  dwx2 = dr&~7;
150  if (bLeftToRight)
151  {
152  swx = (sr - (dr & 7)) & ~7;
153  xinc = -1;
154  }
155  else
156  {
157  swx = (sl-(dl&7))&~7;
158  xinc = 1;
159  }
160  }
161  else
162  {
163  DPRINT("Moving right (scan right->left).\n");
164  // Moving right (scan right->left)
165  dwx = dr & ~7;
166  dwx2 = dl & ~7;
167  if (bLeftToRight)
168  {
169  swx = (sl-(dl&7))&~7;
170  xinc = 1;
171  }
172  else
173  {
174  swx = (sr - (dr & 7)) & ~7; // (sr - 7) & ~7; // We need the left edge of this block. Thus the -7
175  xinc = -1;
176  }
177  }
178  d = &(((PBYTE)DestSurf->pvScan0)[dy1*DestSurf->lDelta + (dwx>>3)]);
179  s = &(((PBYTE)SourceSurf->pvScan0)[sy1*SourceSurf->lDelta + (swx>>3)]);
180  for ( ;; )
181  {
182  dy = dy1;
183  pd = d;
184  ps = s;
185  srcmask = 0xff;
186  if ( dwx < dl )
187  {
188  int diff = dl-dwx;
189  srcmask &= (1<<(8-diff))-1;
190  }
191  if ( dwx+7 > dr )
192  {
193  int diff = dr-dwx+1;
194  srcmask &= ~((1<<(8-diff))-1);
195  }
196  dstmask = ~srcmask;
197 
198  // We unfortunately *must* have 5 different versions of the inner
199  // loop to be certain we don't try to read from memory that is not
200  // needed and may in fact be invalid.
201  if ( !shift )
202  {
203  for ( ;; )
204  {
205  *pd = (BYTE)((*pd & dstmask) | ((ps[0]^xormask) & srcmask));
206 
207  // This *must* be here, because we could be going up *or* down...
208  if ( dy == dy2 )
209  break;
210  dy += yinc;
211  pd += yDstDelta;
212  ps += ySrcDelta;
213  }
214  }
215  else if ( !(0xFF00 & (srcmask<<shift) ) ) // Check if ps[0] not needed...
216  {
217  for ( ;; )
218  {
219  *pd = (BYTE)((*pd & dstmask)
220  | ( ( (ps[1]^xormask) >> shift ) & srcmask ));
221 
222  // This *must* be here, because we could be going up *or* down...
223  if ( dy == dy2 )
224  break;
225  dy += yinc;
226  pd += yDstDelta;
227  ps += ySrcDelta;
228  }
229  }
230  else if ( !(0xFF & (srcmask<<shift) ) ) // Check if ps[1] not needed...
231  {
232  for ( ;; )
233  {
234  *pd = (*pd & dstmask)
235  | ( ( (ps[0]^xormask) << ( 8 - shift ) ) & srcmask );
236 
237  // This *must* be here, because we could be going up *or* down...
238  if ( dy == dy2 )
239  break;
240  dy += yinc;
241  pd += yDstDelta;
242  ps += ySrcDelta;
243  }
244  }
245  else // Both ps[0] and ps[1] are needed
246  {
247  for ( ;; )
248  {
249  *pd = (*pd & dstmask)
250  | ( ( ( ((ps[1]^xormask))|((ps[0]^xormask)<<8) ) >> shift ) & srcmask );
251 
252  // This *must* be here, because we could be going up *or* down...
253  if ( dy == dy2 )
254  break;
255  dy += yinc;
256  pd += yDstDelta;
257  ps += ySrcDelta;
258  }
259  }
260 
261  // This *must* be here, because we could be going right *or* left...
262  if ( dwx == dwx2 )
263  break;
264  d += xinc;
265  s += xinc;
266  dwx += xinc<<3;
267  swx += xinc<<3;
268  }
269 }
270 
271 BOOLEAN
273 {
274  ULONG Color;
275  LONG i, j, sx, sy;
276  BOOLEAN bTopToBottom, bLeftToRight;
277 
278  // This sets sy to the top line
279  sy = BltInfo->SourcePoint.y;
280 
281  DPRINT("DIB_1BPP_BitBltSrcCopy: SrcSurf cx/cy (%d/%d), DestSuft cx/cy (%d/%d) dstRect: (%d,%d)-(%d,%d)\n",
282  BltInfo->SourceSurface->sizlBitmap.cx, BltInfo->SourceSurface->sizlBitmap.cy,
283  BltInfo->DestSurface->sizlBitmap.cx, BltInfo->DestSurface->sizlBitmap.cy,
284  BltInfo->DestRect.left, BltInfo->DestRect.top, BltInfo->DestRect.right, BltInfo->DestRect.bottom);
285 
286  /* Get back left to right flip here */
287  bLeftToRight = (BltInfo->DestRect.left > BltInfo->DestRect.right);
288 
289  /* Check for top to bottom flip needed. */
290  bTopToBottom = BltInfo->DestRect.top > BltInfo->DestRect.bottom;
291 
292  // Make WellOrdered with top < bottom and left < right
293  RECTL_vMakeWellOrdered(&BltInfo->DestRect);
294 
295  DPRINT("BPP is '%d' & BltInfo->SourcePoint.x is '%d' & BltInfo->SourcePoint.y is '%d'.\n",
296  BltInfo->SourceSurface->iBitmapFormat, BltInfo->SourcePoint.x, BltInfo->SourcePoint.y);
297 
298  switch ( BltInfo->SourceSurface->iBitmapFormat )
299  {
300  case BMF_1BPP:
301  DPRINT("1BPP Case Selected with DestRect Width of '%d'.\n",
302  BltInfo->DestRect.right - BltInfo->DestRect.left);
303 
305  BltInfo->XlateSourceToDest, &BltInfo->DestRect, &BltInfo->SourcePoint,
306  bTopToBottom, bLeftToRight );
307  break;
308 
309  case BMF_4BPP:
310  DPRINT("4BPP Case Selected with DestRect Width of '%d'.\n",
311  BltInfo->DestRect.right - BltInfo->DestRect.left);
312 
313  if (bTopToBottom)
314  {
315  // This sets sy to the bottom line
316  sy += (BltInfo->DestRect.bottom - BltInfo->DestRect.top - 1) * BltInfo->SourceSurface->lDelta;
317  }
318 
319  for (j=BltInfo->DestRect.top; j<BltInfo->DestRect.bottom; j++)
320  {
321  sx = BltInfo->SourcePoint.x;
322 
323  if (bLeftToRight)
324  {
325  // This sets the sx to the rightmost pixel
326  sx += (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
327  }
328 
329  for (i=BltInfo->DestRect.left; i<BltInfo->DestRect.right; i++)
330  {
332  DIB_1BPP_PutPixel(BltInfo->DestSurface, i, j, Color);
333 
334  DEC_OR_INC(sx, bLeftToRight, 1);
335  }
336  DEC_OR_INC(sy, bTopToBottom, 1);
337  }
338  break;
339 
340  case BMF_8BPP:
341  DPRINT("8BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
342  BltInfo->DestRect.left, BltInfo->DestRect.top,
343  BltInfo->DestRect.right, BltInfo->DestRect.bottom,
344  BltInfo->DestRect.right - BltInfo->DestRect.left);
345 
346  if (bTopToBottom)
347  {
348  // This sets sy to the bottom line
349  sy += (BltInfo->DestRect.bottom - BltInfo->DestRect.top - 1) * BltInfo->SourceSurface->lDelta;
350  }
351 
352  for (j=BltInfo->DestRect.top; j<BltInfo->DestRect.bottom; j++)
353  {
354  sx = BltInfo->SourcePoint.x;
355 
356  if (bLeftToRight)
357  {
358  // This sets sx to the rightmost pixel
359  sx += (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
360  }
361 
362  for (i=BltInfo->DestRect.left; i<BltInfo->DestRect.right; i++)
363  {
365  DIB_1BPP_PutPixel(BltInfo->DestSurface, i, j, Color);
366 
367  DEC_OR_INC(sx, bLeftToRight, 1);
368  }
369  DEC_OR_INC(sy, bTopToBottom, 1);
370  }
371  break;
372 
373  case BMF_16BPP:
374  DPRINT("16BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
375  BltInfo->DestRect.left, BltInfo->DestRect.top,
376  BltInfo->DestRect.right, BltInfo->DestRect.bottom,
377  BltInfo->DestRect.right - BltInfo->DestRect.left);
378 
379  if (bTopToBottom)
380  {
381  // This sets sy to the bottom line
382  sy += (BltInfo->DestRect.bottom - BltInfo->DestRect.top - 1) * BltInfo->SourceSurface->lDelta;;
383  }
384 
385  for (j=BltInfo->DestRect.top; j<BltInfo->DestRect.bottom; j++)
386  {
387  sx = BltInfo->SourcePoint.x;
388 
389  if (bLeftToRight)
390  {
391  // This sets the sx to the rightmost pixel
392  sx += (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
393  }
394 
395  for (i=BltInfo->DestRect.left; i<BltInfo->DestRect.right; i++)
396  {
398  DIB_1BPP_PutPixel(BltInfo->DestSurface, i, j, Color);
399  DEC_OR_INC(sx, bLeftToRight, 1);
400  }
401  DEC_OR_INC(sy, bTopToBottom, 1);
402  }
403  break;
404 
405  case BMF_24BPP:
406 
407  DPRINT("24BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
408  BltInfo->DestRect.left, BltInfo->DestRect.top,
409  BltInfo->DestRect.right, BltInfo->DestRect.bottom,
410  BltInfo->DestRect.right - BltInfo->DestRect.left);
411 
412  if (bTopToBottom)
413  {
414  // This sets sy to the bottom line
415  sy += (BltInfo->DestRect.bottom - BltInfo->DestRect.top - 1) * BltInfo->SourceSurface->lDelta;
416  }
417 
418  for (j=BltInfo->DestRect.top; j<BltInfo->DestRect.bottom; j++)
419  {
420  sx = BltInfo->SourcePoint.x;
421 
422  if (bLeftToRight)
423  {
424  // This sets the sx to the rightmost pixel
425  sx += (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
426  }
427 
428  for (i=BltInfo->DestRect.left; i<BltInfo->DestRect.right; i++)
429  {
431  DIB_1BPP_PutPixel(BltInfo->DestSurface, i, j, Color);
432  DEC_OR_INC(sx, bLeftToRight, 1);
433  }
434  DEC_OR_INC(sy, bTopToBottom, 1);
435  }
436  break;
437 
438  case BMF_32BPP:
439 
440  DPRINT("32BPP-dstRect: (%d,%d)-(%d,%d) and Width of '%d'.\n",
441  BltInfo->DestRect.left, BltInfo->DestRect.top,
442  BltInfo->DestRect.right, BltInfo->DestRect.bottom,
443  BltInfo->DestRect.right - BltInfo->DestRect.left);
444 
445  if (bTopToBottom)
446  {
447  // This sets sy to the bottom line
448  sy += BltInfo->DestRect.bottom - BltInfo->DestRect.top - 1;
449  }
450 
451  for (j=BltInfo->DestRect.top; j<BltInfo->DestRect.bottom; j++)
452  {
453  sx = BltInfo->SourcePoint.x;
454 
455  if (bLeftToRight)
456  {
457  // This sets the sx to the rightmost pixel
458  sx += (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
459  }
460 
461  for (i=BltInfo->DestRect.left; i<BltInfo->DestRect.right; i++)
462  {
464  DIB_1BPP_PutPixel(BltInfo->DestSurface, i, j, Color);
465  DEC_OR_INC(sx, bLeftToRight, 1);
466  }
467  DEC_OR_INC(sy, bTopToBottom, 1);
468  }
469  break;
470 
471  default:
472  DbgPrint("DIB_1BPP_BitBlt: Unhandled Source BPP: %u\n", BitsPerFormat(BltInfo->SourceSurface->iBitmapFormat));
473  return FALSE;
474  }
475 
476  return TRUE;
477 }
478 
479 #ifndef _USE_DIBLIB_
480 BOOLEAN
482 {
483  LONG DestX, DestY;
484  LONG SourceX, SourceY;
485  LONG PatternY = 0;
486  ULONG Dest, Source = 0, Pattern = 0;
487  ULONG Index;
488  BOOLEAN UsesSource;
489  BOOLEAN UsesPattern;
490  PULONG DestBits;
491  LONG RoundedRight;
492 
493  UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4);
494  UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4);
495 
496  RoundedRight = BltInfo->DestRect.right -
497  ((BltInfo->DestRect.right - BltInfo->DestRect.left) & 31);
498  SourceY = BltInfo->SourcePoint.y;
499 
500  if (UsesPattern)
501  {
502  if (BltInfo->PatternSurface)
503  {
504  PatternY = (BltInfo->DestRect.top + BltInfo->BrushOrigin.y) %
505  BltInfo->PatternSurface->sizlBitmap.cy;
506  }
507  else
508  {
509  /* FIXME: Shouldn't it be expanded? */
510  if (BltInfo->Brush)
511  Pattern = BltInfo->Brush->iSolidColor;
512  }
513  }
514 
515  for (DestY = BltInfo->DestRect.top; DestY < BltInfo->DestRect.bottom; DestY++)
516  {
517  DestX = BltInfo->DestRect.left;
518  SourceX = BltInfo->SourcePoint.x;
519  DestBits = (PULONG)(
520  (PBYTE)BltInfo->DestSurface->pvScan0 +
521  (BltInfo->DestRect.left >> 3) +
522  DestY * BltInfo->DestSurface->lDelta);
523 
524  if (DestX & 31)
525  {
526 #if 0
527  /* FIXME: This case is completely untested!!! */
528 
529  Dest = *((PBYTE)DestBits);
530  NoBits = 31 - (DestX & 31);
531 
532  if (UsesSource)
533  {
534  Source = 0;
535  /* FIXME: This is incorrect! */
536  for (Index = 31 - NoBits; Index >= 0; Index++)
537  Source |= (DIB_GetSource(SourceSurf, SourceX + Index, SourceY, ColorTranslation) << (31 - Index));
538  }
539 
540  if (BltInfo->PatternSurface)
541  {
542  Pattern = 0;
543  for (k = 31 - NoBits; k >= 0; k++)
544  Pattern |= (DIB_GetSourceIndex(PatternObj, (X + BrushOrigin.x + k) % PatternWidth, PatternY) << (31 - k));
545  }
546 
547  Dest = DIB_DoRop(BltInfo->Rop4, Dest, Source, Pattern);
548  Dest &= ~((1 << (31 - NoBits)) - 1);
549  Dest |= *((PBYTE)DestBits) & ((1 << (31 - NoBits)) - 1);
550 
551  *DestBits = Dest;
552 
553  DestX += NoBits;
554  SourceX += NoBits;
555 #endif
556  }
557 
558  for (; DestX < RoundedRight; DestX += 32, DestBits++, SourceX += 32)
559  {
560  Dest = *DestBits;
561 
562  if (UsesSource)
563  {
564  Source = 0;
565  for (Index = 0; Index < 8; Index++)
566  {
567  Source |= DIB_GetSource(BltInfo->SourceSurface, SourceX + Index, SourceY, BltInfo->XlateSourceToDest) << (7 - Index);
568  Source |= DIB_GetSource(BltInfo->SourceSurface, SourceX + Index + 8, SourceY, BltInfo->XlateSourceToDest) << (8 + (7 - Index));
569  Source |= DIB_GetSource(BltInfo->SourceSurface, SourceX + Index + 16, SourceY, BltInfo->XlateSourceToDest) << (16 + (7 - Index));
570  Source |= DIB_GetSource(BltInfo->SourceSurface, SourceX + Index + 24, SourceY, BltInfo->XlateSourceToDest) << (24 + (7 - Index));
571  }
572  }
573 
574  if (BltInfo->PatternSurface)
575  {
576  Pattern = 0;
577  for (Index = 0; Index < 8; Index++)
578  {
579  Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (7 - Index);
580  Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 8) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (8 + (7 - Index));
581  Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 16) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (16 + (7 - Index));
582  Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 24) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (24 + (7 - Index));
583  }
584  }
585 
586  *DestBits = DIB_DoRop(BltInfo->Rop4, Dest, Source, Pattern);
587  }
588 
589  if (DestX < BltInfo->DestRect.right)
590  {
591  for (; DestX < BltInfo->DestRect.right; DestX++, SourceX++)
592  {
593  Dest = DIB_1BPP_GetPixel(BltInfo->DestSurface, DestX, DestY);
594 
595  if (UsesSource)
596  {
597  Source = DIB_GetSource(BltInfo->SourceSurface, SourceX, SourceY, BltInfo->XlateSourceToDest);
598  }
599 
600  if (BltInfo->PatternSurface)
601  {
602  Pattern = DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY);
603  }
604 
605  DIB_1BPP_PutPixel(BltInfo->DestSurface, DestX, DestY, DIB_DoRop(BltInfo->Rop4, Dest, Source, Pattern) & 0xF);
606  }
607  }
608 
609  SourceY++;
610  if (BltInfo->PatternSurface)
611  {
612  PatternY++;
613  PatternY %= BltInfo->PatternSurface->sizlBitmap.cy;
614  }
615  }
616 
617  return TRUE;
618 }
619 
620 /* BitBlt Optimize */
621 BOOLEAN
622 DIB_1BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color)
623 {
624  LONG DestY;
625 
626  /* Make WellOrdered with top < bottom and left < right */
627  RECTL_vMakeWellOrdered(DestRect);
628 
629  for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++)
630  {
631  DIB_1BPP_HLine(DestSurface, DestRect->left, DestRect->right, DestY, color);
632  }
633  return TRUE;
634 }
635 #endif // !_USE_DIBLIB_
636 
637 BOOLEAN
638 DIB_1BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
639  RECTL* DestRect, RECTL *SourceRect,
640  XLATEOBJ *ColorTranslation, ULONG iTransColor)
641 {
642  return FALSE;
643 }
644 
645 /* EOF */
POINTL BrushOrigin
Definition: dib.h:29
ROP4 Rop4
Definition: dib.h:30
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3706
#define BMF_24BPP
Definition: winddi.h:359
BOOLEAN DIB_1BPP_ColorFill(SURFOBJ *DestSurface, RECTL *DestRect, ULONG color)
Definition: dib1bpp.c:622
SIZEL sizlBitmap
Definition: winddi.h:1209
#define shift
Definition: input.c:1756
LONG lDelta
Definition: winddi.h:1213
#define BMF_32BPP
Definition: winddi.h:360
#define DbgPrint
Definition: loader.c:25
XLATEOBJ * XlateSourceToDest
Definition: dib.h:25
#define TRUE
Definition: types.h:120
ULONG DIB_16BPP_GetPixel(SURFOBJ *, LONG, LONG)
Definition: dib16bpp.c:30
VOID DIB_1BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
Definition: dib1bpp.c:38
#define BitsPerFormat(Format)
Definition: surface.h:109
GLint dy
Definition: linetemp.h:97
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
ULONG DIB_24BPP_GetPixel(SURFOBJ *, LONG, LONG)
Definition: dib24bpp.c:29
long bottom
Definition: polytest.cpp:53
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
ULONG iBitmapFormat
Definition: winddi.h:1215
ULONG DIB_32BPP_GetPixel(SURFOBJ *, LONG, LONG)
Definition: dib32bpp.c:30
#define MASK1BPP(x)
Definition: dib.h:132
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL _In_ ULONG iTransColor
Definition: winddi.h:4190
Definition: xlate.c:10
SURFOBJ * PatternSurface
Definition: dib.h:24
ULONG DIB_4BPP_GetPixel(SURFOBJ *, LONG, LONG)
Definition: dib4bpp.c:26
struct Color Color
LONG y
Definition: windef.h:330
long right
Definition: polytest.cpp:53
#define DIB_GetSource(SourceSurf, sx, sy, ColorTranslation)
Definition: dib.h:136
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
GLuint color
Definition: glext.h:6243
#define DIB_GetSourceIndex(SourceSurf, sx, sy)
Definition: dib.h:141
long top
Definition: polytest.cpp:53
unsigned char BOOLEAN
LONG cx
Definition: windef.h:334
#define DEC_OR_INC(var, decTrue, amount)
Definition: dib1bpp.c:15
GLint GLint bottom
Definition: glext.h:7726
#define ROP4_USES_SOURCE(Rop4)
Definition: inteng.h:45
ULONG DIB_DoRop(ULONG Rop, ULONG Dest, ULONG Source, ULONG Pattern)
Definition: dib.c:92
long left
Definition: polytest.cpp:53
#define BMF_16BPP
Definition: winddi.h:358
ULONG DIB_1BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
Definition: dib1bpp.c:30
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 GLint GLint j
Definition: glfuncs.h:250
SURFOBJ * SourceSurface
Definition: dib.h:23
ULONG DIB_8BPP_GetPixel(SURFOBJ *, LONG, LONG)
Definition: dib8bpp.c:29
RECTL DestRect
Definition: dib.h:26
SURFOBJ * DestSurface
Definition: dib.h:22
_In_ WDFCOLLECTION _In_ ULONG Index
const GLubyte * c
Definition: glext.h:8905
LONG x
Definition: windef.h:329
GLenum const GLvoid * addr
Definition: glext.h:9621
ULONG iSolidColor
Definition: winddi.h:234
BRUSHOBJ * Brush
Definition: dib.h:28
GLdouble s
Definition: gl.h:2039
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3706
unsigned char BYTE
Definition: xxhash.c:193
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
Definition: xlate.c:8
#define ROP4_USES_PATTERN(Rop4)
Definition: inteng.h:46
unsigned int * PULONG
Definition: retypes.h:1
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOLEAN DIB_1BPP_BitBltSrcCopy(PBLTINFO BltInfo)
Definition: dib1bpp.c:272
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
static void DIB_1BPP_BitBltSrcCopy_From1BPP(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, XLATEOBJ *pxlo, PRECTL DestRect, POINTL *SourcePoint, BOOLEAN bTopToBottom, BOOLEAN bLeftToRight)
Definition: dib1bpp.c:59
POINTL SourcePoint
Definition: dib.h:27
BOOLEAN DIB_1BPP_BitBlt(PBLTINFO BltInfo)
Definition: dib1bpp.c:481
VOID DIB_1BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
Definition: dib1bpp.c:48
unsigned int ULONG
Definition: retypes.h:1
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
Definition: xlateobj.c:664
#define DPRINT
Definition: sndvol32.h:71
LONG cy
Definition: windef.h:335
BYTE * PBYTE
Definition: pedump.c:66
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
Definition: rect.c:81
int k
Definition: mpi.c:3369
BOOLEAN DIB_1BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, RECTL *DestRect, RECTL *SourceRect, XLATEOBJ *ColorTranslation, ULONG iTransColor)
Definition: dib1bpp.c:638
Definition: dib.h:20
VOID DIB_1BPP_PutPixel(SURFOBJ *SurfObj, LONG x, LONG y, ULONG c)
Definition: dib1bpp.c:19
#define d
Definition: ke_i.h:81
Definition: xlate.c:9
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
Definition: winddi.h:3414
PVOID pvScan0
Definition: winddi.h:1212