b1ae6aafe2f0997af978f7984c270fbe3c1edb4a kate Wed Jan 17 17:40:46 2018 -0800 Add feature to draw dotted lines for reverse direction interactions. refs #17512 diff --git src/hg/inc/hvGfx.h src/hg/inc/hvGfx.h index 6062adf..b5cbdfd 100644 --- src/hg/inc/hvGfx.h +++ src/hg/inc/hvGfx.h @@ -299,40 +299,41 @@ /* Draw a ruler inside the indicated part of mg with numbers that start at * startNum and span range. Bump text positions slightly. */ void hvGfxDrawRuler(struct hvGfx *hvg, int xOff, int yOff, int height, int width, Color color, MgFont *font, int startNum, int range); /* Draw a ruler inside the indicated part of mg with numbers that start at * startNum and span range. */ void hvGfxNextItemButton(struct hvGfx *hvg, int x, int y, int w, int h, Color color, Color hvgColor, boolean nextItem); /* Draw a button that looks like a fast-forward or rewind button on */ /* a remote control. If nextItem is TRUE, it points right, otherwise */ /* left. color is the outline color, and hvgColor is the fill color. */ -void hvGfxEllipseDraw(struct hvGfx *hvg, int x0, int y0, int x1, int y1, Color color, int mode); -/* Draw an ellipse or half (top or bottom) using Bresenham algorithm. - * Point 1 is left, point 2 is top +void hvGfxEllipseDraw(struct hvGfx *hvg, int x0, int y0, int x1, int y1, Color color, + int mode, boolean isDotted); +/* Draw an ellipse (or limit to top or bottom) specified by rectangle, using Bresenham algorithm. + * Optionally, alternate dots. + * Point 0 is left, point 1 is top of rectangle * Adapted trivially from code posted at http://members.chello.at/~easyfilter/bresenham.html */ void hvGfxEllipse(struct hvGfx *hvg, int x0, int y0, int x1, int y1, Color color); /* Draw an ellipse using Bresenham algorithm. - * Point 1 is left, point 2 is top - * Adapted trivially from code posted at http://members.chello.at/~easyfilter/bresenham.html - */ - -void hvGfxEllipseDrawAA(struct hvGfx *hvg, int x0, int y0, int x1, int y1, Color color, int mode); -/* Draw an anti-aliased ellipse or half (top or bottom) using Bresenham algorithm. - * Point 0 is left, point 1 is top of rectangle + * Point 0 is left, point 1 is top * Adapted trivially from code posted at http://members.chello.at/~easyfilter/bresenham.html */ -void hvGfxCurve(struct hvGfx *hvg, int x0, int y0, int x1, int y1, int x2, int y2, Color color); -/* Draw a an anti-aliased curve within 3 points (quadratic Bezier) +void hvGfxCurve(struct hvGfx *hvg, int x0, int y0, int x1, int y1, int x2, int y2, + Color color, boolean isDotted); +/* Draw a segment of an anti-aliased curve within 3 points (quadratic Bezier) + * Optionally alternate dots. * Adapted trivially from code posted at http://members.chello.at/~easyfilter/bresenham.html */ /* Thanks to author * @author Zingl Alois * @date 22.08.2016 */ +void hvGfxDottedLine(struct hvGfx *hvg, int x1, int y1, int x2, int y2, Color color); +/* Brezenham line algorithm, alternating dots */ + #endif