A figure item is a free style display item. One can draw lines, polygons, arcs, text and pixmaps in figure item. Coordinates in a figure item are relative to its display location and a measured in pixels.
Figure item supports the following resources.
configOption | resourceName | valueType |
EZ_X | x | int |
EZ_Y | y | int |
EZ_LOCATION | location | int_x int_y |
EZ_WIDTH | width | int |
EZ_HEIGHT | height | int |
EZ_SIZE | size | int_w int_h |
EZ_GEOMETRY | geometry | int_x int_y int_w int_h |
configOption | resourceName | valueType |
EZ_BORDER_TYPE | borderType | enum |
EZ_BORDER_WIDTH | borderWidth | int |
EZ_BACKGROUND | background | string |
GC EZ_GetGC(unsigned long mask, XGCValues *gcv);
The following routines are wrappers for the corresponding
Xlib drawing procedures.
EZ_FigPiece *EZ_FigItemAddString(EZ_Item *fitem, GC theGC,
char *str, int slen, int justification, int x, int y);
EZ_FigPiece *EZ_FigItemAddPixmap(EZ_Item *fitem, GC theGC,
EZ_Bitmap *bmp, int sx, int sy, int sw, int sh, int dx, int dy);
EZ_FigPiece *EZ_FigItemAddPoints(EZ_Item *fitem, GC theGC,
XPoint *pts, int npts);
EZ_FigPiece *EZ_FigItemAddLines (EZ_Item *fitem, GC theGC,
XPoint *pts, int npts, int mode);
EZ_FigPiece *EZ_FigItemAddPolygon(EZ_Item *fitem, GC theGC,
XPoint *pts, int npts, int mode);
EZ_FigPiece *EZ_FigItemAddRectangle(EZ_Item *fitem, GC theGC,
int x, int y, int w, int h);
EZ_FigPiece *EZ_FigItemAddFilledRectangle(EZ_Item *fitem, GC theGC,
int x, int y, int w, int h);
EZ_FigPiece *EZ_FigItemAddRectangles(EZ_Item *fitem, GC theGC,
XRectangle *rects, int nrects);
EZ_FigPiece *EZ_FigItemAddFilledRectangles(EZ_Item *fitem, GC theGC,
XRectangle *rects, int nrects);
EZ_FigPiece *EZ_FigItemAddArc(EZ_Item *fitem, GC theGC,
int x, int y, int w, int h, int angle1, int angle);
EZ_FigPiece *EZ_FigItemAddFilledArc(EZ_Item *fitem, GC theGC,
int x, int y, int w, int h, int a1, int a2);
EZ_FigPiece *EZ_FigItemAddArcs(EZ_Item *fitem, GC theGC,
XArc *arcs, int narcs);
EZ_FigPiece *EZ_FigItemAddFilledArcs(EZ_Item *fitem, GC theGC,
XArc *arcs, int narcs);
EZ_FigPiece *EZ_FigItemAddSegments(EZ_Item *fitem, GC theGC,
XSegment *segs, int nsegs);
The following are figure item/piece manipulation commands.
void EZ_GetFigPieceBoundingBox(EZ_FigPiece *fpiece,
int *x1, int *y1, int *x2, int *y2);
void EZ_FreeGC(GC gc);
EZ_GetGC
.
void EZ_ScaleFigItem(EZ_Item *item, float sx, float sy, int mode);
void EZ_FigItemDeletePiece(EZ_Item *item, EZ_FigPiece *fpiece, int update);
void EZ_FigItemHidePiece(EZ_Item *item, EZ_FigPiece *fpiece, int update);
void EZ_FigItemShowPiece(EZ_Item *item, EZ_FigPiece *fpiece, int update);