copy
Source set: Common
fun copy(
color: Color = this.color,
fontSize: TextUnit = this.fontSize,
fontWeight: FontWeight? = this.fontWeight,
fontStyle: FontStyle? = this.fontStyle,
fontSynthesis: FontSynthesis? = this.fontSynthesis,
fontFamily: FontFamily? = this.fontFamily,
fontFeatureSettings: String? = this.fontFeatureSettings,
letterSpacing: TextUnit = this.letterSpacing,
baselineShift: BaselineShift? = this.baselineShift,
textGeometricTransform: TextGeometricTransform? = this.textGeometricTransform,
localeList: LocaleList? = this.localeList,
background: Color = this.background,
textDecoration: TextDecoration? = this.textDecoration,
shadow: Shadow? = this.shadow,
platformStyle: PlatformSpanStyle? = this.platformStyle,
drawStyle: DrawStyle? = this.drawStyle,
): LegacySpanStyle
Returns a copy of this LegacySpanStyle with optionally overridden fields, preserving the existing textForegroundStyle (including a Brush) when color equals this.color.
copy
Source set: Common
fun copy(
brush: Brush?,
alpha: Float = this.alpha,
fontSize: TextUnit = this.fontSize,
fontWeight: FontWeight? = this.fontWeight,
fontStyle: FontStyle? = this.fontStyle,
fontSynthesis: FontSynthesis? = this.fontSynthesis,
fontFamily: FontFamily? = this.fontFamily,
fontFeatureSettings: String? = this.fontFeatureSettings,
letterSpacing: TextUnit = this.letterSpacing,
baselineShift: BaselineShift? = this.baselineShift,
textGeometricTransform: TextGeometricTransform? = this.textGeometricTransform,
localeList: LocaleList? = this.localeList,
background: Color = this.background,
textDecoration: TextDecoration? = this.textDecoration,
shadow: Shadow? = this.shadow,
platformStyle: PlatformSpanStyle? = this.platformStyle,
drawStyle: DrawStyle? = this.drawStyle,
): LegacySpanStyle
Returns a copy of this LegacySpanStyle with the foreground replaced by brush and alpha.