本文整理汇总了C++中Graphic::SetTransformer方法的典型用法代码示例。如果您正苦于以下问题:C++ Graphic::SetTransformer方法的具体用法?C++ Graphic::SetTransformer怎么用?C++ Graphic::SetTransformer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Graphic
的用法示例。
在下文中一共展示了Graphic::SetTransformer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Definition
boolean PSLink::Definition (ostream& out) {
LinkComp* comp = (LinkComp*) GetSubject();
Graphic* link = comp->GetGraphic();
Line* line = comp->GetLine();
Transformer* link_t = link->GetTransformer();
Transformer* line_t = line->GetTransformer();
Transformer* temp_t = new Transformer(line_t);
Resource::ref(link_t);
temp_t->postmultiply(*link_t);
link->SetTransformer(temp_t);
Coord x0, y0, x1, y1;
line->GetOriginal(x0, y0, x1, y1);
out << "Begin " << MARK << " Line\n";
MinGS(out);
out << MARK << "\n";
out << x0 << " " << y0 << " " << x1 << " " << y1 << " Line\n";
out << "End\n\n";
link->SetTransformer(link_t);
Resource::unref(link_t);
Resource::unref(temp_t);
return out.good();
}
示例2: Picture
LinkComp::LinkComp (Line* line) {
if (line != nil) {
Coord x0, y0, x1, y1;
float fx0, fy0, fx1, fy1;
line->GetOriginal(x0, y0, x1, y1);
Transformer* t = line->GetTransformer();
Graphic* parent = new Picture(line);
parent->SetTransformer(nil);
if (t == nil) {
fx0 = x0; fy0 = y0; fx1 = x1; fy1 = y1;
} else {
t->Transform(float(x0), float(y0), fx0, fy0);
t->Transform(float(x1), float(y1), fx1, fy1);
}
delete line;
line = new Line(0, 0, 1, 1);
InitLine(line, fx0, fy0, fx1, fy1);
PinGraphic* pg1 = new PinGraphic;
PinGraphic* pg2 = new PinGraphic;
pg1->SetBrush(psnonebr);
pg2->SetBrush(psnonebr);
pg1->Translate(fx0, fy0);
pg2->Translate(fx1, fy1);
_conn1 = new PinComp(pg1);
_conn2 = new PinComp(pg2);
parent->Append(line, pg1, pg2);
SetGraphic(parent);
}
}
示例3: Read
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);
}