Jump to content

How to manually on/off anti-aliasing of PIXI.Graphics object.


Recommended Posts

Is there a way to on/off anti-aliasing of graphics objects manually? I am writing stock chart on top of PIXI.js and it has several shapes. If I set antialiasing property true when creating a renderer all chart shapes are antialiased (Straight shapes are also applied antialiased). Because of antialiased shapes, the chart becomes blurry. Therefore, if I have a way to on/off antialiasing each PIXI graphics objects manually I think chart will become sharp.   

Candle Chart - No need to be antialiased

image.png.ab65d0af5667872ecd5efb80fa6406eb.png Untitled.png.b7bbea5fa31d1500fea5b7018d08ce81.png 

Line Chart - need to be antialiased


Would like to hear any advice on the subject.

Thanks in advance!

Link to comment
Share on other sites

So, you had no luck in getting the lines in the Candle Chart to look better by aligning each line separately to the pixel boundaries (+/- half a pixel)?

Anti-aliasing is a property of the WebGL canvas, so I don't think you can change it per display object. You might be able to render a display object to a separate canvas or render target using a different anti-aliasing setting, and then render that separate canvas to the main canvas as a sprite.

Link to comment
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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...