Esempio n. 1
0
        public static void ApplyBackground(this IImageProcessingContext context, string hexColor)
        {
            var color = ColorUtils.TryParse(hexColor, out var x) ? x : Color.FromHex(Constants.DefaultBackgroundColor);

            context.BackgroundColor(color);
        }
 private IImageProcessingContext ApplyBackgroundColor(IImageProcessingContext context, Tuple <int, int, int> bgColour)
 {
     //Get the size required for drawing the file
     return(context.BackgroundColor(new Rgba32(bgColour.Item1, bgColour.Item2, bgColour.Item3)));
 }