7 - Drawing and Graphics with the HTML5 Canvas — Topics & Learning Outcomes

📋 Module Topics🎯 Student Learning Outcomes

Module Topics

Introduction to the HTML5 Canvas Element

Students learn what the HTML5 Canvas element is, how to add it to a webpage, and how to access the 2D rendering context using JavaScript to begin drawing programmatically.

Drawing Basic Shapes

This topic covers how to draw fundamental shapes such as rectangles, circles, and polygons using the Canvas API's built-in methods and properties.

Working with Paths and Lines

Students explore how to create complex custom shapes and line drawings by defining paths, using moveTo, lineTo, and related methods to construct precise graphics.

Applying Colors, Styles, and Gradients

This topic introduces fill and stroke styles, including solid colors, gradients, and patterns, enabling students to add visual richness and detail to their canvas drawings.

Rendering Text on the Canvas

Students learn how to render and style text on the canvas, including setting font properties, alignment, and applying fill or stroke to textual content.

Drawing and Manipulating Images

This topic covers how to load and draw images onto the canvas using the drawImage method, including techniques for cropping and scaling image content.

Foundations of Interactive Canvas Graphics

Students are introduced to the principles of combining Canvas drawing with JavaScript events to create dynamic and interactive browser-based graphics experiences.

Student Learning Outcomes

By the end of this module, students will be able to:

MO1
Construct a functioning HTML5 Canvas setup by embedding the canvas element in a webpage, selecting it with JavaScript, and retrieving the 2D rendering context
Level: ApplyType: BehavioralCourse mapping: —
MO2
Produce canvas drawings that incorporate basic shapes, paths, text, and images by applying the appropriate Canvas API methods and styling properties, including fill and stroke styles, gradients, and drawImage
Level: ApplyType: BehavioralCourse mapping: —
MO3
Differentiate between retained-mode and immediate-mode rendering by explaining why dynamic canvas graphics require explicit clearing and redrawing in response to state changes or user input
Level: AnalyzeType: CognitiveCourse mapping: —
MO4
Build an interactive canvas application that translates mouse event coordinates to canvas space, responds to user input via event listeners, and uses requestAnimationFrame to synchronize redraws with the display refresh rate
Level: CreateType: BehavioralCourse mapping: —
MO5
Evaluate the visual and structural quality of canvas code by identifying separation of concerns across initialization, event handling, state management, and rendering responsibilities
Level: EvaluateType: CognitiveCourse mapping: —

Course Outcomes (reference)

No course outcomes have been defined.