RAGENativeUI.Elements.Sprite.DrawTexture C# (CSharp) Method

DrawTexture() private method

private DrawTexture ( Texture texture, Point position, Size size, GraphicsEventArgs canvas ) : void
texture Texture
position Point
size System.Drawing.Size
canvas GraphicsEventArgs
return void
        public static void DrawTexture(Texture texture, Point position, Size size, GraphicsEventArgs canvas)
        {
            var origRes = Game.Resolution;
            float aspectRaidou = origRes.Width / (float)origRes.Height;
            PointF pos = new PointF(position.X / (1080 * aspectRaidou), position.Y / 1080f);
            SizeF siz = new SizeF(size.Width / (1080 * aspectRaidou), size.Height / 1080f);
            canvas.Graphics.DrawTexture(texture, pos.X * Game.Resolution.Width, pos.Y * Game.Resolution.Height, siz.Width * Game.Resolution.Width, siz.Height * Game.Resolution.Height);
        }

Same methods

Sprite::DrawTexture ( Texture texture, Point position, Size size, Rage graphics ) : void