gdi32: Implement rectangular gradients in the DIB engine.
[wine/multimedia.git] / dlls / gdi32 / dibdrv / dc.c
blob1fcf9c18c951a41b3daf6afcb14c3b475b4117cd
1 /*
2 * DIB driver initialization and DC functions.
4 * Copyright 2011 Huw Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <assert.h>
23 #include "gdi_private.h"
24 #include "dibdrv.h"
26 #include "wine/exception.h"
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(dib);
31 static const DWORD bit_fields_888[3] = {0xff0000, 0x00ff00, 0x0000ff};
32 static const DWORD bit_fields_555[3] = {0x7c00, 0x03e0, 0x001f};
34 static void calc_shift_and_len(DWORD mask, int *shift, int *len)
36 int s, l;
38 if(!mask)
40 *shift = *len = 0;
41 return;
44 s = 0;
45 while ((mask & 1) == 0)
47 mask >>= 1;
48 s++;
50 l = 0;
51 while ((mask & 1) == 1)
53 mask >>= 1;
54 l++;
56 *shift = s;
57 *len = l;
60 static void init_bit_fields(dib_info *dib, const DWORD *bit_fields)
62 dib->red_mask = bit_fields[0];
63 dib->green_mask = bit_fields[1];
64 dib->blue_mask = bit_fields[2];
65 calc_shift_and_len(dib->red_mask, &dib->red_shift, &dib->red_len);
66 calc_shift_and_len(dib->green_mask, &dib->green_shift, &dib->green_len);
67 calc_shift_and_len(dib->blue_mask, &dib->blue_shift, &dib->blue_len);
70 BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD *bit_fields,
71 RGBQUAD *color_table, int color_table_size, void *bits, enum dib_info_flags flags)
73 dib->bit_count = bi->biBitCount;
74 dib->width = bi->biWidth;
75 dib->height = bi->biHeight;
76 dib->stride = get_dib_stride( dib->width, dib->bit_count );
77 dib->bits.ptr = bits;
78 dib->bits.is_copy = FALSE;
79 dib->bits.free = NULL;
80 dib->bits.param = NULL;
81 dib->flags = flags;
83 if(dib->height < 0) /* top-down */
85 dib->height = -dib->height;
87 else /* bottom-up */
89 /* bits always points to the top-left corner and the stride is -ve */
90 dib->bits.ptr = (BYTE*)dib->bits.ptr + (dib->height - 1) * dib->stride;
91 dib->stride = -dib->stride;
94 dib->funcs = &funcs_null;
96 switch(dib->bit_count)
98 case 32:
99 if(bi->biCompression == BI_RGB)
100 bit_fields = bit_fields_888;
102 init_bit_fields(dib, bit_fields);
104 if(dib->red_mask == 0xff0000 && dib->green_mask == 0x00ff00 && dib->blue_mask == 0x0000ff)
105 dib->funcs = &funcs_8888;
106 else
107 dib->funcs = &funcs_32;
108 break;
110 case 24:
111 dib->funcs = &funcs_24;
112 break;
114 case 16:
115 if(bi->biCompression == BI_RGB)
116 bit_fields = bit_fields_555;
118 init_bit_fields(dib, bit_fields);
120 if(dib->red_mask == 0x7c00 && dib->green_mask == 0x03e0 && dib->blue_mask == 0x001f)
121 dib->funcs = &funcs_555;
122 else
123 dib->funcs = &funcs_16;
124 break;
126 case 8:
127 dib->funcs = &funcs_8;
128 break;
130 case 4:
131 dib->funcs = &funcs_4;
132 break;
134 case 1:
135 dib->funcs = &funcs_1;
136 break;
138 default:
139 TRACE("bpp %d not supported, will forward to graphics driver.\n", dib->bit_count);
140 return FALSE;
143 if(color_table)
145 if (flags & private_color_table)
147 dib->color_table = HeapAlloc(GetProcessHeap(), 0, color_table_size * sizeof(dib->color_table[0]));
148 if(!dib->color_table) return FALSE;
149 memcpy(dib->color_table, color_table, color_table_size * sizeof(color_table[0]));
151 else
152 dib->color_table = color_table;
153 dib->color_table_size = color_table_size;
155 else
157 dib->color_table = NULL;
158 dib->color_table_size = 0;
161 return TRUE;
164 BOOL init_dib_info_from_brush(dib_info *dib, const BITMAPINFO *bi, void *bits, UINT usage, HPALETTE palette)
166 DWORD *masks = (bi->bmiHeader.biCompression == BI_BITFIELDS) ? (DWORD *)bi->bmiColors : NULL;
167 RGBQUAD *color_table = NULL, pal_table[256];
168 int num_colors = get_dib_num_of_colors( bi );
170 if(num_colors)
172 if(usage == DIB_PAL_COLORS)
174 PALETTEENTRY entries[256];
175 const WORD *index = (const WORD *)bi->bmiColors;
176 UINT i, count = GetPaletteEntries( palette, 0, num_colors, entries );
177 for (i = 0; i < num_colors; i++, index++)
179 PALETTEENTRY *entry = &entries[*index % count];
180 pal_table[i].rgbRed = entry->peRed;
181 pal_table[i].rgbGreen = entry->peGreen;
182 pal_table[i].rgbBlue = entry->peBlue;
183 pal_table[i].rgbReserved = 0;
185 color_table = pal_table;
187 else color_table = (RGBQUAD *)bi->bmiColors;
189 return init_dib_info(dib, &bi->bmiHeader, masks, color_table, num_colors, bits, private_color_table);
192 BOOL init_dib_info_from_bitmapinfo(dib_info *dib, const BITMAPINFO *info, void *bits, enum dib_info_flags flags)
194 unsigned int colors = get_dib_num_of_colors( info );
195 void *colorptr = (char *)&info->bmiHeader + info->bmiHeader.biSize;
196 const DWORD *bitfields = (info->bmiHeader.biCompression == BI_BITFIELDS) ? (DWORD *)colorptr : NULL;
198 return init_dib_info( dib, &info->bmiHeader, bitfields, colors ? colorptr : NULL, colors, bits, flags );
201 BOOL init_dib_info_from_bitmapobj(dib_info *dib, BITMAPOBJ *bmp, enum dib_info_flags flags)
203 if (!bmp->dib)
205 char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
206 BITMAPINFO *info = (BITMAPINFO *)buffer;
208 get_ddb_bitmapinfo( bmp, info );
209 if (!bmp->bitmap.bmBits)
211 int width_bytes = get_dib_stride( bmp->bitmap.bmWidth, bmp->bitmap.bmBitsPixel );
212 bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
213 bmp->bitmap.bmHeight * width_bytes );
214 if (!bmp->bitmap.bmBits) return FALSE;
216 return init_dib_info_from_bitmapinfo( dib, info, bmp->bitmap.bmBits,
217 flags | private_color_table );
219 return init_dib_info( dib, &bmp->dib->dsBmih, bmp->dib->dsBitfields,
220 bmp->color_table, bmp->nb_colors, bmp->dib->dsBm.bmBits, flags );
223 static void clear_dib_info(dib_info *dib)
225 dib->color_table = NULL;
226 dib->bits.ptr = NULL;
227 dib->bits.free = NULL;
228 dib->bits.param = NULL;
231 /**********************************************************************
232 * free_dib_info
234 * Free the resources associated with a dib and optionally the bits
236 void free_dib_info(dib_info *dib)
238 if (dib->flags & private_color_table)
239 HeapFree(GetProcessHeap(), 0, dib->color_table);
241 if (dib->bits.free) dib->bits.free( &dib->bits );
242 clear_dib_info( dib );
245 void copy_dib_color_info(dib_info *dst, const dib_info *src)
247 dst->bit_count = src->bit_count;
248 dst->red_mask = src->red_mask;
249 dst->green_mask = src->green_mask;
250 dst->blue_mask = src->blue_mask;
251 dst->red_len = src->red_len;
252 dst->green_len = src->green_len;
253 dst->blue_len = src->blue_len;
254 dst->red_shift = src->red_shift;
255 dst->green_shift = src->green_shift;
256 dst->blue_shift = src->blue_shift;
257 dst->funcs = src->funcs;
258 dst->color_table_size = src->color_table_size;
259 dst->color_table = NULL;
260 dst->flags = src->flags;
261 if(dst->color_table_size)
263 int size = dst->color_table_size * sizeof(dst->color_table[0]);
264 if (dst->flags & private_color_table)
266 dst->color_table = HeapAlloc(GetProcessHeap(), 0, size);
267 memcpy(dst->color_table, src->color_table, size);
269 else
270 dst->color_table = src->color_table;
274 DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bitblt_coords *src,
275 const BITMAPINFO *dst_info, void *dst_bits, BOOL add_alpha )
277 dib_info src_dib, dst_dib;
278 DWORD ret;
280 if ( !init_dib_info_from_bitmapinfo( &src_dib, src_info, src_bits, 0 ) )
281 return ERROR_BAD_FORMAT;
282 if ( !init_dib_info_from_bitmapinfo( &dst_dib, dst_info, dst_bits, 0 ) )
283 return ERROR_BAD_FORMAT;
285 __TRY
287 dst_dib.funcs->convert_to( &dst_dib, &src_dib, &src->visrect );
288 ret = TRUE;
290 __EXCEPT_PAGE_FAULT
292 WARN( "invalid bits pointer %p\n", src_bits );
293 ret = FALSE;
295 __ENDTRY
297 /* We shared the color tables, so there's no need to free the dib_infos here */
298 if(!ret) return ERROR_BAD_FORMAT;
300 /* update coordinates, the destination rectangle is always stored at 0,0 */
301 src->x -= src->visrect.left;
302 src->y -= src->visrect.top;
303 offset_rect( &src->visrect, -src->visrect.left, -src->visrect.top );
305 if (add_alpha && dst_dib.funcs == &funcs_8888 && src_dib.funcs != &funcs_8888)
307 DWORD *pixel = dst_dib.bits.ptr;
308 int x, y;
310 for (y = src->visrect.top; y < src->visrect.bottom; y++, pixel += dst_dib.stride / 4)
311 for (x = src->visrect.left; x < src->visrect.right; x++)
312 pixel[x] |= 0xff000000;
315 return ERROR_SUCCESS;
318 static void update_fg_colors( dibdrv_physdev *pdev )
320 pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE );
321 pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
322 pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE );
325 static void update_masks( dibdrv_physdev *pdev, INT rop )
327 calc_and_xor_masks( rop, pdev->pen_color, &pdev->pen_and, &pdev->pen_xor );
328 update_brush_rop( pdev, rop );
329 if( GetBkMode( pdev->dev.hdc ) == OPAQUE )
330 calc_and_xor_masks( rop, pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
333 /***********************************************************************
334 * add_extra_clipping_region
336 * Temporarily add a region to the current clipping region.
337 * The returned region must be restored with restore_clipping_region.
339 HRGN add_extra_clipping_region( dibdrv_physdev *pdev, HRGN rgn )
341 HRGN ret, clip;
343 if (!(clip = CreateRectRgn( 0, 0, 0, 0 ))) return 0;
344 CombineRgn( clip, pdev->clip, rgn, RGN_AND );
345 ret = pdev->clip;
346 pdev->clip = clip;
347 return ret;
350 /***********************************************************************
351 * restore_clipping_region
353 void restore_clipping_region( dibdrv_physdev *pdev, HRGN rgn )
355 if (!rgn) return;
356 DeleteObject( pdev->clip );
357 pdev->clip = rgn;
360 /**********************************************************************
361 * dibdrv_CreateDC
363 static BOOL dibdrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
364 LPCWSTR output, const DEVMODEW *data )
366 dibdrv_physdev *pdev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pdev) );
368 if (!pdev) return FALSE;
369 if (!(pdev->clip = CreateRectRgn(0, 0, 0, 0)))
371 HeapFree( GetProcessHeap(), 0, pdev );
372 return FALSE;
374 clear_dib_info(&pdev->dib);
375 clear_dib_info(&pdev->brush_dib);
376 push_dc_driver( dev, &pdev->dev, &dib_driver );
377 return TRUE;
380 /***********************************************************************
381 * dibdrv_DeleteDC
383 static BOOL dibdrv_DeleteDC( PHYSDEV dev )
385 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
386 TRACE("(%p)\n", dev);
387 DeleteObject(pdev->clip);
388 free_pattern_brush(pdev);
389 free_dib_info(&pdev->dib);
390 HeapFree( GetProcessHeap(), 0, pdev );
391 return TRUE;
394 /***********************************************************************
395 * dibdrv_CopyBitmap
397 static BOOL dibdrv_CopyBitmap( HBITMAP src, HBITMAP dst )
399 return nulldrv_CopyBitmap( src, dst );
402 /***********************************************************************
403 * dibdrv_DeleteBitmap
405 static BOOL dibdrv_DeleteBitmap( HBITMAP bitmap )
407 return TRUE;
410 /***********************************************************************
411 * dibdrv_SelectBitmap
413 static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
415 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectBitmap );
416 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
417 BITMAPOBJ *bmp = GDI_GetObjPtr( bitmap, OBJ_BITMAP );
418 TRACE("(%p, %p)\n", dev, bitmap);
420 if (!bmp) return 0;
422 free_dib_info(&pdev->dib);
423 pdev->defer = 0;
424 if(!init_dib_info_from_bitmapobj(&pdev->dib, bmp, private_color_table))
425 pdev->defer |= DEFER_FORMAT;
427 GDI_ReleaseObj( bitmap );
429 return next->funcs->pSelectBitmap( next, bitmap );
432 /***********************************************************************
433 * dibdrv_SetBkColor
435 static COLORREF dibdrv_SetBkColor( PHYSDEV dev, COLORREF color )
437 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkColor );
438 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
440 pdev->bkgnd_color = get_pixel_color( pdev, color, FALSE );
442 if( GetBkMode(dev->hdc) == OPAQUE )
443 calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
444 else
446 pdev->bkgnd_and = ~0u;
447 pdev->bkgnd_xor = 0;
450 update_fg_colors( pdev ); /* Only needed in the 1 bpp case */
452 return next->funcs->pSetBkColor( next, color );
455 /***********************************************************************
456 * dibdrv_SetBkMode
458 static INT dibdrv_SetBkMode( PHYSDEV dev, INT mode )
460 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkMode );
461 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
463 if( mode == OPAQUE )
464 calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
465 else
467 pdev->bkgnd_and = ~0u;
468 pdev->bkgnd_xor = 0;
471 return next->funcs->pSetBkMode( next, mode );
474 /***********************************************************************
475 * dibdrv_SetDeviceClipping
477 static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
479 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDeviceClipping );
480 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
481 TRACE("(%p, %p, %p)\n", dev, vis_rgn, clip_rgn);
483 CombineRgn( pdev->clip, vis_rgn, clip_rgn, clip_rgn ? RGN_AND : RGN_COPY );
484 return next->funcs->pSetDeviceClipping( next, vis_rgn, clip_rgn);
487 /***********************************************************************
488 * dibdrv_SetDIBColorTable
490 static UINT dibdrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RGBQUAD *colors )
492 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDIBColorTable );
493 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
494 TRACE("(%p, %d, %d, %p)\n", dev, pos, count, colors);
496 if( pdev->dib.color_table && pos < pdev->dib.color_table_size )
498 if( pos + count > pdev->dib.color_table_size ) count = pdev->dib.color_table_size - pos;
499 memcpy( pdev->dib.color_table + pos, colors, count * sizeof(RGBQUAD) );
501 pdev->bkgnd_color = get_pixel_color( pdev, GetBkColor( dev->hdc ), FALSE );
502 update_fg_colors( pdev );
504 update_masks( pdev, GetROP2( dev->hdc ) );
506 return next->funcs->pSetDIBColorTable( next, pos, count, colors );
509 /***********************************************************************
510 * dibdrv_SetROP2
512 static INT dibdrv_SetROP2( PHYSDEV dev, INT rop )
514 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetROP2 );
515 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
517 update_masks( pdev, rop );
519 return next->funcs->pSetROP2( next, rop );
522 /***********************************************************************
523 * dibdrv_SetTextColor
525 static COLORREF dibdrv_SetTextColor( PHYSDEV dev, COLORREF color )
527 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetTextColor );
528 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
530 pdev->text_color = get_pixel_color( pdev, color, TRUE );
531 update_aa_ranges( pdev );
533 return next->funcs->pSetTextColor( next, color );
536 const struct gdi_dc_funcs dib_driver =
538 NULL, /* pAbortDoc */
539 NULL, /* pAbortPath */
540 dibdrv_AlphaBlend, /* pAlphaBlend */
541 NULL, /* pAngleArc */
542 NULL, /* pArc */
543 NULL, /* pArcTo */
544 NULL, /* pBeginPath */
545 dibdrv_BlendImage, /* pBlendImage */
546 NULL, /* pChoosePixelFormat */
547 NULL, /* pChord */
548 NULL, /* pCloseFigure */
549 dibdrv_CopyBitmap, /* pCopyBitmap */
550 NULL, /* pCreateBitmap */
551 NULL, /* pCreateCompatibleDC */
552 dibdrv_CreateDC, /* pCreateDC */
553 NULL, /* pCreateDIBSection */
554 dibdrv_DeleteBitmap, /* pDeleteBitmap */
555 dibdrv_DeleteDC, /* pDeleteDC */
556 NULL, /* pDeleteObject */
557 NULL, /* pDescribePixelFormat */
558 NULL, /* pDeviceCapabilities */
559 NULL, /* pEllipse */
560 NULL, /* pEndDoc */
561 NULL, /* pEndPage */
562 NULL, /* pEndPath */
563 NULL, /* pEnumFonts */
564 NULL, /* pEnumICMProfiles */
565 NULL, /* pExcludeClipRect */
566 NULL, /* pExtDeviceMode */
567 NULL, /* pExtEscape */
568 NULL, /* pExtFloodFill */
569 NULL, /* pExtSelectClipRgn */
570 dibdrv_ExtTextOut, /* pExtTextOut */
571 NULL, /* pFillPath */
572 NULL, /* pFillRgn */
573 NULL, /* pFlattenPath */
574 NULL, /* pFontIsLinked */
575 NULL, /* pFrameRgn */
576 NULL, /* pGdiComment */
577 NULL, /* pGdiRealizationInfo */
578 NULL, /* pGetCharABCWidths */
579 NULL, /* pGetCharABCWidthsI */
580 NULL, /* pGetCharWidth */
581 NULL, /* pGetDeviceCaps */
582 NULL, /* pGetDeviceGammaRamp */
583 NULL, /* pGetFontData */
584 NULL, /* pGetFontUnicodeRanges */
585 NULL, /* pGetGlyphIndices */
586 NULL, /* pGetGlyphOutline */
587 NULL, /* pGetICMProfile */
588 dibdrv_GetImage, /* pGetImage */
589 NULL, /* pGetKerningPairs */
590 NULL, /* pGetNearestColor */
591 NULL, /* pGetOutlineTextMetrics */
592 dibdrv_GetPixel, /* pGetPixel */
593 NULL, /* pGetPixelFormat */
594 NULL, /* pGetSystemPaletteEntries */
595 NULL, /* pGetTextCharsetInfo */
596 NULL, /* pGetTextExtentExPoint */
597 NULL, /* pGetTextExtentExPointI */
598 NULL, /* pGetTextFace */
599 NULL, /* pGetTextMetrics */
600 dibdrv_GradientFill, /* pGradientFill */
601 NULL, /* pIntersectClipRect */
602 NULL, /* pInvertRgn */
603 dibdrv_LineTo, /* pLineTo */
604 NULL, /* pModifyWorldTransform */
605 NULL, /* pMoveTo */
606 NULL, /* pOffsetClipRgn */
607 NULL, /* pOffsetViewportOrg */
608 NULL, /* pOffsetWindowOrg */
609 dibdrv_PaintRgn, /* pPaintRgn */
610 dibdrv_PatBlt, /* pPatBlt */
611 NULL, /* pPie */
612 NULL, /* pPolyBezier */
613 NULL, /* pPolyBezierTo */
614 NULL, /* pPolyDraw */
615 NULL, /* pPolyPolygon */
616 dibdrv_PolyPolyline, /* pPolyPolyline */
617 NULL, /* pPolygon */
618 dibdrv_Polyline, /* pPolyline */
619 NULL, /* pPolylineTo */
620 dibdrv_PutImage, /* pPutImage */
621 NULL, /* pRealizeDefaultPalette */
622 NULL, /* pRealizePalette */
623 dibdrv_Rectangle, /* pRectangle */
624 NULL, /* pResetDC */
625 NULL, /* pRestoreDC */
626 NULL, /* pRoundRect */
627 NULL, /* pSaveDC */
628 NULL, /* pScaleViewportExt */
629 NULL, /* pScaleWindowExt */
630 dibdrv_SelectBitmap, /* pSelectBitmap */
631 dibdrv_SelectBrush, /* pSelectBrush */
632 NULL, /* pSelectClipPath */
633 NULL, /* pSelectFont */
634 NULL, /* pSelectPalette */
635 dibdrv_SelectPen, /* pSelectPen */
636 NULL, /* pSetArcDirection */
637 dibdrv_SetBkColor, /* pSetBkColor */
638 dibdrv_SetBkMode, /* pSetBkMode */
639 dibdrv_SetDCBrushColor, /* pSetDCBrushColor */
640 dibdrv_SetDCPenColor, /* pSetDCPenColor */
641 dibdrv_SetDIBColorTable, /* pSetDIBColorTable */
642 NULL, /* pSetDIBitsToDevice */
643 dibdrv_SetDeviceClipping, /* pSetDeviceClipping */
644 NULL, /* pSetDeviceGammaRamp */
645 NULL, /* pSetLayout */
646 NULL, /* pSetMapMode */
647 NULL, /* pSetMapperFlags */
648 dibdrv_SetPixel, /* pSetPixel */
649 NULL, /* pSetPixelFormat */
650 NULL, /* pSetPolyFillMode */
651 dibdrv_SetROP2, /* pSetROP2 */
652 NULL, /* pSetRelAbs */
653 NULL, /* pSetStretchBltMode */
654 NULL, /* pSetTextAlign */
655 NULL, /* pSetTextCharacterExtra */
656 dibdrv_SetTextColor, /* pSetTextColor */
657 NULL, /* pSetTextJustification */
658 NULL, /* pSetViewportExt */
659 NULL, /* pSetViewportOrg */
660 NULL, /* pSetWindowExt */
661 NULL, /* pSetWindowOrg */
662 NULL, /* pSetWorldTransform */
663 NULL, /* pStartDoc */
664 NULL, /* pStartPage */
665 dibdrv_StretchBlt, /* pStretchBlt */
666 NULL, /* pStretchDIBits */
667 NULL, /* pStrokeAndFillPath */
668 NULL, /* pStrokePath */
669 NULL, /* pSwapBuffers */
670 NULL, /* pUnrealizePalette */
671 NULL, /* pWidenPath */
672 NULL, /* pwglCopyContext */
673 NULL, /* pwglCreateContext */
674 NULL, /* pwglCreateContextAttribsARB */
675 NULL, /* pwglDeleteContext */
676 NULL, /* pwglGetPbufferDCARB */
677 NULL, /* pwglGetProcAddress */
678 NULL, /* pwglMakeContextCurrentARB */
679 NULL, /* pwglMakeCurrent */
680 NULL, /* pwglSetPixelFormatWINE */
681 NULL, /* pwglShareLists */
682 NULL, /* pwglUseFontBitmapsA */
683 NULL /* pwglUseFontBitmapsW */