Ejemplo n.º 1
0
        public static void DrawImage(this IGsGraphics graphics, ImageParams data, GsColor color, GsRectangle source)
        {
            var size = data.ImageSize.ToVector() * data.Scale;
            var dest = new GsRectangle(data.Position, size.ToSize());

            graphics.DrawImage(data.Image, dest, source, data.Origin, 0f, GsImageFlip.None, color);
        }
Ejemplo n.º 2
0
        public static void DrawImage(this IGsGraphics graphics, ImageParams data, GsColor color, GsVector offset, float rotation, GsImageFlip flip)
        {
            var size = data.ImageSize.ToVector() * data.Scale;
            var dest = new GsRectangle(data.Position + offset, size.ToSize());

            graphics.DrawImage(data.Image, dest, null, data.Origin, rotation, flip, color);
        }
Ejemplo n.º 3
0
        public static void DrawImage(this IGsGraphics graphics, GsImage image, GsColor color, GsVector location, GsVector scale)
        {
            var size = ImageProvider.GetSize(image).ToVector() * scale;

            graphics.DrawImage(image, location.X, location.Y, size.X, size.Y, color);
        }