| 199 | } |
| 200 | |
| 201 | static void CheckContinuousSequenceComposition(std::shared_ptr<PAGExportSession> session, |
| 202 | pag::Composition* composition) { |
| 203 | if (composition->type() != pag::CompositionType::Vector) { |
| 204 | return; |
| 205 | } |
| 206 | |
| 207 | bool lastIsSequence = false; |
| 208 | auto lastBlendMode = pag::BlendMode::Normal; |
| 209 | auto lastCompostionId = pag::ZeroID; |
| 210 | ScopedAssign<pag::ID> compID(session->compID, composition->id); |
| 211 | |
| 212 | for (auto layer : static_cast<pag::VectorComposition*>(composition)->layers) { |
| 213 | if (layer->type() == pag::LayerType::PreCompose) { |
| 214 | ScopedAssign<pag::ID> layerID(session->layerID, layer->id); |
| 215 | auto subCompostion = static_cast<pag::PreComposeLayer*>(layer)->composition; |
| 216 | if (lastCompostionId != subCompostion->id) { |
| 217 | lastCompostionId = subCompostion->id; |
| 218 | if (subCompostion->type() != pag::CompositionType::Vector) { |
| 219 | if (lastIsSequence && layer->blendMode == lastBlendMode) { |
| 220 | session->pushWarning(AlertInfoType::ContinuousSequence); |
| 221 | } |
| 222 | lastIsSequence = true; |
| 223 | lastBlendMode = layer->blendMode; |
| 224 | } else { |
| 225 | CheckContinuousSequenceComposition(session, subCompostion); |
| 226 | lastIsSequence = false; |
| 227 | } |
| 228 | } |
| 229 | } else { |
| 230 | lastIsSequence = false; |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | static void CheckBmpSuffix(std::shared_ptr<PAGExportSession> session, |
| 236 | pag::Composition* composition) { |
no test coverage detected