本文整理汇总了C++中LayerImage::name方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerImage::name方法的具体用法?C++ LayerImage::name怎么用?C++ LayerImage::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerImage
的用法示例。
在下文中一共展示了LayerImage::name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: move_or_copy_cels
static void move_or_copy_cels(
DocApi& api, Op op,
const LayerList& srcLayers,
const LayerList& dstLayers,
const SelectedFrames& srcFrames,
const SelectedFrames& dstFrames)
{
ASSERT(srcLayers.size() == dstLayers.size());
for (layer_t i=0; i<srcLayers.size(); ++i) {
auto srcFrame = srcFrames.begin();
auto dstFrame = dstFrames.begin();
auto srcFrameEnd = srcFrames.end();
auto dstFrameEnd = dstFrames.end();
for (; srcFrame != srcFrameEnd &&
dstFrame != dstFrameEnd; ++srcFrame, ++dstFrame) {
if (i >= 0 && i < srcLayers.size() && srcLayers[i]->isImage()) {
LayerImage* srcLayer = static_cast<LayerImage*>(srcLayers[i]);
if (i < dstLayers.size() && dstLayers[i]->isImage()) {
LayerImage* srcLayer = static_cast<LayerImage*>(srcLayers[i]);
LayerImage* dstLayer = static_cast<LayerImage*>(dstLayers[i]);
#ifdef TRACE_RANGE_OPS
std::clog << (op == Move ? "Moving": "Copying")
<< " cel " << srcLayer->name() << "[" << *srcFrame << "]"
<< " into " << dstLayer->name() << "[" << *dstFrame << "]\n";
#endif
switch (op) {
case Move: api.moveCel(srcLayer, *srcFrame, dstLayer, *dstFrame); break;
case Copy: api.copyCel(srcLayer, *srcFrame, dstLayer, *dstFrame); break;
}
}
else if (op == Move) {
api.clearCel(srcLayer, *srcFrame);
}
}
}
}
}