Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradients not supported? #5

Open
makc opened this issue Sep 4, 2015 · 3 comments
Open

gradients not supported? #5

makc opened this issue Sep 4, 2015 · 3 comments

Comments

@makc
Copy link

makc commented Sep 4, 2015

I have this basic svg with the gradient in the rectangle:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="104px" height="640px" viewBox="0 0 104 640" enable-background="new 0 0 104 640" xml:space="preserve">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="52" y1="393.9754" x2="52" y2="1.6092">
    <stop  offset="0.6019" style="stop-color:#B5F4FF"/>
    <stop  offset="0.7487" style="stop-color:#ACF4FF"/>
    <stop  offset="0.9921" style="stop-color:#92F4FF"/>
    <stop  offset="0.9944" style="stop-color:#92F4FF"/>
</linearGradient>
<rect fill="url(#SVGID_1_)" width="104" height="640"/>
</svg>

What I end up with is this:
screen shot 2015-09-04 at 3 39 09

in PIXI.Graphics, and nothing is displayed.

@makc makc changed the title rectangles not supported? gradients not supported? Sep 4, 2015
@FlorianLudwig
Copy link
Contributor

@makc there is no easy way to fix this as the PIXI.Graphics API itself does not support gradients.

@trusktr
Copy link

trusktr commented Jul 5, 2017

It's 2017, gradients are supported in Pixi now.

@Rskut
Copy link

Rskut commented May 31, 2019

It’s 2019, svg consume to much gpu ressouces on mobile devices (5000+ paths)

So im looking for svg to raster with d3js and pixijs combination. Or does pixijs offer a solution for this already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants