Logo Search packages:      
Sourcecode: djvulibre version File versions

int GRect::translate ( int  dx,
int  dy 
)

Translate the rectangle. The new rectangle is composed of all the points of the old rectangle translated by dx# units horizontally and dy# units vertically.

Definition at line 135 of file GRect.cpp.

References isempty(), xmax, xmin, ymax, and ymin.

{
  xmin += dx;
  xmax += dx;
  ymin += dy;
  ymax += dy;
  if (! isempty()) 
    return 1;
  xmin = ymin = xmax = ymax = 0;
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index