Jump to content

Just part of image


drifterCZ

Recommended Posts

Originally, there isn't any function for this. Although you can abuse labels in the case of GUI images. (to anyone who has a comment to that: DON'T... SAY... A WORD..! D:) For DX, this is not possible and the only way of cutting them off, is drawing them partially off-screen.

You can create a label at the size you want the picture to be. Then, create an image with the label as its parent. So for instance:

-- Warning: This is something I call hax, but I guess it works like you asked
 
local hax=guiCreateLabel(0,500,300,300,"",false)
guiCreateStaticImage(-100,-100,500,500,"hax.png",false,hax)

This causes 200 pixels horizontally and 200 pixels vertically to be invisible. In total, that is.

I'm not entirely sure if it's free of warnings/errors. Not even if it still works, last time I used it was sometime in DP2.

Link to post
Originally, there isn't any function for this. Although you can abuse labels in the case of GUI images. (to anyone who has a comment to that: DON'T... SAY... A WORD..! D:) For DX, this is not possible and the only way of cutting them off, is drawing them partially off-screen.

You can create a label at the size you want the picture to be. Then, create an image with the label as its parent. So for instance:

-- Warning: This is something I call hax, but I guess it works like you asked
 
local hax=guiCreateLabel(0,500,300,300,"",false)
guiCreateStaticImage(-100,-100,500,500,"hax.png",false,hax)

This causes 200 pixels horizontally and 200 pixels vertically to be invisible. In total, that is.

I'm not entirely sure if it's free of warnings/errors. Not even if it still works, last time I used it was sometime in DP2.

just GENIAL! thanks

Link to post

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