本文整理汇总了C++中Selection::getEndFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ Selection::getEndFrame方法的具体用法?C++ Selection::getEndFrame怎么用?C++ Selection::getEndFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Selection
的用法示例。
在下文中一共展示了Selection::getEndFrame方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EditCommand
void
TimeInstantLayer::resizeSelection(Selection s, Selection newSize)
{
if (!m_model) return;
SparseOneDimensionalModel::EditCommand *command =
new SparseOneDimensionalModel::EditCommand(m_model,
tr("Resize Selection"));
SparseOneDimensionalModel::PointList points =
m_model->getPoints(s.getStartFrame(), s.getEndFrame());
double ratio =
double(newSize.getEndFrame() - newSize.getStartFrame()) /
double(s.getEndFrame() - s.getStartFrame());
for (SparseOneDimensionalModel::PointList::iterator i = points.begin();
i != points.end(); ++i) {
if (s.contains(i->frame)) {
double target = i->frame;
target = newSize.getStartFrame() +
double(target - s.getStartFrame()) * ratio;
SparseOneDimensionalModel::Point newPoint(*i);
newPoint.frame = lrint(target);
command->deletePoint(*i);
command->addPoint(newPoint);
}
}
finish(command);
}
示例2: point
void
TimeInstantLayer::copy(View *v, Selection s, Clipboard &to)
{
if (!m_model) return;
SparseOneDimensionalModel::PointList points =
m_model->getPoints(s.getStartFrame(), s.getEndFrame());
for (SparseOneDimensionalModel::PointList::iterator i = points.begin();
i != points.end(); ++i) {
if (s.contains(i->frame)) {
Clipboard::Point point(i->frame, i->label);
point.setReferenceFrame(alignToReference(v, i->frame));
to.addPoint(point);
}
}
}