diff --git a/examples/Accessor.cpp b/examples/Accessor.cpp index 30b91f74..d28095e5 100644 --- a/examples/Accessor.cpp +++ b/examples/Accessor.cpp @@ -60,6 +60,13 @@ struct UserExample : tvgexam::Example if (!tvgexam::verify(accessor->set(picture.get(), f, nullptr))) return false; + // Try to retrieve the shape that corresponds to the SVG node with the unique ID "star". + if (auto paint = picture->paint(tvg::Accessor::id("star"))) { + auto shape = static_cast(const_cast(paint)); + shape->strokeFill(255, 255, 0); + shape->strokeWidth(5); + } + canvas->push(std::move(picture)); return true; @@ -74,4 +81,4 @@ struct UserExample : tvgexam::Example int main(int argc, char **argv) { return tvgexam::main(new UserExample, argc, argv); -} \ No newline at end of file +} diff --git a/examples/resources/svg/favorite_on.svg b/examples/resources/svg/favorite_on.svg index c34b3209..bcfec2a5 100644 --- a/examples/resources/svg/favorite_on.svg +++ b/examples/resources/svg/favorite_on.svg @@ -3,7 +3,7 @@ -