8fdcab346a8b88a6395eecbc5a4925c2572215e1 kate Mon Aug 13 16:35:29 2018 -0700 Support for source or target end offsets. refs #21109 diff --git src/hg/inc/hvGfx.h src/hg/inc/hvGfx.h index f16d472..1d95f4d 100644 --- src/hg/inc/hvGfx.h +++ src/hg/inc/hvGfx.h @@ -238,34 +238,34 @@ } INLINE void hvGfxEllipseDraw(struct hvGfx *hvg, int x1, int y1, int x2, int y2, Color color, int mode, boolean isDashed) /* Draw an ellipse (or limit to top or bottom) specified by rectangle. * Optionally, alternate dots. * Point 0 is left, point 1 is top of rectangle. */ { x1 = hvGfxAdjXX(hvg, x1, &x2, &y1, &y2); vgEllipse(hvg->vg, x1, y1, x2, y2, color, mode, isDashed); } INLINE int hvGfxCurve(struct hvGfx *hvg, int x1, int y1, int x2, int y2, int x3, int y3, Color color, boolean isDashed) -/* Draw an ellipse (or limit to top or bottom) specified by rectangle. - * Optionally, alternate dots. - * Point 0 is left, point 1 is top of rectangle. - */ +/* Draw a segment of an anti-aliased curve within 3 points (quadratic Bezier) + * Return max y value. Optionally draw curve as dashed line. + * Adapted trivially from code posted at http://members.chello.at/~easyfilter/bresenham.html + * Author: Zingl Alois, 8/22/2016 */ { x1 = hvGfxAdjXX(hvg, x1, &x2, &y1, &y2); return vgCurve(hvg->vg, x1, y1, x2, y2, x3, y3, color, isDashed); } INLINE int hvGfxFindColorIx(struct hvGfx *hvg, int r, int g, int b) /* Find color in map if possible, otherwise create new color or * in a pinch a close color. */ { return vgFindColorIx(hvg->vg, r, g, b); } INLINE struct rgbColor hvGfxColorIxToRgb(struct hvGfx *hvg, int colorIx) /* Return rgb values for given color index. */ {