Jump to content

dxDrawImage resolution


Recommended Posts

  • Other Languages Moderators

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, 
        dxDrawImage( 0.5 * fScreenX, 0.5 * fScreenY,  0.5 * fScreenX, 0.5 * fScreenY, 'image.png' ); 

Should working in any resolutions.

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