phoboslab / WebGLImageFilter

Fast image filters for Browsers with WebGL support
MIT License
332 stars 62 forks source link

How to apply the filter in a path ? #4

Closed finscn closed 10 years ago

finscn commented 10 years ago

I create a path ( via context.beginPath & closePath), How to apply the filter in the path ?

phoboslab commented 10 years ago

You can draw a path in an offscreen canvas and then use this offscreen canvas as the source image for the filter.

There's no way to filter Canvas2D paths directly. The WebGL Image Filter only filters images ;)

finscn commented 10 years ago

Thanks.