本文整理汇总了C++中GraphicView::CreateManipulator方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphicView::CreateManipulator方法的具体用法?C++ GraphicView::CreateManipulator怎么用?C++ GraphicView::CreateManipulator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicView
的用法示例。
在下文中一共展示了GraphicView::CreateManipulator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateManipulator
Manipulator* ExamineTool::CreateManipulator (
Viewer* v, Event& e, Transformer* t
){
GraphicView* views = v->GetGraphicView();
Selection* s = v->GetSelection();
_selPath = new Selection;
Manipulator* m = nil;
s->Clear();
ComputeViewPath(e, views, _selPath);
_shift = e.shift_is_down();
if (!_selPath->IsEmpty()) {
Iterator i;
_selPath->First(i);
GraphicView* gv = _selPath->GetView(i);
s->Append(gv);
s->Update();
_selPath->Last(i);
gv = _selPath->GetView(i);
m = gv->CreateManipulator(v, e, t, this);
}
delete _selPath;
return m;
}
示例2: CreateManipulator
Manipulator* ScaleTool::CreateManipulator (
Viewer* v, Event& e, Transformer* rel
) {
GraphicView* views = v->GetGraphicView();
Selection* s = v->GetSelection(), *newSel;
GraphicView* gv;
Manipulator* m = nil;
Iterator i;
newSel = views->ViewIntersecting(e.x-SLOP, e.y-SLOP, e.x+SLOP, e.y+SLOP);
if (newSel->IsEmpty()) {
s->Clear();
} else {
newSel->First(i);
gv = newSel->GetView(i);
if (s->Includes(gv)) {
s->Remove(gv);
s->Prepend(gv);
} else {
s->Clear();
s->Append(gv);
s->Update();
}
m = gv->CreateManipulator(v, e, rel, this);
}
delete newSel;
return m;
}