Ejemplo n.º 1
0
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);
    }
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
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);
    }
}
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
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;
}