5c16e9df442a6a66c91f8cbf52f7543cb9cb4517 braney Mon Dec 6 16:34:22 2021 -0800 add new function to the graphics library to put text in a box that is used by the logo function of wiggle draws diff --git src/inc/pscmGfx.h src/inc/pscmGfx.h index 4703c00..792f927 100644 --- src/inc/pscmGfx.h +++ src/inc/pscmGfx.h @@ -54,30 +54,34 @@ int width, int height, int colorIx); /* Draw a box. */ void pscmLine(struct pscmGfx *pscm, int x1, int y1, int x2, int y2, int colorIx); /* Draw a line from one point to another. */ void pscmText(struct pscmGfx *pscm, int x, int y, int colorIx, MgFont *font, char *text); /* Draw a line of text with upper left corner x,y. */ void pscmTextRight(struct pscmGfx *pscm, int x, int y, int width, int height, int color, MgFont *font, char *text); /* Draw a line of text right justified in box defined by x/y/width/height */ +void pscmTextInBox(struct pscmGfx *pscm, int x, int y, + int width, int height, int color, MgFont *font, char *text); +/* Draw a line of text filling in box defined by x/y/width/height */ + void pscmTextCentered(struct pscmGfx *pscm, int x, int y, int width, int height, int color, MgFont *font, char *text); /* Draw a line of text centered in box defined by x/y/width/height */ void pscmEllipse(struct pscmGfx *pscm, int x1, int y1, int x2, int y2, Color color, int mode, boolean isDashed); /* Draw an ellipse specified as a rectangle. Args are left-most and top-most points. * Optionally draw half-ellipse (top or bottom) */ void pscmCurve(struct pscmGfx *pscm, int x1, int y1, int x2, int y2, int x3, int y3, Color color, boolean isDashed); /* Draw Bezier curve specified by 3 points (quadratic Bezier). * The points are: first (p1) and last (p3), and 1 control points (p2). */ #endif /* PSCMGFX_H */