Release 970415
[wine/multimedia.git] / graphics / painting.c
blobce6a39575251d1ecae2eb65810005166b2260ee8
1 /*
2 * Misc. graphics operations
4 * Copyright 1993, 1994 Alexandre Julliard
5 */
7 #include <math.h>
8 #include <stdlib.h>
9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h>
11 #include <X11/Intrinsic.h>
12 #ifndef PI
13 #define PI M_PI
14 #endif
15 #include "gdi.h"
16 #include "dc.h"
17 #include "bitmap.h"
18 #include "callback.h"
19 #include "metafile.h"
20 #include "syscolor.h"
21 #include "palette.h"
22 #include "color.h"
23 #include "region.h"
24 #include "stddebug.h"
25 #include "debug.h"
26 #include "xmalloc.h"
29 /***********************************************************************
30 * LineTo16 (GDI.19)
32 BOOL16 LineTo16( HDC16 hdc, INT16 x, INT16 y )
34 return LineTo32( hdc, x, y );
38 /***********************************************************************
39 * LineTo32 (GDI32.249)
41 BOOL32 LineTo32( HDC32 hdc, INT32 x, INT32 y )
43 DC * dc = DC_GetDCPtr( hdc );
45 return dc && dc->funcs->pLineTo &&
46 dc->funcs->pLineTo(dc,x,y);
50 /***********************************************************************
51 * MoveTo (GDI.20)
53 DWORD MoveTo( HDC16 hdc, INT16 x, INT16 y )
55 POINT16 pt;
57 if (!MoveToEx16(hdc,x,y,&pt))
58 return 0;
59 return MAKELONG(pt.x,pt.y);
63 /***********************************************************************
64 * MoveToEx16 (GDI.483)
66 BOOL16 MoveToEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
68 POINT32 pt32;
70 if (!MoveToEx32( (HDC32)hdc, (INT32)x, (INT32)y, &pt32 )) return FALSE;
71 if (pt) CONV_POINT32TO16( &pt32, pt );
72 return TRUE;
77 /***********************************************************************
78 * MoveToEx32 (GDI32.254)
80 BOOL32 MoveToEx32( HDC32 hdc, INT32 x, INT32 y, LPPOINT32 pt )
82 DC * dc = DC_GetDCPtr( hdc );
84 return dc && dc->funcs->pMoveToEx &&
85 dc->funcs->pMoveToEx(dc,x,y,pt);
89 /***********************************************************************
90 * Arc16 (GDI.23)
92 BOOL16 Arc16( HDC16 hdc, INT16 left, INT16 top, INT16 right, INT16 bottom,
93 INT16 xstart, INT16 ystart, INT16 xend, INT16 yend )
95 return Arc32( (HDC32)hdc, (INT32)left, (INT32)top, (INT32)right,
96 (INT32)bottom, (INT32)xstart, (INT32)ystart, (INT32)xend,
97 (INT32)yend );
101 /***********************************************************************
102 * Arc32 (GDI32.7)
104 BOOL32 Arc32( HDC32 hdc, INT32 left, INT32 top, INT32 right, INT32 bottom,
105 INT32 xstart, INT32 ystart, INT32 xend, INT32 yend )
107 DC * dc = DC_GetDCPtr( hdc );
109 return dc && dc->funcs->pArc &&
110 dc->funcs->pArc(dc,left,top,right,bottom,xstart,ystart,xend,yend);
114 /***********************************************************************
115 * Pie16 (GDI.26)
117 BOOL16 Pie16( HDC16 hdc, INT16 left, INT16 top, INT16 right, INT16 bottom,
118 INT16 xstart, INT16 ystart, INT16 xend, INT16 yend )
120 return Pie32( (HDC32)hdc, (INT32)left, (INT32)top, (INT32)right,
121 (INT32)bottom, (INT32)xstart, (INT32)ystart, (INT32)xend,
122 (INT32)yend );
126 /***********************************************************************
127 * Pie32 (GDI32.262)
129 BOOL32 Pie32( HDC32 hdc, INT32 left, INT32 top, INT32 right, INT32 bottom,
130 INT32 xstart, INT32 ystart, INT32 xend, INT32 yend )
132 DC * dc = DC_GetDCPtr( hdc );
134 return dc && dc->funcs->pPie &&
135 dc->funcs->pPie(dc,left,top,right,bottom,xstart,ystart,xend,yend);
139 /***********************************************************************
140 * Chord16 (GDI.348)
142 BOOL16 Chord16( HDC16 hdc, INT16 left, INT16 top, INT16 right, INT16 bottom,
143 INT16 xstart, INT16 ystart, INT16 xend, INT16 yend )
145 return Chord32( hdc, left, top, right, bottom, xstart, ystart, xend, yend );
149 /***********************************************************************
150 * Chord32 (GDI32.14)
152 BOOL32 Chord32( HDC32 hdc, INT32 left, INT32 top, INT32 right, INT32 bottom,
153 INT32 xstart, INT32 ystart, INT32 xend, INT32 yend )
155 DC * dc = DC_GetDCPtr( hdc );
157 return dc && dc->funcs->pChord &&
158 dc->funcs->pChord(dc,left,top,right,bottom,xstart,ystart,xend,yend);
162 /***********************************************************************
163 * Ellipse16 (GDI.24)
165 BOOL16 Ellipse16( HDC16 hdc, INT16 left, INT16 top, INT16 right, INT16 bottom )
167 return Ellipse32( hdc, left, top, right, bottom );
171 /***********************************************************************
172 * Ellipse32 (GDI32.75)
174 BOOL32 Ellipse32( HDC32 hdc, INT32 left, INT32 top, INT32 right, INT32 bottom )
176 DC * dc = DC_GetDCPtr( hdc );
178 return dc && dc->funcs->pEllipse &&
179 dc->funcs->pEllipse(dc,left,top,right,bottom);
183 /***********************************************************************
184 * Rectangle16 (GDI.27)
186 BOOL16 Rectangle16(HDC16 hdc, INT16 left, INT16 top, INT16 right, INT16 bottom)
188 return Rectangle32( hdc, left, top, right, bottom );
192 /***********************************************************************
193 * Rectangle32 (GDI32.283)
195 BOOL32 Rectangle32(HDC32 hdc, INT32 left, INT32 top, INT32 right, INT32 bottom)
197 DC * dc = DC_GetDCPtr( hdc );
199 return dc && dc->funcs->pRectangle &&
200 dc->funcs->pRectangle(dc,left,top,right,bottom);
204 /***********************************************************************
205 * RoundRect16 (GDI.28)
207 BOOL16 RoundRect16( HDC16 hdc, INT16 left, INT16 top, INT16 right,
208 INT16 bottom, INT16 ell_width, INT16 ell_height )
210 return RoundRect32( hdc, left, top, right, bottom, ell_width, ell_height );
214 /***********************************************************************
215 * RoundRect32 (GDI32.291)
217 BOOL32 RoundRect32( HDC32 hdc, INT32 left, INT32 top, INT32 right,
218 INT32 bottom, INT32 ell_width, INT32 ell_height )
220 DC * dc = DC_GetDCPtr( hdc );
222 return dc && dc->funcs->pRoundRect &&
223 dc->funcs->pRoundRect(dc,left,top,right,bottom,ell_width,ell_height);
227 /***********************************************************************
228 * FillRect16 (USER.81)
230 INT16 FillRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
232 HBRUSH16 prevBrush;
234 /* coordinates are logical so we cannot fast-check 'rect',
235 * it will be done later in the PatBlt().
238 if (!(prevBrush = SelectObject16( hdc, hbrush ))) return 0;
239 PatBlt32( hdc, rect->left, rect->top,
240 rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
241 SelectObject16( hdc, prevBrush );
242 return 1;
246 /***********************************************************************
247 * FillRect32 (USER32.196)
249 INT32 FillRect32( HDC32 hdc, const RECT32 *rect, HBRUSH32 hbrush )
251 HBRUSH32 prevBrush;
253 if (!(prevBrush = SelectObject32( hdc, hbrush ))) return 0;
254 PatBlt32( hdc, rect->left, rect->top,
255 rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
256 SelectObject32( hdc, prevBrush );
257 return 1;
261 /***********************************************************************
262 * InvertRect16 (USER.82)
264 void InvertRect16( HDC16 hdc, const RECT16 *rect )
266 PatBlt32( hdc, rect->left, rect->top,
267 rect->right - rect->left, rect->bottom - rect->top, DSTINVERT );
271 /***********************************************************************
272 * InvertRect32 (USER32.329)
274 void InvertRect32( HDC32 hdc, const RECT32 *rect )
276 PatBlt32( hdc, rect->left, rect->top,
277 rect->right - rect->left, rect->bottom - rect->top, DSTINVERT );
281 /***********************************************************************
282 * FrameRect16 (USER.83)
284 INT16 FrameRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
286 HBRUSH16 prevBrush;
287 int left, top, right, bottom;
289 DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
290 if (!dc) return FALSE;
292 left = XLPTODP( dc, rect->left );
293 top = YLPTODP( dc, rect->top );
294 right = XLPTODP( dc, rect->right );
295 bottom = YLPTODP( dc, rect->bottom );
297 if ( (right <= left) || (bottom <= top) ) return 0;
298 if (!(prevBrush = SelectObject16( hdc, hbrush ))) return 0;
300 if (DC_SetupGCForBrush( dc ))
302 PatBlt32( hdc, rect->left, rect->top, 1,
303 rect->bottom - rect->top, PATCOPY );
304 PatBlt32( hdc, rect->right - 1, rect->top, 1,
305 rect->bottom - rect->top, PATCOPY );
306 PatBlt32( hdc, rect->left, rect->top,
307 rect->right - rect->left, 1, PATCOPY );
308 PatBlt32( hdc, rect->left, rect->bottom - 1,
309 rect->right - rect->left, 1, PATCOPY );
311 SelectObject16( hdc, prevBrush );
312 return 1;
316 /***********************************************************************
317 * FrameRect32 (USER32.202)
319 INT32 FrameRect32( HDC32 hdc, const RECT32 *rect, HBRUSH32 hbrush )
321 RECT16 rect16;
322 CONV_RECT32TO16( rect, &rect16 );
323 return FrameRect16( (HDC16)hdc, &rect16, (HBRUSH16)hbrush );
327 /***********************************************************************
328 * SetPixel16 (GDI.31)
330 COLORREF SetPixel16( HDC16 hdc, INT16 x, INT16 y, COLORREF color )
332 return SetPixel32( hdc, x, y, color );
336 /***********************************************************************
337 * SetPixel32 (GDI32.327)
339 COLORREF SetPixel32( HDC32 hdc, INT32 x, INT32 y, COLORREF color )
341 DC * dc = DC_GetDCPtr( hdc );
343 if (!dc || !dc->funcs->pSetPixel) return 0;
344 return dc->funcs->pSetPixel(dc,x,y,color);
348 /***********************************************************************
349 * GetPixel16 (GDI.83)
351 COLORREF GetPixel16( HDC16 hdc, INT16 x, INT16 y )
353 return GetPixel32( hdc, x, y );
357 /***********************************************************************
358 * GetPixel32 (GDI32.211)
360 COLORREF GetPixel32( HDC32 hdc, INT32 x, INT32 y )
362 DC * dc = DC_GetDCPtr( hdc );
364 if (!dc) return 0;
365 #ifdef SOLITAIRE_SPEED_HACK
366 return 0;
367 #endif
369 /* FIXME: should this be in the graphics driver? */
370 if (!PtVisible32( hdc, x, y )) return 0;
371 if (!dc || !dc->funcs->pGetPixel) return 0;
372 return dc->funcs->pGetPixel(dc,x,y);
376 /***********************************************************************
377 * PaintRgn16 (GDI.43)
379 BOOL16 PaintRgn16( HDC16 hdc, HRGN16 hrgn )
381 return PaintRgn32( hdc, hrgn );
385 /***********************************************************************
386 * PaintRgn32 (GDI32.259)
388 BOOL32 PaintRgn32( HDC32 hdc, HRGN32 hrgn )
390 DC * dc = DC_GetDCPtr( hdc );
392 return dc && dc->funcs->pPaintRgn &&
393 dc->funcs->pPaintRgn(dc,hrgn);
397 /***********************************************************************
398 * FillRgn16 (GDI.40)
400 BOOL16 FillRgn16( HDC16 hdc, HRGN16 hrgn, HBRUSH16 hbrush )
402 return FillRgn32( hdc, hrgn, hbrush );
406 /***********************************************************************
407 * FillRgn32 (GDI32.101)
409 BOOL32 FillRgn32( HDC32 hdc, HRGN32 hrgn, HBRUSH32 hbrush )
411 BOOL32 retval;
412 HBRUSH32 prevBrush = SelectObject32( hdc, hbrush );
413 if (!prevBrush) return FALSE;
414 retval = PaintRgn32( hdc, hrgn );
415 SelectObject32( hdc, prevBrush );
416 return retval;
420 /***********************************************************************
421 * FrameRgn16 (GDI.41)
423 BOOL16 FrameRgn16( HDC16 hdc, HRGN16 hrgn, HBRUSH16 hbrush,
424 INT16 nWidth, INT16 nHeight )
426 return FrameRgn32( hdc, hrgn, hbrush, nWidth, nHeight );
430 /***********************************************************************
431 * FrameRgn32 (GDI32.105)
433 BOOL32 FrameRgn32( HDC32 hdc, HRGN32 hrgn, HBRUSH32 hbrush,
434 INT32 nWidth, INT32 nHeight )
436 HRGN32 tmp = CreateRectRgn32( 0, 0, 0, 0 );
437 if(!REGION_FrameRgn( tmp, hrgn, nWidth, nHeight )) return FALSE;
438 FillRgn32( hdc, tmp, hbrush );
439 DeleteObject32( tmp );
440 return TRUE;
444 /***********************************************************************
445 * InvertRgn16 (GDI.42)
447 BOOL16 InvertRgn16( HDC16 hdc, HRGN16 hrgn )
449 return InvertRgn32( hdc, hrgn );
453 /***********************************************************************
454 * InvertRgn32 (GDI32.246)
456 BOOL32 InvertRgn32( HDC32 hdc, HRGN32 hrgn )
458 HBRUSH32 prevBrush = SelectObject32( hdc, GetStockObject32(BLACK_BRUSH) );
459 INT32 prevROP = SetROP232( hdc, R2_NOT );
460 BOOL32 retval = PaintRgn32( hdc, hrgn );
461 SelectObject32( hdc, prevBrush );
462 SetROP232( hdc, prevROP );
463 return retval;
467 /***********************************************************************
468 * DrawFocusRect16 (USER.466)
470 void DrawFocusRect16( HDC16 hdc, const RECT16* rc )
472 RECT32 rect32;
473 CONV_RECT16TO32( rc, &rect32 );
474 DrawFocusRect32( hdc, &rect32 );
478 /***********************************************************************
479 * DrawFocusRect32 (USER32.155)
481 * FIXME: should use Rectangle32!
483 void DrawFocusRect32( HDC32 hdc, const RECT32* rc )
485 HPEN32 hOldPen;
486 INT32 oldDrawMode, oldBkMode;
487 INT32 left, top, right, bottom;
489 DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
490 if (!dc) return;
492 left = XLPTODP( dc, rc->left );
493 top = YLPTODP( dc, rc->top );
494 right = XLPTODP( dc, rc->right );
495 bottom = YLPTODP( dc, rc->bottom );
497 hOldPen = SelectObject32( hdc, sysColorObjects.hpenWindowText );
498 oldDrawMode = SetROP232(hdc, R2_XORPEN);
499 oldBkMode = SetBkMode32(hdc, TRANSPARENT);
501 /* Hack: make sure the XORPEN operation has an effect */
502 dc->u.x.pen.pixel = (1 << screenDepth) - 1;
504 if (DC_SetupGCForPen( dc ))
505 XDrawRectangle( display, dc->u.x.drawable, dc->u.x.gc,
506 dc->w.DCOrgX + left, dc->w.DCOrgY + top,
507 right-left-1, bottom-top-1 );
509 SetBkMode32(hdc, oldBkMode);
510 SetROP232(hdc, oldDrawMode);
511 SelectObject32(hdc, hOldPen);
515 /**********************************************************************
516 * Polyline16 (GDI.37)
518 BOOL16 Polyline16( HDC16 hdc, LPPOINT16 pt, INT16 count )
520 register int i;
521 LPPOINT32 pt32 = (LPPOINT32)xmalloc(count*sizeof(POINT32));
522 BOOL16 ret;
524 for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
525 ret = Polyline32(hdc,pt32,count);
526 free(pt32);
527 return ret;
531 /**********************************************************************
532 * Polyline32 (GDI32.276)
534 BOOL32 Polyline32( HDC32 hdc, const LPPOINT32 pt, INT32 count )
536 DC * dc = DC_GetDCPtr( hdc );
538 return dc && dc->funcs->pPolyline &&
539 dc->funcs->pPolyline(dc,pt,count);
543 /**********************************************************************
544 * Polygon16 (GDI.36)
546 BOOL16 Polygon16( HDC16 hdc, LPPOINT16 pt, INT16 count )
548 register int i;
549 LPPOINT32 pt32 = (LPPOINT32)xmalloc(count*sizeof(POINT32));
550 BOOL32 ret;
553 for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
554 ret = Polygon32(hdc,pt32,count);
555 free(pt32);
556 return ret;
560 /**********************************************************************
561 * Polygon32 (GDI32.275)
563 BOOL32 Polygon32( HDC32 hdc, LPPOINT32 pt, INT32 count )
565 DC * dc = DC_GetDCPtr( hdc );
567 return dc && dc->funcs->pPolygon &&
568 dc->funcs->pPolygon(dc,pt,count);
572 /**********************************************************************
573 * PolyPolygon16 (GDI.450)
575 BOOL16 PolyPolygon16( HDC16 hdc, LPPOINT16 pt, LPINT16 counts, UINT16 polygons)
577 int i,nrpts;
578 LPPOINT32 pt32;
579 LPINT32 counts32;
580 BOOL16 ret;
582 nrpts=0;
583 for (i=polygons;i--;)
584 nrpts+=counts[i];
585 pt32 = (LPPOINT32)xmalloc(sizeof(POINT32)*nrpts);
586 for (i=nrpts;i--;)
587 CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
588 counts32 = (LPINT32)xmalloc(polygons*sizeof(INT32));
589 for (i=polygons;i--;) counts32[i]=counts[i];
591 ret = PolyPolygon32(hdc,pt32,counts32,polygons);
592 free(counts32);
593 free(pt32);
594 return ret;
597 /**********************************************************************
598 * PolyPolygon32 (GDI.450)
600 BOOL32 PolyPolygon32( HDC32 hdc, LPPOINT32 pt, LPINT32 counts, UINT32 polygons)
602 DC * dc = DC_GetDCPtr( hdc );
604 return dc && dc->funcs->pPolyPolygon &&
605 dc->funcs->pPolyPolygon(dc,pt,counts,polygons);
608 /**********************************************************************
609 * ExtFloodFill16 (GDI.372)
611 BOOL16 ExtFloodFill16( HDC16 hdc, INT16 x, INT16 y, COLORREF color,
612 UINT16 fillType )
614 return ExtFloodFill32( hdc, x, y, color, fillType );
618 /**********************************************************************
619 * ExtFloodFill32 (GDI32.96)
621 BOOL32 ExtFloodFill32( HDC32 hdc, INT32 x, INT32 y, COLORREF color,
622 UINT32 fillType )
624 DC *dc = DC_GetDCPtr( hdc );
626 return dc && dc->funcs->pExtFloodFill &&
627 dc->funcs->pExtFloodFill(dc,x,y,color,fillType);
631 /**********************************************************************
632 * FloodFill16 (GDI.25)
634 BOOL16 FloodFill16( HDC16 hdc, INT16 x, INT16 y, COLORREF color )
636 return ExtFloodFill32( hdc, x, y, color, FLOODFILLBORDER );
640 /**********************************************************************
641 * FloodFill32 (GDI32.104)
643 BOOL32 FloodFill32( HDC32 hdc, INT32 x, INT32 y, COLORREF color )
645 return ExtFloodFill32( hdc, x, y, color, FLOODFILLBORDER );
649 /**********************************************************************
650 * DrawEdge16 (USER.659)
652 BOOL16 DrawEdge16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
654 RECT32 rect32;
655 BOOL32 ret;
657 CONV_RECT16TO32( rc, &rect32 );
658 ret = DrawEdge32( hdc, &rect32, edge, flags );
659 CONV_RECT32TO16( &rect32, rc );
660 return ret;
664 /**********************************************************************
665 * DrawEdge32 (USER32.154)
667 BOOL32 DrawEdge32( HDC32 hdc, LPRECT32 rc, UINT32 edge, UINT32 flags )
669 HBRUSH32 hbrushOld;
671 if (flags >= BF_DIAGONAL)
672 fprintf( stderr, "DrawEdge: unsupported flags %04x\n", flags );
674 dprintf_graphics( stddeb, "DrawEdge: %04x %d,%d-%d,%d %04x %04x\n",
675 hdc, rc->left, rc->top, rc->right, rc->bottom,
676 edge, flags );
678 /* First do all the raised edges */
680 hbrushOld = SelectObject32( hdc, sysColorObjects.hbrushBtnHighlight );
681 if (edge & BDR_RAISEDOUTER)
683 if (flags & BF_LEFT) PatBlt32( hdc, rc->left, rc->top,
684 1, rc->bottom - rc->top - 1, PATCOPY );
685 if (flags & BF_TOP) PatBlt32( hdc, rc->left, rc->top,
686 rc->right - rc->left - 1, 1, PATCOPY );
688 if (edge & BDR_SUNKENOUTER)
690 if (flags & BF_RIGHT) PatBlt32( hdc, rc->right - 1, rc->top,
691 1, rc->bottom - rc->top, PATCOPY );
692 if (flags & BF_BOTTOM) PatBlt32( hdc, rc->left, rc->bottom - 1,
693 rc->right - rc->left, 1, PATCOPY );
695 if (edge & BDR_RAISEDINNER)
697 if (flags & BF_LEFT) PatBlt32( hdc, rc->left + 1, rc->top + 1,
698 1, rc->bottom - rc->top - 2, PATCOPY );
699 if (flags & BF_TOP) PatBlt32( hdc, rc->left + 1, rc->top + 1,
700 rc->right - rc->left - 2, 1, PATCOPY );
702 if (edge & BDR_SUNKENINNER)
704 if (flags & BF_RIGHT) PatBlt32( hdc, rc->right - 2, rc->top + 1,
705 1, rc->bottom - rc->top - 2, PATCOPY );
706 if (flags & BF_BOTTOM) PatBlt32( hdc, rc->left + 1, rc->bottom - 2,
707 rc->right - rc->left - 2, 1, PATCOPY );
710 /* Then do all the sunken edges */
712 SelectObject32( hdc, sysColorObjects.hbrushBtnShadow );
713 if (edge & BDR_SUNKENOUTER)
715 if (flags & BF_LEFT) PatBlt32( hdc, rc->left, rc->top,
716 1, rc->bottom - rc->top - 1, PATCOPY );
717 if (flags & BF_TOP) PatBlt32( hdc, rc->left, rc->top,
718 rc->right - rc->left - 1, 1, PATCOPY );
720 if (edge & BDR_RAISEDOUTER)
722 if (flags & BF_RIGHT) PatBlt32( hdc, rc->right - 1, rc->top,
723 1, rc->bottom - rc->top, PATCOPY );
724 if (flags & BF_BOTTOM) PatBlt32( hdc, rc->left, rc->bottom - 1,
725 rc->right - rc->left, 1, PATCOPY );
727 if (edge & BDR_SUNKENINNER)
729 if (flags & BF_LEFT) PatBlt32( hdc, rc->left + 1, rc->top + 1,
730 1, rc->bottom - rc->top - 2, PATCOPY );
731 if (flags & BF_TOP) PatBlt32( hdc, rc->left + 1, rc->top + 1,
732 rc->right - rc->left - 2, 1, PATCOPY );
734 if (edge & BDR_RAISEDINNER)
736 if (flags & BF_RIGHT) PatBlt32( hdc, rc->right - 2, rc->top + 1,
737 1, rc->bottom - rc->top - 2, PATCOPY );
738 if (flags & BF_BOTTOM) PatBlt32( hdc, rc->left + 1, rc->bottom - 2,
739 rc->right - rc->left - 2, 1, PATCOPY );
742 SelectObject32( hdc, hbrushOld );
743 return TRUE;
747 /**********************************************************************
748 * DrawFrameControl16 (USER.656)
750 BOOL16 DrawFrameControl16( HDC16 hdc, LPRECT16 rc, UINT16 edge, UINT16 flags )
752 fprintf( stdnimp,"DrawFrameControl16(%x,%p,%d,%x), empty stub!\n",
753 hdc,rc,edge,flags );
754 return TRUE;
758 /**********************************************************************
759 * DrawFrameControl32 (USER32.157)
761 BOOL32 DrawFrameControl32( HDC32 hdc, LPRECT32 rc, UINT32 edge, UINT32 flags )
763 fprintf( stdnimp,"DrawFrameControl32(%x,%p,%d,%x), empty stub!\n",
764 hdc,rc,edge,flags );
765 return TRUE;