The following are the requirements for the Draw application. All requirements are satisfied by the draw.5 tag.
- A user can create elements (such as rectangles, ovals) in a drawing canvas.
- After creating an element, all other selected elements are de-selected, the select tool is chosen, and the newly created element is selected.
- With select tool chosen, an element can be selected; if the shift key is held down while pressing the mouse then multiple elements can be selected.
- Only “top-level” elements can be selected; it is not possible to individually select an element that is part of a larger group.
- If shift key is down and mouse pressed on a selected element, it is unselected.
- A selected element can be moved; if multiple elements are selected, they all move relative to the one on which the user initially pressed the mouse.
- A selected element can be resized by dragging an anchor; if multiple elements are selected when a resize occurs, then only the one on which the user pressed the mouse will be resized and all other selected elements will be de-selected.
- If a group of elements is resized, all constituent elements are resized proportional to the grouped element’s bounding box.
- A selected element can be deleted; if multiple elements are selected, they are all deleted.
- Two or more selected elements can be grouped into a composite element.
- Grouped elements can be included as part of a group.
- A grouped element can be un-grouped and all constituent elements become top-level elements. 2. When a grouped element has elements that are themselves groups, they remain as groups and are unaffected.
- All selected elements can be duplicated.
- Duplicated elements appear offset (+20, +20) to original elements.
- All selected elements can be copied.
- All selected elements can be cut; they are removed from the canvas.
- If elements are cut and placed on the clipboard, they can be pasted to the canvas
- If elements have been copied and placed on the clipboard, when pasted they are offset by (+20, +20) similar to duplication.
- The user can save the state of the canvas to a file on disk.
- The user can load the state of the canvas from a file on disk.
- The user can request a new canvas which deletes all existing elements.