Question
C++ Program In this problem, you are asked to write a program makeSVG.cpp that creates a scalable vector graphics (svg) file with shapes based on
C++ Program
In this problem, you are asked to write a program makeSVG.cpp that creates a scalable vector graphics (svg) file with shapes based on input read from standard input. An svg file can be visualized using a browser such as Firefox, Safari, Chrome or Internet Explorer. See https://en.wikipedia.org/wiki/Scalable_Vector_Graphics. Your svg file should use the same template as template.svg. Each line of input defines a shape to be added to the line(s) indicated in template.svg.
The first character on each line determines whether the shape is a circle (C) or a rectangle (R). The position and size of the shape is described by integers in the rest of the input line. A rectangle is specified by the position of its lower left corner, its width and its height. Example: Rectangle with corners at (10,20), (40,20), (40,60), (10,60) R 10 20 30 40 A circle is specified by the position of its center and its radius Example: Circle centered at position (30,40) with radius 20 C 30 40 20 It can be assumed that input will consist of valid characters (only R or C) and the appropriate number of positive integers. Use the test cases to check your program and match the test svg files exactly.
/////////////////////////////////////// template.svg code:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started