- [Instructor] Up until now we've seen how…to draw simple shapes like rectangles and lines.…In this example we'll take a look at drawing…some more complex shapes, starting with arcs and paths.…So what is a path?…A path is basically a sett of connected points,…and the points are connected by lines or by curves,…and a path is either open or closed.…The current drawing context always has one,…and only one, current drawing path.…So a closed path has an endpoint…that is the same as the starting point.…Or, the canvas can automatically draw a line…from the ending point to the starting point…and close the path for you.…
To begin creating a path, you use the beginPath() method.…To add segments to the path,…you basically use one or more path-drawing routines.…To stroke the current path, you use the stroke() function…and to fill it, you call fill().…To close the current path, should you decide to close it,…you would call closePath()…and in the case the endpoint is not the same…as the start point, the canvas will close the path for you.…
- Canvas examples
- Drawing shapes, arcs, paths, and curves
- Drawing text
- Drawing shadows, patterns, and gradients
- Using clipping paths
- Displaying images and video
- Transforming objects with scaling and rotation
- Manipulating raw pixels
- Applying transitions
- Creating animations
Skill Level Intermediate
1. Overview of Canvas
2. Basic Canvas Drawing Techniques
3. Complex Canvas Drawing
4. Advanced Drawing APIs
5. Practical Examples
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.