Exemplo n.º 1
0
        public override void Draw(Texture2D texture, Point point)
        {
            XnaTexture2D xnaTexture = texture.GetTexture as XnaTexture2D;
            XnaPoint xnaPoint = new XnaPoint(point.X, point.Y);

            this.spriteBatch.Draw(xnaTexture, xnaPoint.ToVector2());
        }
Exemplo n.º 2
0
        public override void Draw(
            Texture2D texture,
            Rectangle destinationRectangle,
            Rectangle sourceRectangle,
            Color color)
        {
            XnaTexture2D xnaTexture = texture.GetTexture as XnaTexture2D;
            XnaRectangle xnaDestination = new XnaRectangle(
                destinationRectangle.X,
                destinationRectangle.Y,
                destinationRectangle.Width,
                destinationRectangle.Height);
            XnaRectangle xnaSource = new XnaRectangle(
                sourceRectangle.X,
                sourceRectangle.Y,
                sourceRectangle.Width,
                sourceRectangle.Height);
            XnaColor xnaColor = new XnaColor(color.R, color.G, color.B, color.A);

            this.spriteBatch.Draw(xnaTexture, xnaDestination, xnaSource, xnaColor);
        }