setClip


procedure setClip(int x, int y, int width, int height);

Sets the clipping area for the subsequent drawing operations. All drawing operations which take place outside of the clipping area rectangle will be ommited.

  begin
    // draw the ellipse	
    setColor(0, 0, 0);
    fillEllipse(0, 0, getWidth, getHeight);
    repaint;
    delay(2000);

    // draw ellipse again with setClip called before
    setClip(10, 10, 15, 25);
    fillEllipse(0, 0, getWidth, getHeight);
    repaint;
    delay(2000);
  end.