void PolyGraphic::draw_gs (Canvas* c, Graphic31* gs) { Graphic31 gstemp; GlyphIndex count = _body->count(); for (GlyphIndex i = 0; i < count; i++) { Graphic31* gr = (Graphic31*) _body->component(i); concat_(gr, gr, gs, &gstemp); draw_(gr, c, &gstemp); } }
void PolyGraphic::flush () { GlyphIndex count = count_(); for (GlyphIndex i = 0; i < count; i++) { Graphic31* gr = component_(i); concat_(gr, gr, this, gr); gr->flush(); } Graphic31 n; *((Graphic31*) this) = *(&n); }
void PolyGraphic::drawclipped_gs ( Canvas* c, Coord l, Coord b, Coord r, Coord t, Graphic31* gs ) { Graphic31 gstemp; GlyphIndex count = _body->count(); for (GlyphIndex i = 0; i < count; i++) { Graphic31* gr = (Graphic31*) _body->component(i); concat_(gr, gr, gs, &gstemp); drawclipped_(gr, c, l, b, r, t, &gstemp); } }
boolean PolyGraphic::intersects_gs (BoxObj& box, Graphic31* gs) { GlyphIndex count = _body->count(); Graphic31 gstemp; Transformer ttemp; gstemp.transformer(&ttemp); for (GlyphIndex i = 0; i < count; i++) { Graphic31* gr = (Graphic31*) _body->component(i); concat_(gr, gr, gs, &gstemp); if (intersects_(gr, box, &gstemp)) { gstemp.transformer(nil); return true; } } gstemp.transformer(nil); /* to avoid deleting ttemp explicitly*/ return false; }
boolean PolyGraphic::contains_gs (PointObj& po, Graphic* gs) { GlyphIndex count = _body->count(); Graphic gstemp; Transformer ttemp; gstemp.transformer(&ttemp); for (GlyphIndex i = 0; i < count; i++) { Graphic* gr = (Graphic*) _body->component(i); concat_(gr, gr, gs, &gstemp); if (contains_(gr, po, &gstemp)) { gstemp.transformer(nil); return true; } } gstemp.transformer(nil); /* to avoid deleting ttemp explicitly*/ return false; }