Example #1
0
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;
}
Example #2
0
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;
}
Example #3
0
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]));
}
Example #4
0
bool MgRect::_draw(GiGraphics& gs, const GiContext& ctx) const
{
    bool ret = gs.drawPolygon(&ctx, 4, _points);
    return __super::_draw(gs, ctx) || ret;
}
Example #5
0
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;
}