From 8c2c6747ebe8e44ca1cbf55aa67afa2e5d53b66b Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 19 Oct 2021 09:38:24 +0900 Subject: Web/SVG/Element/clipPath を新規翻訳 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2021/10/19 時点の英語版に同期 --- files/ja/web/svg/element/clippath/index.md | 93 ++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 files/ja/web/svg/element/clippath/index.md diff --git a/files/ja/web/svg/element/clippath/index.md b/files/ja/web/svg/element/clippath/index.md new file mode 100644 index 0000000000..433b2b4695 --- /dev/null +++ b/files/ja/web/svg/element/clippath/index.md @@ -0,0 +1,93 @@ +--- +title: +slug: Web/SVG/Element/clipPath +tags: + - 要素 + - リファレンス + - SVG +browser-compat: svg.elements.clipPath +translation_of: Web/SVG/Element/clipPath +--- +{{SVGRef}} + +**``** は [SVG](/ja/docs/Web/SVG) の要素で、 {{SVGAttr("clip-path")}} プロパティで使用されるクリッピングパスを定義します。 + +クリッピングパスは、描画が適用される領域を制限する。概念的には、クリッピングパスで囲まれた領域の外にある部分は描画されません。 + +## 例 + +```css hidden +html,body,svg { height:100% } +``` + +```html + + +    + + + + + +``` + +```css +/* With a touch of CSS for browsers who * + * implemented the r Geometry Property. */ + +@keyframes openYourHeart {from {r: 0} to {r: 60px}} + +#myClip circle { + animation: openYourHeart 15s infinite; +} +``` + +{{EmbedLiveSample('Example', 100, 100)}} + +クリッピングパスは、概念的には、参照している要素のカスタムビューポートと同じです。したがって、要素の*レンダリング*に影響を与えますが、要素の*固有のジオメトリー*には影響を与えません。クリッピングされた要素 (`` 要素を {{SVGAttr("clip-path")}} プロパティで参照している要素、または参照している要素の子) のバウンディングボックスは、クリッピングされていない場合と同じでなければなりません。 + +既定では、クリップされた領域では {{cssxref("pointer-events")}} が発行されません。例えば、半径 `10` の円が半径 `5` の円でクリッピングされている場合、小さい方の半径の外側では "click" イベントを受け取ることはありません。 + +## 属性 + +* {{SVGAttr("clipPathUnits")}} + * : `` 要素の内容物の座標系を定義します。 + *値の型*: `userSpaceOnUse`|`objectBoundingBox` ; *既定値*: `userSpaceOnUse`; *アニメーション*: **可** + +### グローバル属性 + +* [コア属性](/ja/docs/Web/SVG/Attribute/Core) + * : 最重要なもの: {{SVGAttr('id')}} +* [スタイル付け属性](/ja/docs/Web/SVG/Attribute/Styling) + * : {{SVGAttr('class')}}, {{SVGAttr('style')}} +* [条件処理属性](/ja/docs/Web/SVG/Attribute/Conditional_Processing) + * : 最重要なもの: {{SVGAttr('requiredExtensions')}}, {{SVGAttr('systemLanguage')}} +* [プレゼンテーション属性](/ja/docs/Web/SVG/Attribute/Presentation) + * : 最重要なもの: {{SVGAttr('clip-path')}}, {{SVGAttr('clip-rule')}}, {{SVGAttr('color')}}, {{SVGAttr('display')}}, {{SVGAttr('fill')}}, {{SVGAttr('fill-opacity')}}, {{SVGAttr('fill-rule')}}, {{SVGAttr('filter')}}, {{SVGAttr('mask')}}, {{SVGAttr('opacity')}}, {{SVGAttr('shape-rendering')}}, {{SVGAttr('stroke')}}, {{SVGAttr('stroke-dasharray')}}, {{SVGAttr('stroke-dashoffset')}}, {{SVGAttr('stroke-linecap')}}, {{SVGAttr('stroke-linejoin')}}, {{SVGAttr('stroke-miterlimit')}}, {{SVGAttr('stroke-opacity')}}, {{SVGAttr('stroke-width')}}, {{SVGAttr("transform")}}, {{SVGAttr('vector-effect')}}, {{SVGAttr('visibility')}} + +## 利用メモ + +{{svginfo}} + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} + +## 関連情報 + +* クリッピングとマスクの SVG 要素: {{SVGElement("mask")}} +* CSS プロパティ: {{cssxref("clip-path")}}, {{cssxref("pointer-events")}} -- cgit v1.2.3-54-g00ecf