RelativeCornerSize

public final class RelativeCornerSize implements CornerSize


A CornerSize that takes a percent and computes the size used based on the length of the shortest edge adjacent to the corner.

Summary

Public constructors

RelativeCornerSize(float percent)

Public methods

boolean
float
getCornerSize(RectF bounds)

Returns the corner size that should be used given the full bounds of the shape.

float

Returns the relative percent used for this CornerSize in range [0,1].

int
String

Public constructors

RelativeCornerSize

public RelativeCornerSize(float percent)
Parameters
float percent

The relative size of the corner in range [0,1] where 0 is no size and 1 is the largest possible corner size.

Public methods

equals

public boolean equals(Object o)

getCornerSize

public float getCornerSize(RectF bounds)

Returns the corner size that should be used given the full bounds of the shape.

getRelativePercent

public float getRelativePercent()

Returns the relative percent used for this CornerSize in range [0,1].

hashCode

public int hashCode()

toString

public String toString()