Join Joe Marini for an in-depth discussion in this video Clipping paths, part of Learning HTML Canvas.
- [Instructor] One of the more advanced features…of canvas drawing is using clipping paths.…You can think of a clipping path as basically…a type of mask.…It defines a region or boundary…inside of which your drawing will take place…and outside of which drawing will be clipped.…In other words, it will have no effect.…Now initially, the entire canvas is by default…the current clipping path,…which means anywhere you draw on the canvas…as long as it's visible on the screen,…those bits are going to show up to the user…when you draw.…
Any canvas path can be a clipping path.…There's just one function to call…to create a clipping path.…You draw a path as you normally would…and then you call the clip function…and that path then becomes the current clipping path.…So let's flip over to the editor…so we can see what this looks like in action.…So I've got my clipping start example open…and before we make any changes,…let's look at what we already have in the browser.…So we'll bring up clipping start…and you can see that there's two images.…
- 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.