21.12.2022 Views

python_para_desenvolvedores_2ed

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

310 Inkscape

<_name>RandomText</_name>

<id>org.ekips.filter.randomtext</id>

<dependency type="executable"

location="extensions">randomtext.py</dependency>

<dependency type="executable"

location="extensions">inkex.py</dependency>

<param name="texto" type="string" _gui-text="Texto">Python</param>

<param name="quantidade" type="int" min="1" max="500" _guitext="Quantidade">20</param>

<param name="largura" type="int" min="1" max="10000" _guitext="Largura">1000</param>

<param name="altura" type="int" min="1" max="10000" _guitext="Altura">1000</param>

<effect>

<object-type>all</object-type>

<effects-menu>

<submenu _name="Render"/>

</effects-menu>

</effect>

<script>

<command reldir="extensions"

interpreter="python">randomtext.py</command>

</script>

</inkscape-extension>

Janela com os parâmetros da extensão:

Exemplo de saída (quantidade igual a 100, largura igual a 600 e altura igual a

200):

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!