LoginSignup
7
7

More than 5 years have passed since last update.

SVGとかCSSでマスクとかクリッピング

Posted at

Path2D

Canvasの新しいAPIらしい。
https://developer.mozilla.org/ja/docs/Web/API/Path2D/Path2D

SVGのパスのd=""入れれば、そのパスが描画される。

https://github.com/google/canvas-5-polyfill
んで、これがPolyfill。
中に入ってる、svgpath.jsというParserが優秀っぽい?

Snap.svgでアニメーションさせたやつをCanvasで使うパターンもありかも?

SVGマスク

SVGのなかで、mask="url(#maskimg)"これで画像マスクしてくれるらしい。
IE9〜対応なんでコレ結構あり?

色々書こうとしたけど、下のリンクがわかりやすいので諦めます。

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7