Join Joe Marini for an in-depth discussion in this video Images and video, part of Learning HTML Canvas.
- [Instructor] You don't have to limit your canvas content…to just arcs and lines and rectangles,…you can also render images and video onto the canvas,…and we'll see how to do that in this example.…The source data for drawing an image…can come from a video element,…an image element or from another canvas.…The resulting image can also be resized…or cropped when it's drawn.…You accomplish this by using the draw image function,…and there are three versions of it.…The first one is the simplest.…Draw image takes source content,…and the source content can either be an image,…a video or canvas,…and draws that content onto the destination canvas…at the point specified by x and y.…
The second version again takes source content that you…want to draw,…and draws it onto the destination canvas,…but it also scales the image to fit into the given…width and height.…The last version takes a source image,…but also takes two sets of arguments that control…which part of the source should be drawn and where.…It takes a source x and source y was well as…
- 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.