bool MgDiamond::_draw(GiGraphics& gs, const GiContext& ctx) const { Point2d pts[] = { _getHandlePoint(0), _getHandlePoint(1), _getHandlePoint(2), _getHandlePoint(3) }; bool ret = gs.drawPolygon(&ctx, 4, pts); return __super::_draw(gs, ctx) || ret; }
bool MgLines::_draw(GiGraphics& gs, const GiContext& ctx) const { bool ret = false; if (_closed) ret = gs.drawPolygon(&ctx, _count, _points); else ret = gs.drawLines(&ctx, _count, _points); return __super::_draw(gs, ctx) || ret; }
bool MgImageShape::drawBox(GiGraphics& gs, const GiContext& ctx) const { GiContext tmpctx(ctx); tmpctx.setNoFillColor(); tmpctx.setLineStyle(GiContext::kSolidLine); GiContext ctxline(tmpctx); ctxline.setLineWidth(0, false); return (gs.drawPolygon(&tmpctx, 4, _points) && gs.drawLine(&ctxline, _points[0], _points[2]) && gs.drawLine(&ctxline, _points[1], _points[3])); }
bool MgRect::_draw(GiGraphics& gs, const GiContext& ctx) const { bool ret = gs.drawPolygon(&ctx, 4, _points); return __super::_draw(gs, ctx) || ret; }
bool MgParallel::_draw(int mode, GiGraphics& gs, const GiContext& ctx, int segment) const { bool ret = gs.drawPolygon(&ctx, 4, _points); return __super::_draw(mode, gs, ctx, segment) || ret; }