Ignore:
Timestamp:
Jun 14, 2000, 3:17:51 PM (25 years ago)
Author:
sandervl
Message:

region changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/oslibgpi.cpp

    r2802 r3705  
    1 /* $Id: oslibgpi.cpp,v 1.4 2000-02-16 14:18:11 sandervl Exp $ */
     1/* $Id: oslibgpi.cpp,v 1.5 2000-06-14 13:17:51 sandervl Exp $ */
    22
    33/*
     
    1717#include <math.h>
    1818#include "win32type.h"
     19#include <winconst.h>
    1920#include "oslibgpi.h"
    2021#include "dcdata.h"
     
    116117
    117118  return TRUE;
     119}
     120
     121BOOL includeBottomRightPoint(PVOID pHps,PPOINTLOS2 pptl)
     122{
     123    if(GetDCData(pHps)->graphicsMode != GM_COMPATIBLE_W)
     124    {
     125        return TRUE;  // already inclusive/inclusive
     126    }
     127
     128    if(pptl[0].x == pptl[1].x || pptl[0].y == pptl[1].y)
     129    {
     130        return FALSE; // empty rectangle
     131    }
     132
     133    if(GetDCData(pHps)->isLeftLeft)
     134    {
     135        pptl[1].x += abs(GetDCData(pHps)->worldXDeltaFor1Pixel);
     136        sortAscending(pptl[0].x, pptl[1].x);
     137    }
     138    else
     139    {
     140        pptl[0].x -= abs(GetDCData(pHps)->worldXDeltaFor1Pixel);
     141        sortAscending(pptl[1].x, pptl[0].x);
     142    }
     143
     144    if(GetDCData(pHps)->isTopTop)
     145    {
     146        pptl[1].y += abs(GetDCData(pHps)->worldYDeltaFor1Pixel);
     147        sortAscending(pptl[1].y, pptl[0].y);
     148    }
     149    else
     150    {
     151        pptl[0].y -= abs(GetDCData(pHps)->worldYDeltaFor1Pixel);
     152        sortAscending(pptl[0].y, pptl[1].y);
     153    }
     154    return TRUE;
    118155}
    119156
     
    351388}
    352389
     390
Note: See TracChangeset for help on using the changeset viewer.