SVGRectElement* rect = new SVGRectElement(); rect->setAttribute("x", 0); rect->setAttribute("y", 0); rect->setAttribute("width", 100); rect->setAttribute("height", 50);
SVGTextElement* text = new SVGTextElement("Hello, world!"); text->setAttribute("x", 50); text->setAttribute("y", 25);
SVGImageElement* img = new SVGImageElement(); img->setAttribute("x", 0); img->setAttribute("y", 0); img->setAttribute("width", 100); img->setAttribute("height", 50); img->setAttribute("href", "image.png");These examples use the SVGElement class from the Apache Batik package library, which is an open-source toolkit for SVG manipulation and rendering.