다음을 통해 공유


TextAttribute.SwapColors Property

Definition

Attribute key for swapping foreground and background Paints.

[Android.Runtime.Register("SWAP_COLORS")]
public static Java.Awt.Font.TextAttribute? SwapColors { get; }
[<Android.Runtime.Register("SWAP_COLORS")>]
static member SwapColors : Java.Awt.Font.TextAttribute

Property Value

Attributes

Remarks

Attribute key for swapping foreground and background Paints. Values are instances of <b>Boolean</b>. The default value is false, which means do not swap colors.

The constant value #SWAP_COLORS_ON is defined.

If the #FOREGROUND attribute is set, its Paint will be used as the background, otherwise the Paint currently on the Graphics will be used. If the #BACKGROUND attribute is set, its Paint will be used as the foreground, otherwise the system will find a contrasting color to the (resolved) background so that the text will be visible.

Java documentation for java.awt.font.TextAttribute.SWAP_COLORS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to