Ejemplo n.º 1
0
void Picture::InsertAfter (Iterator i, Graphic* g) {
    invalidateCachesGraphic(g);
    Elem(i)->Prepend(new UList(g));
    setParent(g, this);
    uncacheExtent();
    uncacheParents();
}
Ejemplo n.º 2
0
void Line::SetOriginal (Coord x0, Coord y0, Coord x1, Coord y1) {
    _x0 = x0;
    _y0 = y0;
    _x1 = x1;
    _y1 = y1;
    uncacheExtent();
}    
Ejemplo n.º 3
0
int Vertices::SetOriginal (const Coord* x, const Coord* y) {
    MultiLineObj* mlo = MultiLineObj::make_pts(x, y, count());
    Unref(_pts);
    _pts = mlo;
    Resource::ref(_pts);
    uncacheExtent();
    return count();
}
Ejemplo n.º 4
0
Picture::~Picture () {
    while (!_kids->IsEmpty()) {
	UList* cur = _kids->First();
	_kids->Remove(cur);
        Graphic* g = graphic(cur);
	delete g;
	delete cur;
    }
    delete _kids;
    uncacheExtent();
}
Ejemplo n.º 5
0
void Picture::Remove (Iterator& i) {
    UList* doomed = Elem(i);
    Graphic* g = graphic(doomed);

    Next(i);
    unsetParent(g);
    _kids->Remove(doomed);
    delete doomed;
    uncacheExtent();
    uncacheParents();
}
Ejemplo n.º 6
0
void Picture::Prepend (Graphic* g0, Graphic* g1, Graphic* g2, Graphic* g3) {
    if (g3 != nil) {
	invalidateCachesGraphic(g3);
	_kids->Prepend(new UList(g3));
	setParent(g3, this);
    }
    if (g2 != nil) {
	invalidateCachesGraphic(g2);
	_kids->Prepend(new UList(g2));
	setParent(g2, this);
    }
    if (g1 != nil) {
	invalidateCachesGraphic(g1);
	_kids->Prepend(new UList(g1));
	setParent(g1, this);
    }
    invalidateCachesGraphic(g0);
    _kids->Prepend(new UList(g0));
    setParent(g0, this);
    uncacheExtent();
    uncacheParents();
}
Ejemplo n.º 7
0
void Graphic::invalidateCaches() {
    uncacheParents();
    uncacheExtent();
    uncacheChildren();
}
Ejemplo n.º 8
0
void Picture::cacheExtent (float l, float b, float cx, float cy, float tol) {
    if (_caching) {
	uncacheExtent();
	_extent = new Extent(l, b, cx, cy, tol);
    }
}
Ejemplo n.º 9
0
void Picture::Remove (Graphic* g) {
    unsetParent(g);
    _kids->Delete(g);
    uncacheExtent();
    uncacheParents();
}
Ejemplo n.º 10
0
void Vertices::SetOriginal (MultiLineObj* mlo) {
    Unref(_pts);
    _pts = mlo;
    Resource::ref(_pts);
    uncacheExtent();
}
Ejemplo n.º 11
0
Vertices::~Vertices () {
    uncacheExtent();
    Unref(_pts);
}
Ejemplo n.º 12
0
void Point::SetOriginal (Coord x, Coord y) {
    _x = x;
    _y = y;
    uncacheExtent();
}