Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Printing Calculator

Canvas Printing Calculator

In this assignment we will continue to work on our canvas printing web service. Specifically we will make use of Javascript to create a webpage that has client-side interaction with the

user. Javascript allows some client-side dynamics by reacting to user events and getting access to values that users type in XHTML form elements. For this assignment the technologies that you may use are: xhtml, css, and javascript.

Canvas printing involves printing images on rolls of canvas. A popular printer for this application is the Epson 9900 printer which can accommodate canvas rolls up to 44" wide. Rolls of canvas come in widths of 24", 36" and 44". When a printer wants to print some images they must decide what size roll would make the most economical use of the canvas. When a picture is printed there must be at least 3" of extra canvas on all sides of the image so that it can be stretched on a wooden frame.

A 24"x36" image could be printed on a 36" wide roll of canvas and consume 42" of canvas, or it could be printed on a 44" wide canvas roll and consume 30" of canvas. So depending on the desired image size it, you need to choose the roll size and the picture orientation to print the picture most economically. Any extra canvas beyond the 3" required border ould be waste and reduce the profit of the printer.

There is another problem with canvas printing. When the ink is applied to the canvas the canvas shrinks. Therefore the image has to be printed slightly larger than the final desired size. If the person is printing the image to go on a pre-made stretcher frame the dimensions are critical -especially for gallery wrap prints.

Therefore the printer must calculate this adjustment and make their image size in photoshop larger. The two most popular canvases, made by Epson and Breathing Color, both shrink 0.01 inch/picture inch in the roll length direction, but don't shrink in the roll width direction at all. So a picture that is intended to be 30"x60" and which is printed on a 36" wide roll will require that the actual picture dimensions in photoshop be set to 30"x60.6".

In this assignment we will build a webpage that allows the user to enter their desired final picture size and also allows them to crop the intended picture. Once they have done this and pressed a "submit" or "calculate" button the page should display the following:

  • The nominal (intended) dimensions of the picture.
  • The actual (photoshop) size of the picture.
  • The size of canvas roll to mount in the printer (24",36",or

"44").

  • The total area of canvas consumed for printing that picture and the total area of canvas wasted.
  • A visual representation of how the picture will be oriented on the canvas roll for printing (e.g. will the picture have to be turned sideways to fit on the canvas roll of a particular width.)
  • A visual representation of the picture cropping.
  • A visual representation of the picture area versus the consumed canvas area.

There are many alternative ways of how you can solve this assignment with xhtml, css and javascript. Here are some of the things you will probably need to figure out how to do.

  • React to buttons on a form.
  • Get values entered in a form text field.
  • Set values in a form text field based on computed results.
  • Prevent users from typing in form text fields who values are meant to computed.
  • Draw and position elements at specific locations.
  • React to mouse events.
  • Possibly drag elements around in the window with the mouse.
  • Determine the size of components and use their values in computations.
  • Alter the size of components based on computation.
  • Modify the css style properties of elements based on computation or user events.

Final Note: You could probably do this assignment by only using the DOM 0 event handling model, but feel free to use DOM 2 event handling also if you like even though it not work

in all browsers. (Internet Explorer 8 did not implement DOM 2, IE-9 might, ...) The other major Browsers should handle the DOM 2 model.

Design Requirements for Canvas Printing Calculator

R1.1)The topmost homepage should be in a file called index.html, but your index.html page could redirect the viewer to another page with your calculator on it if you wish.

R1.2)There should be an image on your calculator page that presumably represents the one that the viewer selected (Optionally you can build in this selection if you want and actually allow the user to select from among many gallery images.)

R1.3)There should be two text fields, appropriately labelled, which represent the intended finished width and height of the image from the viewer's perspective (that is, the width is the dimension of the top and bottom edge of the picture as intended to be viewed.)

R1.4) There should be two text fields, appropriately labelled, which represent the photoshop print size of the image. (One of these dimensions will be larger than the nominal based on the canvas stretching and the orientation in which the picture is printed.)

R1.5) There should be an indicator (maybe radio buttons, whatever) that shows the printer operator, after the calculations are done, which size canvas roll to load in the printer.

R1.6) There should be an indicator, preferably visual, that shows the printer whether the image has to be turned on its side for printing. That is, if the picture is too wide for the roll of canvas, it could be turned 90 degrees for printing. Note that the actual process of turning the picture on its side is done in the print dialog box in photoshop when doing the actual printing.

R1.7) If the user enters only a width or only a height for their intended image dimension then the other dimension should be calculated based on the aspect ratio of the image, or the aspect ratio of their crop. If the user enters both dimensions but has cropped the picture then the UI should ask them if they want to use the entered dimensions or the cropped aspect ratio and the entered width.

R1.8) The user should be able to crop the image. This should be done by dragging a line, a box, or mask, or something with the mouse.

R1.9) The cropping should be shown on the intended image so the user can visually decide on the final crop. When the user has finished cropping the image, dimension calculations should be based on their crop.

Java, Programming

  • Category:- Java
  • Reference No.:- M9529959

Have any Question?


Related Questions in Java

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As