From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-br/web/svg/element/textpath/index.html | 76 +++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 files/pt-br/web/svg/element/textpath/index.html (limited to 'files/pt-br/web/svg/element/textpath') diff --git a/files/pt-br/web/svg/element/textpath/index.html b/files/pt-br/web/svg/element/textpath/index.html new file mode 100644 index 0000000000..aad3f76132 --- /dev/null +++ b/files/pt-br/web/svg/element/textpath/index.html @@ -0,0 +1,76 @@ +--- +title: textPath +slug: Web/SVG/Element/textPath +tags: + - Conteúdo Textual + - Elemento + - Referencia + - SVG +translation_of: Web/SVG/Element/textPath +--- +
{{SVGRef}}
+ +

Assim como o texto escrito em uma linha reta, o SVG também inclui a capacidade de colocar um texto ao longo de uma forma de um elemento {{ SVGElement("path") }}. Para especificar que um bloco de texto é renderizado ao longo da forma de um  {{ SVGElement("path") }}, inclua o texto em um elemento textPath o qual inclui um atributo xlink:href com uma referência a um elemento {{ SVGElement("path") }}.

+ +

Contexto de uso

+ +

{{svginfo}}

+ +

Exemplo

+ +
<svg width="100%" height="100%" viewBox="0 0 1000 300"
+     xmlns="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+  <defs>
+    <path id="MyPath"
+          d="M 100 200
+             C 200 100 300   0 400 100
+             C 500 200 600 300 700 200
+             C 800 100 900 100 900 100" />
+  </defs>
+
+  <use xlink:href="#MyPath" fill="none" stroke="red"  />
+
+  <text font-family="Verdana" font-size="42.5">
+    <textPath xlink:href="#MyPath">
+      Nós vamos para cima, para baixo, para cima
+    </textPath>
+  </text>
+
+  <!-- Show outline of the viewport using 'rect' element -->
+  <rect x="1" y="1" width="998" height="298"
+        fill="none" stroke="black" stroke-width="2" />
+</svg>
+
+ +

Resultado:

+ +

{{EmbedLiveSample("Exemplo",500,175)}}

+ +

Atributos

+ +

Atributos globais

+ + + +

Atributos específicos

+ + + +

Interface DOM

+ +

Este elemento implementa a interface do SVGTextPathElement.

-- cgit v1.2.3-54-g00ecf