#include <stdio.h>#include <stdlib.h>#include <math.h>#include "clip.h"Go to the source code of this file.
Classes | |
| struct | LOC_cohen_sutherland_line_clip | 
Defines | |
| #define | TRUE -1 | 
| #define | FALSE 0 | 
Typedefs | |
| typedef long | outcode | 
Enumerations | |
| enum | edge { LEFT, RIGHT, BOTTOM, TOP } | 
Functions | |
| void | CompOutCode (double x, double y, outcode *code, struct LOC_cohen_sutherland_line_clip *LINK) | 
| ClipResult | cohen_sutherland_line_clip_i (int *x0_, int *y0_, int *x1_, int *y1_, int xmin_, int xmax_, int ymin_, int ymax_) | 
| ClipResult | cohen_sutherland_line_clip_d (double *x0, double *y0, double *x1, double *y1, double xmin_, double xmax_, double ymin_, double ymax_) | 
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||
| 
 cohen_sutherland_line_clip_d: : x coordinate of first point. : y coordinate of first point. : x coordinate of second point. : y coordinate of second point. : x coordinate of lower left edge of clipping rectangle. : y coordinate of lower left edge of clipping rectangle. : x coordinate of upper right edge of clipping rectangle. : y coordinate of lower left edge of clipping rectangle. cohen_sutherland_line_clip_d() will clip a line from first point (, ) to (, ) so that it fits into the given min/max bounds of the rectange (, ) - (, ). The line input coordinates will be modified if necessary for clipping. Returns: ClipResult. Definition at line 100 of file clip.c. References BOTTOM, CompOutCode(), FALSE, LEFT, NotClipped, RIGHT, TOP, TRUE, WasClipped, LOC_cohen_sutherland_line_clip::xmax, LOC_cohen_sutherland_line_clip::xmin, LOC_cohen_sutherland_line_clip::ymax, and LOC_cohen_sutherland_line_clip::ymin.  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||
| 
 
 Definition at line 62 of file clip.c. References cohen_sutherland_line_clip_d().  | 
  
      
  | 
  ||||||||||||||||||||
| 
 
 Definition at line 48 of file clip.c. References BOTTOM, LEFT, RIGHT, TOP, LOC_cohen_sutherland_line_clip::xmax, and LOC_cohen_sutherland_line_clip::ymax.  | 
  
 1.4.6