示例#1
0
        internal static BitmapEx DrawIcon(WeatherInfo response, string text, LayoutContext layoutContext)
        {
            var symbol = WeatherHelpers.GetWeatherSymbol(response.Symbol);
            var bitmap = layoutContext.CreateBitmap();

            DefaultDrawingAlgs.DrawIconAndText(bitmap, WeatherHelpers.WeatherFontFamily, symbol, layoutContext.Options.Theme.FontFamily, text, "22:22", layoutContext.Options.Theme.ForegroundColor);

            return(bitmap);
        }
示例#2
0
        private static BitmapEx Draw(WeatherInfo weatherInfo, LayoutContext layoutContext)
        {
            var temperature = WeatherHelpers.TempToStr(weatherInfo.TemperatureCelsius ?? 0);
            var symbol      = WeatherHelpers.GetWeatherSymbol(weatherInfo.Symbol);

            var bitmap = layoutContext.CreateBitmap();

            DefaultDrawingAlgs.DrawIconAndText(bitmap, WeatherHelpers.WeatherFontFamily, symbol, layoutContext.Options.Theme.FontFamily, temperature, "+88", layoutContext.Options.Theme.ForegroundColor);

            return(bitmap);
        }