00001 /* gfxPoly - two dimensional polygon. */ 00002 00003 #ifndef GFXPOLY_H 00004 #define GFXPOLY_H 00005 00006 struct gfxPoint 00007 /* A two-dimensional point, typically in pixel coordinates. */ 00008 { 00009 struct gfxPoint *next; 00010 int x, y; /* Position */ 00011 }; 00012 00013 struct gfxPoly 00014 /* A two-dimensional polygon */ 00015 { 00016 struct gfxPoly *next; 00017 int ptCount; /* Number of points. */ 00018 struct gfxPoint *ptList; /* First point in list, which is circular. */ 00019 struct gfxPoint *lastPoint; /* Last point in list. */ 00020 }; 00021 00022 struct gfxPoly *gfxPolyNew(); 00023 /* Create new (empty) polygon */ 00024 00025 void gfxPolyFree(struct gfxPoly **pPoly); 00026 /* Free up resources associated with polygon */ 00027 00028 void gfxPolyAddPoint(struct gfxPoly *poly, int x, int y); 00029 /* Add point to polygon. */ 00030 00031 #endif /* GFXPOLY_H */
1.5.2