Simple example of line clipping

This is a simple Example of line clipping : the display window is the canvas and also the default clipping rectangle, thus all line segments inside the canvas are drawn.

The red box is the clipping rectangle we will use later, and the dotted line is the extension of the four edges of the clipping rectangle.

Example1. Sorry, this is a picture>


    <P>Now, after clipping, the primitives outside the clipping rectangle
       are removed, only the line segaments inside the
       clipping rectangle will be displayed.</P>

    <IMG ALIGN=bottom SRC=Clipping concept

Haowei Hsieh
Last Change : Feb 19,1995