Exemplo n.º 1
0
static Transformer* ComputeRel (Viewer* v, Transformer* t) {
    Transformer* rel = new Transformer;
    GraphicComp* comp = v->GetGraphicView()->GetGraphicComp();
    comp->GetGraphic()->TotalTransformation(*rel);
    rel->Postmultiply(t);
    return rel;
}    
Exemplo n.º 2
0
void OverlaysComp::Remove (Iterator& i) {
    UList* doomed = Elem(i);
    GraphicComp* comp = Comp(doomed);
    Graphic* g = comp->GetGraphic();

    Next(i);
    _comps->Remove(doomed);
    if (g != nil) GetGraphic()->Remove(g);

    SetParent(comp, nil);
    delete doomed;
}
Exemplo n.º 3
0
void ViewerGraphic::Update () {
    GraphicComp* parent = (GraphicComp*) _view->GetGraphicComp()->GetParent();

    if (parent != nil) {
        FullGraphic gs;
        totalGSGraphic(parent->GetGraphic(), gs);

        if (Different(this, &gs)) {
            Damage* damage = _view->GetViewer()->GetDamage();
            
            damage->Incur(this);
            *(Graphic*)this = *(Graphic*)(&gs);
            damage->Incur(this);
        }
    }
}
Exemplo n.º 4
0
void OverlaysComp::InsertAfter (Iterator i, GraphicComp* comp) {
    Graphic* g = comp->GetGraphic();
    Graphic* parent;

    if (Elem(i))
      Elem(i)->Prepend(new UList(comp));
    else {
      cerr << "OverlaysComp::InsertAfter -- Iterator has nil value\n";
      return;
    }
    
    if (g != nil) {
        Iterator j;
        parent = GetGraphic();
	GraphicComp* comp = GetComp(i);
	if (comp) {
	  parent->SetGraphic(comp->GetGraphic(), j);
	  parent->InsertAfter(j, g);
	}
    }
    SetParent(comp, this);
}