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.
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
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Modern Database Management
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out With Visual Basic (7th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with C++: Early Objects
- Q 1. Create an OpenGL project, name it GLprojectl where you: Define a 600x500 render (drawing) window In the render window, define a coordinate system (-300, 300, -300, 300) Draw the following points and the line segments between them, select a different color for every pair of points and their line segment: а. Р1-(-40, -140), Р2- (100,200) b. P1=(10,270), P2= (200,0) с. Р1- (20,10), Р2- (20,-200) d. P13(0, 0), P2= (250,250)arrow_forwardExplainationarrow_forwardDesign and implement a calculator using HTML, CSS (with Bootstrap) and JavaScript. The calculator will only run in the browser, and must not depend on any server side scripting (C#). Functional requirements: -A display that shows entry and results -Number buttons on the calculator -Supports resetting the calculator (C function) -Supports clearing the current entry (CE function) -Handles user errors (e.g. pressing "5++5" leads to "5+5", pressing "5+-5 leads to "5-5") -Supports using the result in the next calculation Each element of the calculator needs to be labeled with the following HTML id attribute: Display: display Each number button must have the following IDs: 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine' + button: 'plus' - button: 'minus' * button: 'multiply' / button: 'divide' = button: 'equals' C button: 'reset' CE button: 'clear' IDs are used to find buttons on the page, correctly labeling HTML elements with IDs is important for the tests to…arrow_forward
- Visit the following webpage: https://archive.org/details/National_Geographic_Wallpapers This webpage hosts a collection of 506 images from National Geographic Magazine with most of these images previously being part of an international photography contest. Your task is to randomly choose 5 images and identify the objects within those images using Google’s vision API. Submit your iPython notebook code, and screenshots of output as shown below(no need to submit the images separately) You may need to reactivate your Google vision API account (or billing information for trial cycles) if you haven’t used it recently.arrow_forwardImplement the using Windows form App(.NET Framework) c# : 1- creat a Form titled “ Students ” 2- Add text box with max 100 letter, where student can enter his name 3- Add Grade combobox where student can select his grade (A-B-C-D-E-F) 4- Add button “Add”, when clicked the name and grade are added to the data view5- Add button “Stat” when clicked another form appears6- A data grid appears with grade vs count statistic (ex : A ,3 ) (please respond with screenshots )arrow_forwardAn Internet service provider(ISP) offers free customized websites for their customers. Customization includes; “background-color” of webpages(you can choose just one color), “font-size” that will be applied to all webpages (size that could be chosen is from 10 to 16), “font” that will be applied to all webpages (limited to “Calibri(Body)”, “Arial” and “Times New Roman”) and Contact Information that will be displayed at the bottom of every webpage and is formed from: “E-mail address” and “Telephone number” Keeping in mind that there exists a unique customer number assigned to each customer and kept in a session variable named “cid” ($_SESSION[‘cid’]) during the login process; Assuming that you have a database named “quizdb” with a database user named “quizusr” and password “pwd”; Create the database table named “pages” using the information specified above(i - iv). Fill in the following table for each field that you created. Field Name Type Length/Values Index…arrow_forward
- When developing a display driver what would you see the differences in comparison to these two implementations below? Explain to me what would be the benefits of pros and cons, when designing a driver to allow users to get our current frame buffer from our display driver.Explain to me pros and cons of the following options below.Option #1SSD1331 display1;auto& framebuffer = Display<display1>::CurrentFramebuffer();Option #2auto& framebuffer display1.CurrentFramebuffer();arrow_forwardIs it possible to create a simple webGL program (HTML & Javascript) program that produces a simple shape like a triangle or square that also utilizes the z-buffer algorithm? What does that look like code wise? Thank youarrow_forwardSubject: Computer Graphics Note: please write in your own . copy from internet will not help me. Question: Find the normalization transformation that maps a window whose lower left corner is at (1, 1) and upper right corner is at (6, 10) onto a viewport that has lower left corner at (0, 0) and upper right corner at (½, ½).arrow_forward
- The parameter has to be adjusted. The size of the image cannot be supported. A minimum of 40 pixels and a maximum of 2600 pixels must be used for each picture dimension.arrow_forwardJavaScript Create a non-predictive T9-like keypad. For those who do not know what a T9 keypad is, it is essentially a more compact keyboard for mobile phones that requires you to perform multi-presses to choose letters you want to spell your words with (technology that may be older than some of students). If you are unfamiliar with the user interface, use the following shell in an html file to get a sense of what it looked like on older mobile phones: // html T9 Keypad abc def ghi jkl mno pqrs tuv wxyz How it functions for the assignment: If a button contains a letter you want to type, click on the button N number of times associated to the order the letters are in. So if you wanted "c", you push the second button 3 times. If you push the button more than the number of letters in the button, it will wrap-around and return the letter after. For example, clicking the first button (that has letters a, b, and c) 5 times returns "b". The input field only appends the letter to once…arrow_forwardLearn Visual Basic (in Microsoft Visual Studio) yourself and do the following: (1) Have a textbox that can display multiple lines of text.The user can select a simple .txt file (like a notepad file, a file with ASCII code but not formatting characters). Display the content of the file in this textbox. Should have an vertical scrollbar for the textbook. (2) Have an user interface to take the following information: Firstname (String) Lastname (String) Age (integer) Phone (String) Save the file as testdata.dta. Have to buttons - Save and Quit. Save button to save the record to the file. Quit button to close the file.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education