bartleby

Videos

Textbook Question
Book Icon
Chapter 6, Problem 11PP

Chapter 6, Problem 11PP, To complete this problem you must have a computer that is capable of viewing Scalable <x-custom-btb-me data-me-id='1725' class='microExplainerHighlight'>Vector</x-custom-btb-me> , example  1

To complete this problem you must have a computer that is capable of viewing Scalable Vector Graphics (SVG) files. Your Web browser may already be able to view these files. To test to see if your browser can display SVG files, type in the rectline.svg file below and see if you can open it in your Web browser. If your Web browser cannot view the file, then you can search on the Web and download a free SVG viewer.

The graphics screen to draw an image uses a coordinate system in which (0, 0) is located in the upper-left corner. The x coordinate increases to the right, and the y coordinate increases to the bottom. Consequently, coordinate (100, 0) would be located 100 pixels directly toward the right from the upper-left corner, and coordinate (0, 100) would be located 100 pixels directly toward the bottom from the upper-left corner. This is illustrated in the figure below.

Chapter 6, Problem 11PP, To complete this problem you must have a computer that is capable of viewing Scalable Vector , example  2

The SVG format defines a graphics image using XML. The specification for the image is stored in a text file and can be displayed by an SVG viewer. Here is a sample SVG file that draws two rectangles and a line. To view it, save it to a text file with the “.svg” extension, such as rectline.svg, and open it with your SVG viewer.

<?xml version="1.0" standalone="no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"

"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="500" height="500"

xmlns="http://www.w3.org/2000/svg">

<rect x="20" y="20" width="50" height="250"

style="fill:blue;"/>

<rect x="75" y="100" width="150" height="50"

style="fill:rgb(0,255,0);"/>

<line x1="0" y1="0" x2="300" y2="300"

style="stroke:purple;stroke-width:2"/>

</svg>

For purposes of this problem, you can ignore the first five lines and the last line and consider them “boilerplate” that must be inserted to properly create the image.

The lines that begins with <rect x="20"…draw a blue rectangle whose upper-left corner is at coordinate (20, 20) and whose width is 50 pixels and height is 250 pixels.

The lines that begin with <rect x="75"…draw a green rectangle (RGB color value of 0,255,0 is all green) whose upper-left corner is at coordinate (75, 100) and whose width is 150 pixels and height is 50 pixels.

Finally, the <line> tag draws a purple line from (0, 0) to (300, 300) with a width of 2.

Based on this example, write a program that inputs four nonnegative integer values and creates the SVG file that displays a simple bar chart that depicts the integer values. Your program should scale the values so they are always drawn with a maximum height of 400 pixels. For example, if your input values to graph were 20, 40, 60, and 120, you might generate a SVG file that would display as follows:

Chapter 6, Problem 11PP, To complete this problem you must have a computer that is capable of viewing Scalable Vector , example  3

Blurred answer
Students have asked these similar questions
i need to load this file in and draw the circle using ONLY graphics.py, no turtle graphics please. I have these items so far. Not sure how to read in the file, and have it draw the circle by opening up a new window.  def draw_circle(x, y, radius, color):c = Circle(Point(x, y), radius)c.setFill(color)c.draw(win) if line[0] == "circle":draw_circle(int(line[1]), int(line[2]),int(line[3]), (line[4]))
Write a PYTHON program that can take any sort of image(jpeg, png, etc) as input from your computer and turn it into a DST/.dst image or file the program must have a gui and a button that says convert with a save button to save the dst file aswell
in python Write a program that will open a file .csv, read its contents and print them out.  Your output should look like this: .csv (look the image) the file looks like these image First       Last              Age         Wagejane        Smith          21.00     21.50Jack       Jones           20.00    19.50Edgar    Martinez   22.00     22.75Zanab   Sayegh        21.00     21.75

Chapter 6 Solutions

Problem Solving with C++, Student Value Edition Plus MyLab Programming with Pearson eText - Access Card Package (10th Edition)

Ch. 6.1 - Prob. 11STECh. 6.2 - Prob. 12STECh. 6.2 - Prob. 13STECh. 6.2 - Prob. 14STECh. 6.2 - What output will be sent to the stuff.dat when the...Ch. 6.2 - Prob. 16STECh. 6.2 - In formatting output, the following flag constants...Ch. 6.2 - Here is a code segment that reads input from...Ch. 6.2 - Prob. 19STECh. 6.2 - Write the definition for a void function called...Ch. 6.2 - (This exercise is for those who have studied the...Ch. 6.3 - Suppose c is a variable of type char. What is the...Ch. 6.3 - Suppose c is a variable of type char. What is the...Ch. 6.3 - Prob. 24STECh. 6.3 - Consider the following code (and assume that it is...Ch. 6.3 - Consider the following code (and assume that it is...Ch. 6.3 - Suppose that the program described in Self-Test...Ch. 6.3 - Consider the following code (and assume that it is...Ch. 6.3 - Prob. 29STECh. 6.3 - Define a function called copyLine that takes one...Ch. 6.3 - Prob. 31STECh. 6.3 - (This exercise is for those who have studied the...Ch. 6.3 - (This exercise is for those who have studied the...Ch. 6.3 - Suppose ins is a file input stream that has been...Ch. 6.3 - Write the definition for a void function called...Ch. 6.3 - Consider the following code (and assume that it is...Ch. 6.3 - Write some C++ code that will read a line of text...Ch. 6 - Write a program that will search a file of numbers...Ch. 6 - Write a program that takes its input from a file...Ch. 6 - a. Compute the median of a data file. The median...Ch. 6 - Write a program that takes its input from a file...Ch. 6 - Write a program that gives and takes advice on...Ch. 6 - Write a program that reads text from one file and...Ch. 6 - Prob. 7PCh. 6 - Write a program to generate personalized junk...Ch. 6 - Write a program to compute numeric grades for a...Ch. 6 - Enhance the program you wrote for Programming...Ch. 6 - Prob. 4PPCh. 6 - Write a program that will correct a C++ program...Ch. 6 - Write a program that allows the user to type in...Ch. 6 - This project is the same as Programming Project 6,...Ch. 6 - This program numbers the lines found in a text...Ch. 6 - Write a program that computes all of the following...Ch. 6 - The text file babynames2012.txt, which is included...Ch. 6 - To complete this problem you must have a computer...Ch. 6 - Write a program that prompts the user to input the...Ch. 6 - The following is an old word puzzle: Name a common...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY