本文整理汇总了C++中TupLayer::isVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ TupLayer::isVisible方法的具体用法?C++ TupLayer::isVisible怎么用?C++ TupLayer::isVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TupLayer
的用法示例。
在下文中一共展示了TupLayer::isVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: layerIsVisible
bool TupSvgItem::layerIsVisible()
{
TupLayer *layer = k->frame->layer();
if (layer->isVisible())
return true;
return false;
}
示例2: layerIsVisible
bool TupGraphicObject::layerIsVisible()
{
TupLayer *layer = k->frame->layer();
if (layer->isVisible())
return true;
return false;
}
示例3: drawPhotogram
void TupGraphicsScene::drawPhotogram(int photogram)
{
/*
#ifdef K_DEBUG
T_FUNCINFO;
#endif
*/
// Q_CHECK_PTR(k->scene);
if (photogram < 0 || !k->scene)
return;
cleanWorkSpace();
bool valid = false;
// Drawing frames from another layers
for (int i=0; i < k->scene->layersTotal(); i++) {
TupLayer *layer = k->scene->layer(i);
if (layer->framesTotal() > 0 && photogram < layer->framesTotal()) {
TupFrame *mainFrame = layer->frame(photogram);
QString currentFrame = "";
if (mainFrame) {
currentFrame = mainFrame->frameName();
if (layer) {
if (layer->isVisible()) {
// Painting the background
drawBackground();
// Painting previews frames
if (k->onionSkin.previous > 0 && photogram > 0) {
double opacity = k->opacity;
double opacityFactor = opacity / (double)qMin(layer->frames().count(), k->onionSkin.previous);
int limit = photogram - k->onionSkin.previous;
if (limit < 0)
limit = 0;
QString frameBehind = "";
for (int frameIndex = photogram-1; frameIndex >= limit; frameIndex--) {
TupFrame *frame = layer->frame(frameIndex);
QString previousFrame = frame->frameName();
if (frame && previousFrame.compare(currentFrame) != 0
&& frameBehind.compare(previousFrame) != 0) {
addFrame(frame, opacity, Preview);
}
frameBehind = previousFrame;
opacity -= opacityFactor;
}
}
// valid = true;
// k->layerCounter = i;
addFrame(mainFrame, TupGraphicsScene::Current);
// Painting next frames
if (k->onionSkin.next > 0 && layer->framesTotal() > photogram + 1) {
double opacity = k->opacity;
double opacityFactor = opacity / (double)qMin(layer->frames().count(), k->onionSkin.next);
int limit = photogram + k->onionSkin.next;
if (limit >= layer->frames().count())
limit = layer->frames().count() - 1;
QString frameLater = "";
for (int frameIndex = photogram+1; frameIndex <= limit; frameIndex++) {
TupFrame * frame = layer->frame(frameIndex);
QString nextFrame = frame->frameName();
if (frame && nextFrame.compare(currentFrame) != 0
&& frameLater.compare(nextFrame) != 0) {
addFrame(frame, opacity, Next);
}
frameLater = nextFrame;
opacity -= opacityFactor;
}
}
// SQA: Crashpoint when layers are deleted
valid = true;
k->layerCounter = i;
// addFrame(mainFrame, TupGraphicsScene::Current);
}
}
}
}
//.........这里部分代码省略.........