Exemplo n.º 1
0
void LinkComp::Read (istream& in) {
    GraphicComp::Read(in);

    Line* line = new Line(0, 0, 1, 1);

    Transformer* t = ReadTransformer(in);
    line->SetTransformer(t);
    Unref(t);

    _conn1 = (Connector*) unidraw->GetCatalog()->ReadComponent(in);
    _conn2 = (Connector*) unidraw->GetCatalog()->ReadComponent(in);

    Graphic* parent = new Picture;
    parent->FillBg(ReadBgFilled(in));
    PSColor* fg = ReadColor(in);
    PSColor* bg = ReadColor(in);
    parent->SetColors(fg, bg);
    parent->SetBrush(ReadBrush(in));

    t = ReadTransformer(in);
    parent->SetTransformer(t);
    Unref(t);

    parent->Append(line, _conn1->GetGraphic(), _conn2->GetGraphic());
    SetGraphic(parent);
}
Exemplo n.º 2
0
void EditorCode::Update () {
    IGraphicComps* igrcomps = GetEditorComp()->GetIGraphicComps();
    _gcode = (GroupCode*) igrcomps->Create(CODE_VIEW);
    igrcomps->Attach(_gcode);
    _gcode->Update();
    MonoSceneClassCode::Update();
    InteractorComp* subj = GetIntComp();
    Graphic* gr = subj->GetGraphic();
    gr->SetColors(nil, nil);
    gr->SetFont(nil);
}