Ignore:
Timestamp:
Aug 27, 2010, 11:00:52 AM (11 years ago)
Author:
Silvan Scherrer
Message:

poppler update to 0.14.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/splash/SplashClip.h

    r277 r461  
    22//
    33// SplashClip.h
     4//
     5//========================================================================
     6
     7//========================================================================
     8//
     9// Modified under the Poppler project - http://poppler.freedesktop.org
     10//
     11// All changes made under the Poppler project to this file are licensed
     12// under GPL version 2 or later
     13//
     14// Copyright (C) 2010 Albert Astals Cid <aacid@kde.org>
     15//
     16// To see a description of the changes please see the Changelog file that
     17// came with your tarball or type make ChangeLog if you are building from git
    418//
    519//========================================================================
     
    1428#include "SplashTypes.h"
    1529#include "SplashMath.h"
     30#include "SplashXPathScanner.h"
    1631
    1732class SplashPath;
    1833class SplashXPath;
    19 class SplashXPathScanner;
    2034class SplashBitmap;
    2135
     
    5872
    5973  // Returns true if (<x>,<y>) is inside the clip.
    60   GBool test(int x, int y);
     74  GBool test(int x, int y)
     75  {
     76    int i;
     77
     78    // check the rectangle
     79    if (x < xMinI || x > xMaxI || y < yMinI || y > yMaxI) {
     80      return gFalse;
     81    }
     82
     83    // check the paths
     84    if (antialias) {
     85      for (i = 0; i < length; ++i) {
     86        if (!scanners[i]->test(x * splashAASize, y * splashAASize)) {
     87          return gFalse;
     88        }
     89      }
     90    } else {
     91      for (i = 0; i < length; ++i) {
     92        if (!scanners[i]->test(x, y)) {
     93          return gFalse;
     94        }
     95      }
     96    }
     97
     98    return gTrue;
     99  }
    61100
    62101  // Tests a rectangle against the clipping region.  Returns one of:
Note: See TracChangeset for help on using the changeset viewer.