cameraViewEx / com.priyankvasa.android.cameraviewex / AspectRatio

AspectRatio

class AspectRatio : Comparable<AspectRatio>

Immutable class for describing proportional relationship between width and height.

Constructors

<init>

AspectRatio(parcel: <ERROR CLASS>)

Properties

x

val x: Int

y

val y: Int

Functions

compareTo

fun compareTo(other: AspectRatio): Int

describeContents

fun describeContents(): Int

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

inverse

fun inverse(): AspectRatio

matches

fun matches(size: Size): Boolean

toFloat

fun toFloat(): Float

toString

fun toString(): String

writeToParcel

fun writeToParcel(parcel: <ERROR CLASS>, flags: Int): Unit

Companion Object Properties

CREATOR

val CREATOR: Any

Ratio16x9

val Ratio16x9: AspectRatio

Ratio4x3

val Ratio4x3: AspectRatio

Companion Object Functions

of

fun of(x: Int, y: Int): AspectRatio

Returns an instance of AspectRatio specified by x and y values. The values x and y will be reduced by their greatest common divider.

parse

fun parse(s: String): AspectRatio

Parse an AspectRatio from a String formatted like "4:3".