Ravindu89

PIXI Graphics are not sharp

Recommended Posts

I am building a stock chart on PIXI.js. To display different chart styles on chart, I am using PIXI.graphics' drawRect, drawPolygon, lineTo functions. Graphics, Edges, grid lines, text are not sharp in this chart. I would like to say that I've tried several workarounds from the web to make this chart sharp. But those didn't help me. 

Examples how the chart looks on in candle and area chart styles and renderer parameters are shown in below. 

   const renderer = PIXI.autoDetectRenderer(canvas.width, canvas.height,
            {view: canvas, antialias: true, transparent: false, resolution: 1});

      
        renderer.view.style.position = 'relative';
        renderer.view.style.display = 'block';
        renderer.autoResize = true;
        renderer.backgroundColor = 0xFFFFFF;

Area Chart Style

area.thumb.png.35451d20bba1f18c38e7d3f874f876df.png

Candle Chart Style

candle.thumb.png.3331129372018397882ec337bd8ba93a.png

Would like to hear any advice on the subject.

Thanks in advance!

Share this post


Link to post
Share on other sites

Thank you for your quick reply,

I instantiate Graphics constructor like below, 

new PIXI.Graphics(true);

Yes, I am working with half-integers. but I didn't get what you mean in above that 1-pixel line will be blurry.  Could you explain more about this topic?

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.