View Full Version : what are the arguments in canvas.drawtexture?
ZitherMan
22nd Oct 2001, 01:20 PM
Ok, i know the actual arguments but i couldnt understand what they do :o
native(466) final function DrawTile( texture Tex, float XL, float YL, float U, float V, float UL, float VL );
texture Tex is pretty obvious. But the rest?
ca
22nd Oct 2001, 01:37 PM
XL & YL are the width and height to draw the texture (stretching as necessary). U & V are the top-left coordinates of the texture to start drawing, and UL & VL are the bottom-right coordinates. That way you can draw only a portion of a texture, stretch/scale it, or draw the whole texture and stretch it, or not stretch it...etc etc. :)
DrawIcon() will draw the full texture for you, and you can just specifiy a scale. There really isn't a reason to use DrawTexture() unless you want to draw just a section of a texture (like UWindow's LookAndFeel classes do).
ZitherMan
22nd Oct 2001, 02:44 PM
Thank you!
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.