Author Topic: Question: Is it possible to resize a surface?  (Read 1434 times)

froggy77

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Question: Is it possible to resize a surface?
« on: May 18, 2015, 10:23:04 pm »
Hello,

Is it possible to resize a surface with something like "surface:set_size()" that seems to not exist?

I would like to to do it in a "rebuild_surface' function.


Thanks in advance.
« Last Edit: May 19, 2015, 07:28:54 pm by froggy77 »

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1177
    • View Profile
Re: Question: Is it possible to resize a surface?
« Reply #1 on: May 19, 2015, 02:30:15 am »
No, sorry :)

froggy77

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Question: Is it possible to resize a surface?
« Reply #2 on: May 19, 2015, 07:27:12 pm »
It doesn't matter. =>[]:'(
Thank you.

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1177
    • View Profile
Re: Question: Is it possible to resize a surface?
« Reply #3 on: May 19, 2015, 08:41:27 pm »
A workaround is to create a new surface with the wanted size and draw the first one on the new one.
Another workaround is to keep only one surface with the max size and keep unused parts transparent.

froggy77

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Question: Is it possible to resize a surface?
« Reply #4 on: May 24, 2015, 06:57:07 pm »
Ok thank you for your advices. I managed to do what I wanted  :)
I opened a topic to share this little creation HUD: ZL Hearts
If someone finds some bugs , thank you to report it.