Ejemplo n.º 1
0
bool
LabelBlock::Bucket::Check(const PixelRect rc) const
{
  for (auto i = blocks.begin(), end = blocks.end(); i != end; ++i)
    if (CheckRectOverlap(*i, rc))
      return false;

  return true;
}
Ejemplo n.º 2
0
bool LabelBlock::check(const RECT rc)
{
  for (unsigned i = 0; i < num_blocks; i++)
    if (CheckRectOverlap(block_coords[i], rc))
      return false;

  if (num_blocks<MAXLABELBLOCKS-1) {
    block_coords[num_blocks]= rc;
    num_blocks++;
  }

  return true;
}