MCPcopy Create free account
hub / github.com/Tencent/libpag / CheckTextLayerPathOption

Function CheckTextLayerPathOption

exporter/src/export/ExportVerify.cpp:595–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593}
594
595static void CheckTextLayerPathOption(std::shared_ptr<PAGExportSession> session,
596 pag::TextLayer* layer) {
597 if (layer->pathOption == nullptr || layer->pathOption->path == nullptr) {
598 return;
599 }
600
601 auto perpendicularToPath = layer->pathOption->perpendicularToPath;
602 auto forceAlignment = layer->pathOption->forceAlignment;
603 if (perpendicularToPath->animatable() || perpendicularToPath->value != true) {
604 session->pushWarning(AlertInfoType::TextPathParamPerpendicularToPath);
605 }
606 if (forceAlignment->animatable() || forceAlignment->value != false) {
607 session->pushWarning(AlertInfoType::TextPathParamForceAlignment);
608 }
609
610 if (HasVerticalText(layer->sourceText)) {
611 session->pushWarning(AlertInfoType::TextPathVertial);
612 }
613
614 if (!layer->animators.empty()) {
615 session->pushWarning(AlertInfoType::TextPathAnimator);
616 }
617}
618
619static void CheckLayerProperty(std::shared_ptr<PAGExportSession> session, pag::Layer* layer,
620 void*) {

Callers 1

CheckLayerPropertyFunction · 0.85

Calls 4

HasVerticalTextFunction · 0.85
emptyMethod · 0.80
animatableMethod · 0.45
pushWarningMethod · 0.45

Tested by

no test coverage detected