Class ForecastBitmap
java.lang.Object
de.kaffeemitkoffein.tinyweatherforecastgermany.ForecastBitmap
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic BitmapCreatePrecipitationAtPinPointBitmap(Context context, int[] values, View imageContainterView) static voidfadeInAnimation(ImageView imageView, long duration) static voidfadeOutAnimation(ImageView imageView, long duration) static BitmapgetCloudCoverChart(Context context, Weather.WeatherInfo weatherInfo, int width, int height) static DrawablegetColoredBox(Context context, int color) static PaintGetDefaultLinePaint(int color, int lineWidth) static PaintGetDefaultWindPaint(int color, int lineWidth) static intgetDisplayOrientation(Context context) floatstatic floatgetForecastBarHeight(DisplayMetrics displayMetrics) Bitmapstatic BitmapgetHorizontalBar(Context context, int width, int height, int value, int max, int color, int border) static BitmapgetOverviewChart(Context context, int width, int height, ArrayList<Weather.WeatherInfo> weatherInfos, ArrayList<WeatherWarning> warnings) static floatgetPhysicalDisplayRatio(Context context) Determines the display ratio based on the physical screen size in inches.static floatgetPixelDisplayRatio(Context context) Determines the display ratio of the screen based on the screen resolution in pixels.static BitmapgetPollenAreasBitmap(Context context, int pollenType, int timeParam) static BitmapgetPollenLegendBox(Context context, int size, int pollenType) static BitmapgetPrecipitationChart(Context context, Weather.WeatherInfo weatherInfo, int width, int height, boolean isLandscape) static BitmapgetPrecipitationChart2(Context context, Weather.WeatherInfo weatherInfo) static BitmapgetPrecipitationChartRaw(Context context, Weather.WeatherInfo weatherInfo, int width, int height, int maxValueX, int maxValueY) static intgetScreenWidthInPixels(Context context) static StringgetWindScaleString(Context context)
-
Field Details
-
PRECIPITATION_BITMAP_AR
public static final int PRECIPITATION_BITMAP_AR- See Also:
-
-
Method Details
-
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
-
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, ArrayList<Weather.WeatherInfo> weatherInfos, ArrayList<WeatherWarning> warnings) -
getWindScaleString
-
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) -
CreatePrecipitationAtPinPointBitmap
public static Bitmap CreatePrecipitationAtPinPointBitmap(Context context, int[] values, View imageContainterView)
-