Join Joe Marini for an in-depth discussion in this video Using translate, part of Learning HTML Canvas.
- [Instructor] Up to this point in the course…we've seen how to draw various…kinds of content onto a canvas.…In this chapter we're going to look…at the various kinds of transformations…that the canvas provides.…Transformations are operations that affect…how drawing operations take place on the canvas.…They don't necessarily perform any drawing themselves…but they do control how drawing is performed.…There are three basic kinds of transformations…that the canvas makes available.…There's translate, scale and rotate.…
You can also define your own custom transformations.…Transforms affect all of the drawing operations…on the canvas that come after them and they are additive.…In other words, each transform is added to the one…that came before it.…So let's start by taking a look…at the simplest transformation, which is translate.…The translate operation just moves the origin of the canvas…by the distances specified by the arguments.…So let's imagine for a moment you have a canvas.…At the upper left of the canvas…there's the current origin point…
- 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.