BaseBeautyStore

abstract class BaseBeautyStore

Basic beauty related interfaces, managing the adjustment and state synchronization of smooth, whiteness, ruddy and other basic beauty effects.

Overview

BaseBeautyStore BaseBeautyStore manages the adjustment and state synchronization of smooth, whiteness, ruddy and other basic beauty effects. Basic beauty functionality achieves real-time beauty effect adjustment through easy-to-use APIs. BaseBeautyStore provides a complete set of interfaces to manage beauty effect settings and state subscriptions.

Main Features

  • Smooth Effect: Supports 0-9 level smooth effect adjustment

  • Whiteness Effect: Supports 0-9 level whiteness effect adjustment

  • Ruddy Effect: Supports 0-9 level ruddy effect adjustment

  • State Subscription: Real-time subscription to beauty state changes, synchronizing UI display with actual effects

Note: Beauty state updates are delivered through the baseBeautyState publisher. Subscribe to it to receive real-time updates about beauty effect levels.

Beauty Effect Description

EffectMethodValue RangeDescription
SmoothsetSmoothLevel0-90 means off, 9 means most obvious effect
WhitenesssetWhitenessLevel0-90 means off, 9 means most obvious effect
RuddysetRuddyLevel0-90 means off, 9 means most obvious effect

Usage Example

// Get singleton instance
val store = BaseBeautyStore.shared()

// Subscribe to state changes
lifecycleScope.launch {
store.baseBeautyState.smoothLevel.collect { level ->
println("Smooth level: $level")
}
}

// Set beauty effects
store.setSmoothLevel(5f)
store.setWhitenessLevel(3f)
store.setRuddyLevel(2f)

// Reset all beauty effects
store.reset()

Topics

Getting Instance

Observing State

Beauty Adjustment

See Also

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Singleton object

Properties

Link copied to clipboard

Beauty state subscription, including smooth, whiteness, ruddy and other beauty effect levels. By subscribing to this state, you can get real-time updates of beauty data. {@link $BaseBeautyState$}

Functions

Link copied to clipboard
abstract fun reset()

Reset all beauty parameters (smooth, whiteness, ruddy) to default off state (value 0).

Link copied to clipboard
abstract fun setRuddyLevel(ruddyLevel: Float)

Set ruddy level

Link copied to clipboard
abstract fun setSmoothLevel(smoothLevel: Float)

Set smooth level

Link copied to clipboard
abstract fun setWhitenessLevel(whitenessLevel: Float)

Set whiteness level