CurlPage

class CurlPage

Storage class for page textures and blend colors. This class is based on https://github.com/harism/android-pagecurl

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Indicates whether back side texture exists and if it differs from front facing one.

Link copied to clipboard

Indicates whether textures have changed since last time they were recycled.

Functions

Link copied to clipboard
fun getColor(side: Int): Int

Gets color for provided page side value.

Link copied to clipboard
fun getTexture(textureRect: RectF, side: Int): Bitmap?

Getter for textures. Creates Bitmap sized to nearest power of two, copies original Bitmap into it and returns it. RectF given as parameter is filled with actual texture coordinates in this new unscaled texture Bitmap.

Link copied to clipboard
fun recycle()

Recycles and frees underlying Bitmaps.

Link copied to clipboard
fun reset()

Resets this CurlPage into its initial state.

Link copied to clipboard
fun setColor(color: Int, side: Int)

Sets blend color for page sides.

Link copied to clipboard
fun setTexture(texture: Bitmap?, side: Int)

Sets textures for page sides.