Qt 4.8
Functions
textwriter.cpp File Reference
#include "private/textwriter_p.h"

Go to the source code of this file.

Functions

static bool overlaps (int posA, int lengthA, int posB, int lengthB)
 

Function Documentation

◆ overlaps()

static bool overlaps ( int  posA,
int  lengthA,
int  posB,
int  lengthB 
)
static

Definition at line 53 of file textwriter.cpp.

Referenced by QDeclarativeJS::TextWriter::hasOverlap(), and QRegion::intersects().

53  {
54  return (posA < posB + lengthB && posA + lengthA > posB + lengthB)
55  || (posA < posB && posA + lengthA > posB);
56 }