-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2011 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#include <cmath>
#include "box.h"
#include "primitivebuilder.h"
float u_size = 1;
float v_size = 1;
- if(tex_fit!=STRETCH)
- {
- if((l1<l2)==(tex_fit==CUT))
- u_size = l1/l2;
- else
- v_size = l2/l1;
- }
+ adjust_texture_scale(u_size, v_size, l1, l2);
builder.begin(TRIANGLE_STRIP);
builder.texcoord(0, v_size);