void Grapher::Retranslate (Picture* p, float sx, float sy, float l, float b) { float ml, mb; Iterator i; for (p->First(i); !p->Done(i); p->Next(i)) { Graphic* kid = p->GetGraphic(i); kid->GetCenter(ml, mb); kid->Translate((ml-l)*sx, (mb-b)*sy); } }
void Grapher::Append (float x, float y) { float cx, cy; float effx, effy; effx = _origx + (x - _lorigx) * _hinc; effy = _origy + (y - _lorigy) * _vinc; Graphic* dot = _dot->Copy(); _dot_picture->Append(dot); dot->GetCenter(cx, cy); dot->Translate(effx-cx, effy-cy); }