View Full Version : what are the arguments in canvas.drawtexture?
22nd Oct 2001, 02: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?
22nd Oct 2001, 02: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).
22nd Oct 2001, 03:44 PM
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.