mirror of
https://gitee.com/antv/g6.git
synced 2024-12-15 18:11:08 +08:00
723 B
723 B
title | order |
---|---|
Fill with Texture in G6 | 5 |
G6 support filling a shape with texture with Image or Data URL.
p
is the flag for using texture; the text in green can be modified to satisfy your requirements;a
is a way of repeating of the texture, which can be changed into:
a
: Repeat in horizontal and vertical; -x
: Repeat only in horizontal; -y
: Repeat only in vertical; -n
: No repeat.
Assign the fill
as below while Configurating the Node or Edge:
shape.attr('fill', 'p(a)https://gw.alipay.com/cube.png');