Skip to content

Commit

Permalink
Fix [code block]: graphics.md Svg (#101)
Browse files Browse the repository at this point in the history
Use a valid svg string.
  • Loading branch information
protofarer authored Apr 9, 2024
1 parent 7868871 commit 869b435
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/guides/components/graphics.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ In addition, you have access to the following complex primitives:
There is also support for svg. But due to the nature of how PixiJS renders holes (it favours performance) Some complex hole shapes may render incorrectly. But for the majority of shapes, this will do the trick!

```ts
let mySvg = new Graphics()
.svg('M 100 350 q 150 -300 300 0');
let mySvg = new Graphics().svg(`
<svg>
<path d="M 100 350 q 150 -300 300 0" stroke="blue" />
</svg>
`);
```

## The GraphicsContext
Expand Down

0 comments on commit 869b435

Please sign in to comment.