PANELPIXMAP_FIT2

BlitzMax Forums/MaxGUI Module/PANELPIXMAP_FIT2

Brucey(Posted 2008) [#1]
What exactly am I meant to do with that, which I would do differently to PANELPIXMAP_FIT ?


SebHoll(Posted 2008) [#2]
Looking at your old code in gtkgadget.bmx, I assume the only difference between PANELPIXMAP_FIT and PANELPIXMAP_FIT2 should be changing the Min()s to Max()s (although I haven't tested this yet):

				Case PANELPIXMAP_FIT2
					Local _w:Float = width / (panelPixmap.width * 1.0)
					Local _h:Float = height / (panelPixmap.height * 1.0)

					Local newWidth:Int = Max(_w, _h) * panelPixmap.width
					Local newHeight:Int = Max(_w, _h) * panelPixmap.height

					pbx = width / 2 - newWidth / 2
					pby = height / 2 - newHeight / 2

					visualpixbuf = gdk_pixbuf_scale_simple(panelPixbuf, newWidth, newHeight, GDK_INTERP_BILINEAR)



Brucey(Posted 2008) [#3]
Okay.

Well, the splash seems to look the same either way, so I guess it's not hurting for now :-)