Back to Fresco

RoundingParams

docs/javadoc/reference/com/facebook/drawee/generic/RoundingParams.html

3.6.022.2 KB
Original Source

Fresco

|

|

Packages | Classes

Classes

Enums

Packages | Classes

Summary: Nested Classes | Ctors | Methods | Inherited Methods | [Expand All]

public class

RoundingParams

extends Object

| java.lang.Object | | ↳ | com.facebook.drawee.generic.RoundingParams |

Class Overview

Class that encapsulates rounding parameters.

Summary

Nested Classes
enum
Public Constructors
Public Methods
static RoundingParams
Factory method that creates new RoundingParams with RoundAsCircle specified.
boolean
static RoundingParams
Factory method that creates new RoundingParams with the specified corners radii.
static RoundingParams
Factory method that creates new RoundingParams with the specified corners radii.
static RoundingParams
Factory method that creates new RoundingParams with the specified corners radius.
int
Gets the border color
float
Gets the border width
float[]
Gets the rounded corners radii.
int
Gets the overlay color.
float
Gets the padding size
boolean
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
boolean
Gets whether to round as circle
RoundingParams.RoundingMethod
Gets the rounding method.
boolean
Gets whether image should be scaled down inside borders.
int
RoundingParams
Sets the border around the rounded drawable
RoundingParams
Sets the border color
RoundingParams
Sets the border width
RoundingParams
Sets the rounded corners radii.
RoundingParams
Sets the rounded corners radii.
RoundingParams
Sets the rounded corners radius.
RoundingParams
Sets the overlay color and changes the method to RoundingMethod.COLOR_OVERLAY.
RoundingParams
Sets the padding on rounded drawable.
RoundingParams
Sets FILTER_BITMAP_FLAG flag to Paint.
RoundingParams
Sets whether to round as circle.
RoundingParams
Sets the rounding method.
RoundingParams
Sets whether image should be scaled down inside borders.

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Constructors

public RoundingParams()

Public Methods

public static RoundingParams asCircle()

Factory method that creates new RoundingParams with RoundAsCircle specified.

public boolean equals(Object o)

public static RoundingParams fromCornersRadii(float topLeft, float topRight, float bottomRight, float bottomLeft)

Factory method that creates new RoundingParams with the specified corners radii.

public static RoundingParams fromCornersRadii(float[] radii)

Factory method that creates new RoundingParams with the specified corners radii.

public static RoundingParams fromCornersRadius(float radius)

Factory method that creates new RoundingParams with the specified corners radius.

public int getBorderColor()

Gets the border color

public float getBorderWidth()

Gets the border width

public float[] getCornersRadii()

Gets the rounded corners radii.

For performance reasons the internal array is returned directly. Do not modify it directly, but use one of the exposed corner radii setters instead.

public int getOverlayColor()

Gets the overlay color.

public float getPadding()

Gets the padding size

public boolean getPaintFilterBitmap()

Gets whether to set FILTER_BITMAP_FLAG flag to Paint.

public boolean getRoundAsCircle()

Gets whether to round as circle

public RoundingParams.RoundingMethod getRoundingMethod()

Gets the rounding method.

public boolean getScaleDownInsideBorders()

Gets whether image should be scaled down inside borders.

public int hashCode()

public RoundingParams setBorder(int color, float width)

Sets the border around the rounded drawable

Parameters

| color | of the border | | width | of the width |

public RoundingParams setBorderColor(int color)

Sets the border color

Parameters

| color | of the border |

public RoundingParams setBorderWidth(float width)

Sets the border width

Parameters

| width | of the width |

public RoundingParams setCornersRadii(float topLeft, float topRight, float bottomRight, float bottomLeft)

Sets the rounded corners radii.

Parameters

| topLeft | top-left corner radius in pixels | | topRight | top-right corner radius in pixels | | bottomRight | bottom-right corner radius in pixels | | bottomLeft | bottom-left corner radius in pixels |

Returns
  • modified instance

public RoundingParams setCornersRadii(float[] radii)

Sets the rounded corners radii.

Parameters

| radii | float array of 8 radii in pixels. Each corner receives two radius values [X, Y]. The corners are ordered top-left, top-right, bottom-right, bottom-left. |

Returns
  • modified instance

public RoundingParams setCornersRadius(float radius)

Sets the rounded corners radius.

Parameters

| radius | corner radius in pixels |

Returns
  • modified instance

public RoundingParams setOverlayColor(int overlayColor)

Sets the overlay color and changes the method to RoundingMethod.COLOR_OVERLAY.

Parameters

| overlayColor | overlay color |

public RoundingParams setPadding(float padding)

Sets the padding on rounded drawable. Works only with RoundingMethod.BITMAP_ONLY

Parameters

| padding | the padding in pixels |

public RoundingParams setPaintFilterBitmap(boolean paintFilterBitmap)

Sets FILTER_BITMAP_FLAG flag to Paint. FILTER_BITMAP_FLAG

This should generally be on when drawing bitmaps, unless performance-bound (rendering to software canvas) or preferring pixelation artifacts to blurriness when scaling significantly.

Parameters

| paintFilterBitmap | whether to set FILTER_BITMAP_FLAG flag to Paint. |

Returns
  • modified instance

public RoundingParams setRoundAsCircle(boolean roundAsCircle)

Sets whether to round as circle.

Parameters

| roundAsCircle | whether or not to round as circle |

Returns
  • modified instance

public RoundingParams setRoundingMethod(RoundingParams.RoundingMethod roundingMethod)

Sets the rounding method.

Parameters

| roundingMethod | method of rounding |

Returns
  • modified instance

public RoundingParams setScaleDownInsideBorders(boolean scaleDownInsideBorders)

Sets whether image should be scaled down inside borders.

Parameters

| scaleDownInsideBorders | whether image should be scaled down inside borders or borders will be drawn over image |

Returns
  • modified instance

+Generated by Doclava. +