bool MgShape::load(MgShapeFactory* factory, MgStorage* s) { setTag(s->readInt("tag", getTag())); GiContext ctx; ctx.setLineStyle(s->readInt("lineStyle", 0)); ctx.setLineWidth(s->readFloat("lineWidth", 0), true); ctx.setLineColor(GiColor(s->readInt("lineColor", 0xFF000000), true)); ctx.setFillColor(GiColor(s->readInt("fillColor", 0), true)); ctx.setStartArrayHead(s->readInt("startArrayHead", 0)); ctx.setEndArrayHead(s->readInt("endArrayHead", 0)); setContext(ctx); bool ret = shape()->load(factory, s); if (ret) { shape()->update(); } return ret; }