Jump to content

[SOLVED]Resize if passes parent size.


BingBo

Recommended Posts

Posted (edited)

Hi, I have created a GUI system using DX drawing, and I need to know how to resize the "elements" if they pass over the parent size. I heard that you can use render targets and dxDrawImageSection, but I don't understand how to use it.

Edited by Guest
Posted

I'm creating the render target outside any function, then I set it to that, then I render my code and after that I reset the render target.

Posted

I think that you didn't understand me, what I'm trying to do is resize the "element" of my custom GUI when it goes over the size of the parent the "element" is created on, like the CEGUI does.

Posted

Just draw everything in the render target, then you can draw the render target; ANY size.

(Everything inside will of course get smaller)

Anyways what's your resolution?

Get the render target to fit on YOUR screen, then you can do size*(screenWidth/yourResolution), size*(screenHeight/yourResolution) and so on.

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