INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Text stretches  (Read 1686 times)

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Text stretches
« on: September 24, 2010, 01:17:41 am »

I wanted to add a text logo to a skin I'm working on.
I added text to both the mainframe_topborder.png and mainframe_bottomborder.png

The problem is, as the MC window is resized, those images get stretched and the text gets blurry.

Would be the same if you used a perfect circle logo, it wouldn't stay round when you resize the window.

Is there a trick to keep the image proportional?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Text stretches
« Reply #1 on: September 24, 2010, 01:54:22 am »

try editing the margin values for top and bottom images in the skin xml. there are four values for the margins, and from left to right, each value refers to the margin for: Left, Top, Right, Bottom.

the theory goes something along the lines of, if your image is in the left corner, and is 200 pixels wide, setting the left margin value to, say, 205, tells the skinning engine to draw those 200 pixels as-is, and stretch the rest as required.

The man from ocuk has my PC at the moment, so I can't give a more concise answer. Sorry.

If your image is in the center, you'd need to use matrix drawing to tell mc to stretch the ends but not the middle...
http://wiki.jriver.com/index.php/Matrix_Drawing

-marko

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: Text stretches
« Reply #2 on: September 25, 2010, 10:47:32 pm »

This tip got me where I needed to be.  Thanks.
Logged
Pages: [1]   Go Up