Class ForecastBitmap


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

      • getForecastBarHeight

        public float getForecastBarHeight()
      • getForecastBarHeight

        public static float getForecastBarHeight​(DisplayMetrics displayMetrics)
      • 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.
      • getScreenWidthInPixels

        public static int getScreenWidthInPixels​(Context context)
      • 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)
      • getPrecipitationChart2

        public static Bitmap getPrecipitationChart2​(Context context,
                                                    Weather.WeatherInfo weatherInfo)
      • getCloudCoverChart

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

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

        public static Paint GetDefaultWindPaint​(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)
      • getWindScaleString

        public static java.lang.String getWindScaleString​(Context context)
      • getHorizontalBar

        public static Bitmap getHorizontalBar​(Context context,
                                              int width,
                                              int height,
                                              int value,
                                              int max,
                                              int color,
                                              int border)
      • getPollenLegendBox

        public static Bitmap getPollenLegendBox​(Context context,
                                                int size,
                                                int pollenType)
      • getPollenAreasBitmap

        public static Bitmap getPollenAreasBitmap​(Context context,
                                                  int pollenType,
                                                  int timeParam)
      • getColoredBox

        public static Drawable getColoredBox​(Context context,
                                             int color)
      • fadeOutAnimation

        public static void fadeOutAnimation​(ImageView imageView,
                                            long duration)
      • fadeInAnimation

        public static void fadeInAnimation​(ImageView imageView,
                                           long duration)