Jump to content

dxDrawImage resolution


_Dark_

Recommended Posts

Posted

Hello.

Is it possible to stretch dxImage to the screen resolution?

For example, 128x128 image looks different on 800x600 resolution and 1920x1080 resolution.

How to stretch the image to fit the screen resolution?

Is there any ideas?

Thank you.

Posted

I don't fully understand what you mean.

But if you stretch image too much it will become low quality.

I would do something like this to stretch image on full screen on any resolution:

local x, y = guiGetScreenSize() 
dxDrawImage(x, y, ... ) 

Posted
Hello.

Is it possible to stretch dxImage to the screen resolution?

For example, 128x128 image looks different on 800x600 resolution and 1920x1080 resolution.

How to stretch the image to fit the screen resolution?

Is there any ideas?

Thank you.

local fScreenX, fScreenY = guiGetScreenSize(); 
  
addEventHandler( 'onClientRender', root, 
    function() 
        dxDrawImage( 0.5 * fScreenX, 0.5 * fScreenY,  0.5 * fScreenX, 0.5 * fScreenY, 'image.png' ); 
    end 
) 

Should working in any resolutions.

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...