Changeset 12935


Ignore:
Timestamp:
Jan 7, 2000, 6:37:53 PM (25 years ago)
Author:
cbratschi
Message:

fixed PatBlt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/gdi32/gdi32.cpp

    r12857 r12935  
    1 /* $Id: gdi32.cpp,v 1.28 1999-12-30 18:51:48 sandervl Exp $ */
     1/* $Id: gdi32.cpp,v 1.29 2000-01-07 17:37:53 cbratschi Exp $ */
    22
    33/*
     
    164164
    165165  if(size == 0 || lpBuffer == NULL) {
    166         SetLastError(ERROR_INVALID_PARAMETER);
    167         return 0;
     166        SetLastError(ERROR_INVALID_PARAMETER);
     167        return 0;
    168168  }
    169169
    170170  if(DIBSection::getSection() != NULL)
    171171  {
    172         DIBSection *dsect = DIBSection::find(hObject);
    173         if(dsect)
    174         {
    175                 rc = dsect->GetDIBSection(size, lpBuffer);
    176                 if(rc == 0) {
    177                         SetLastError(ERROR_INVALID_PARAMETER);
    178                         return 0;
    179                 }
    180                 SetLastError(ERROR_SUCCESS);
    181                 return rc;
    182         }
     172        DIBSection *dsect = DIBSection::find(hObject);
     173        if(dsect)
     174        {
     175                rc = dsect->GetDIBSection(size, lpBuffer);
     176                if(rc == 0) {
     177                        SetLastError(ERROR_INVALID_PARAMETER);
     178                        return 0;
     179                }
     180                SetLastError(ERROR_SUCCESS);
     181                return rc;
     182        }
    183183  }
    184184
     
    915915{
    916916    if(lpRect == NULL) {
    917         SetLastError(ERROR_INVALID_PARAMETER);
    918         return 0;
     917        SetLastError(ERROR_INVALID_PARAMETER);
     918        return 0;
    919919    }
    920920    dprintf(("GDI32: CreateRectRgnIndirect (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
     
    923923//******************************************************************************
    924924//******************************************************************************
    925 HRGN WIN32API CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, 
     925HRGN WIN32API CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect,
    926926                                 int nWidthEllipse, int nHeightEllipse)
    927927{
     
    995995//******************************************************************************
    996996//******************************************************************************
    997 BOOL WIN32API PatBlt( HDC arg1, int arg2, int arg3, int arg4, int arg5, DWORD  arg6)
    998 {
    999  BOOL rc;
    1000 
    1001   rc = O32_PatBlt(arg1, arg2, arg3, arg4, arg5, arg6);
    1002   dprintf(("GDI32: PatBlt (%d,%d) (%d,%d) returned %d\n", arg2, arg3, arg4, arg5, rc));
     997BOOL WIN32API PatBlt(HDC hdc,int nXLeft,int nYLeft,int nWidth,int nHeight,DWORD dwRop)
     998{
     999  BOOL rc;
     1000
     1001  //CB: Open32 bug: negative width/height not supported!
     1002  if (nWidth < 0)
     1003  {
     1004    nXLeft += nWidth+1;
     1005    nWidth = -nWidth;
     1006  }
     1007  if (nHeight < 0)
     1008  {
     1009    nYLeft += nHeight+1;
     1010    nHeight = -nHeight;
     1011  }
     1012  rc = O32_PatBlt(hdc,nXLeft,nYLeft,nWidth,nHeight,dwRop);
     1013  dprintf(("GDI32: PatBlt (%d,%d) (%d,%d) returned %d\n",nXLeft,nYLeft,nWidth,nHeight,rc));
    10031014  return(rc);
    10041015}
Note: See TracChangeset for help on using the changeset viewer.