Class ForecastBitmap


  • public class ForecastBitmap
    extends java.lang.Object
    • Method Detail

      • clearBitmapCache

        public static void clearBitmapCache()
      • getForecastBitmap

        public Bitmap getForecastBitmap()
      • getPixelDisplayRatio

        public static float getPixelDisplayRatio​(Context context)
        Determines the display ratio of the screen based on the screen resolution in pixels. Pixels may have different denities in the x- and y-axis. Therefore use getPhysicalDisplayRatio to determine the real (physical) screen ratio based on the screen size in inches.
        Parameters:
        context - the current context
        Returns:
        the screen ratio, or 0 if the display metrics are not available.
      • getPhysicalDisplayRatio

        public static float getPhysicalDisplayRatio​(Context context)
        Determines the display ratio based on the physical screen size in inches. This may give a different result as calculating the display ratio from pixels, since pixel densities may be different for the x- and the y- axis.
        Parameters:
        context - the current context
        Returns:
        display ratio, or 0 if the display metrics are not available.
      • getDisplayOrientation

        public static int getDisplayOrientation​(Context context)
      • getPrecipitationChartRaw

        public static Bitmap getPrecipitationChartRaw​(Context context,
                                                      Weather.WeatherInfo weatherInfo,
                                                      int width,
                                                      int height,
                                                      int maxValueX,
                                                      int maxValueY)
      • getPrecipitationChart

        public static Bitmap getPrecipitationChart​(Context context,
                                                   Weather.WeatherInfo weatherInfo,
                                                   int width,
                                                   int height,
                                                   boolean isLandscape)
      • getCloudCoverChart

        public static Bitmap getCloudCoverChart​(Context context,
                                                Weather.WeatherInfo weatherInfo,
                                                int width,
                                                int height)
      • GetDefaultLinePaint

        public static Paint GetDefaultLinePaint​(int color,
                                                int lineWidth)
      • getOverviewChart

        public static Bitmap getOverviewChart​(Context context,
                                              int width,
                                              int height,
                                              java.util.ArrayList<Weather.WeatherInfo> weatherInfos,
                                              java.util.ArrayList<WeatherWarning> warnings)