Label text stages in the chain list with their words
Effect::label(values) names a stage in a list, defaulting to the title; the text effect answers "Text (words)", and the chain rows are renamed in place as params change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -857,6 +857,13 @@ int main() {
|
||||
// Like blur and overlay it needs no sources of its own, and the same
|
||||
// settings render the same bytes twice over.
|
||||
check(!TextEffect().needsSources(), "text can lead a chain");
|
||||
|
||||
// A text stage is named after its words, on one line.
|
||||
check(TextEffect().label({{"text", std::string(" Two\nlines ")}}) == "Text (Two lines)",
|
||||
"a text stage is labelled with its words");
|
||||
check(TextEffect().label({{"text", std::string(" \n")}}) == "Text",
|
||||
"a text stage with no words is labelled with the title alone");
|
||||
check(effectByName("blur")->label({}) == "Blur", "other effects are labelled with their title");
|
||||
const auto alone = renderText({}, 200, 120, plain);
|
||||
check(alone.width() == 200 && countRed(alone, 0, 0, 200, 120) > 0,
|
||||
"without sources it draws on an empty canvas");
|
||||
|
||||
Reference in New Issue
Block a user