예제 #1
0
        public override void DoCommand(IImageRender imageRender)
        {
            var imagePath = Path.Combine(_directory, _args["@main_argument"]);
            var image     = Image.FromFile(imagePath);
            var x         = int.Parse(_args["x"]);
            var y         = int.Parse(_args["y"]);
            var w         = int.Parse(_args["w"]);
            var h         = int.Parse(_args["h"]);

            imageRender.DrawImageScaled(image, x, y, w, h);
        }
예제 #2
0
        public override void DoCommand(IImageRender imageRender)
        {
            var cache      = _serviceProvider.GetService <ICacheableUser>();
            var userAvatar = cache.GetUserAvatar(_userId, true);
            var x          = int.Parse(_args["x"]);
            var y          = int.Parse(_args["y"]);
            var w          = int.Parse(_args["w"]);
            var h          = int.Parse(_args["h"]);

            imageRender.DrawImageScaled(userAvatar, x, y, w, h);
        }