Jump to content

Drawing a non-pixelated circle


LabiVila

Recommended Posts

  • Moderators

A circle becomes smoother when there are pixels with a lower alpha level around it. Those are also known as sub-pixels.

The function dxDrawCircle is in my opinion a little bit bad example of drawing dx, because it is executing a MTA function a lot just for 1 circle. The bigger the circle to more it has to execute it. Of course the same problem you will have with images, yet there we talk about 1 execution.

You could try to make custom circle textures with:

https://wiki.multitheftauto.com/wiki/DxCreateTexture

https://wiki.multitheftauto.com/wiki/DxGetPixelColor

https://wiki.multitheftauto.com/wiki/DxSetPixelColor

+ the way dxDrawCircle is created.

This way of doing is in the beginning slower by loading, but will catch up within a few seconds.

The sub pixels are on the last pixel rings of the process.

Yet this will always be a problem as long mta doesn't support svg formats.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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