Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void PathPropsTes() {
- using namespace svg;
- using namespace std::string_view_literals;
- using namespace std::string_literals;
- class Tester : public PathProps<Tester> {
- public:
- Tester& setTestAttr() {
- return *this;
- }
- void Render(const RenderContext& context) const {
- auto& out = context.out;
- out << "<tester "sv;
- RenderAttrs(out);
- out << "/>"sv;
- }
- };
- {
- Tester().Render(std::cout);
- std::cout << std::endl;
- } {
- Tester().SetStrokeColor("yellow"s)
- .SetFillColor("green"s)
- .setTestAttr()
- .SetStrokeLineJoin(StrokeLineJoin::ROUND)
- .SetStrokeLineCap(StrokeLineCap::ROUND)
- .SetStrokeWidth(3)
- .Render(std::cout);
- std::cout << std::endl;
- } {
- Tester().SetFillColor("green"s)
- .SetStrokeLineCap(StrokeLineCap::ROUND)
- .SetStrokeLineJoin(StrokeLineJoin::ROUND)
- .setTestAttr()
- .SetStrokeWidth(3)
- .SetStrokeColor("yellow"s)
- .Render(std::cout);
- }
- }
- <tester />
- <tester />
- <tester fill="green" stroke="yellow" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
- <tester fill="green" stroke="yellow" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement