本文整理汇总了C++中Transformer::InvTransformRect方法的典型用法代码示例。如果您正苦于以下问题:C++ Transformer::InvTransformRect方法的具体用法?C++ Transformer::InvTransformRect怎么用?C++ Transformer::InvTransformRect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transformer
的用法示例。
在下文中一共展示了Transformer::InvTransformRect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: invTransformRect
void Graphic::invTransformRect (
float x0, float y0, float x1, float y1,
float& nx0, float& ny0, float& nx1, float& ny1, Graphic* g
) {
Transformer* t = (g == nil) ? GetTransformer() : g->GetTransformer();
nx0 = x0; ny0 = y0; nx1 = x1; ny1 = y1;
if (t != nil) {
t->InvTransformRect(nx0, ny0, nx1, ny1);
}
}
示例2: InterpretManipulator
Command* StrBrowserView::InterpretManipulator (Manipulator* m) {
Command* cmd = nil;
Tool* tool = m->GetTool();
if (tool->IsA(IBGRAPHIC_COMP_TOOL)) {
cmd = InteractorView::InterpretManipulator(m);
} else if (tool->IsA(GRAPHIC_COMP_TOOL)) {
DragManip* dm = (DragManip*) m;
IBEditor* ed = (IBEditor*) dm->GetViewer()->GetEditor();
Tool* tool = dm->GetTool();
Transformer* rel = dm->GetTransformer();
RubberRect* rubberRect = (RubberRect*) dm->GetRubberband();
Coord x0, y0, x1, y1;
rubberRect->GetCurrent(x0, y0, x1, y1);
NormalRect(x0, y0, x1, y1);
if (rel != nil) {
rel->InvTransformRect(x0, y0, x1, y1);
}
GetABSCoord(ed, x0, y0, x1, y1);
ColorVar* colVar = (ColorVar*) ed->GetState("ColorVar");
FontVar* fontVar = (FontVar*) ed->GetState("FontVar");
StrBrowserComp* comp = (StrBrowserComp*) GetStrBrowserComp()->Copy();
StrBrowserGraphic* g = (StrBrowserGraphic*) comp->GetGraphic();
g->SetRowsCols(y1-y0+1, x1-x0+1);
if (colVar != nil) {
g->SetColors(colVar->GetFgColor(), colVar->GetBgColor());
}
if (fontVar != nil) {
g->SetFont(fontVar->GetFont());
}
cmd = new MacroCmd(
ed, new PasteCmd(ed, new Clipboard(comp)),
new PlaceCmd(ed, x0, y0, x1-1, y1-1, new Clipboard(comp))
);
} else if (!tool->IsA(RESHAPE_TOOL)){
cmd = MessageView::InterpretManipulator(m);
}
return cmd;
}