SelfOverlap



Specifies how parts of the stroke that intersect itself should be treated during the rendering process. The simplest example of this is with translucent, solid-color strokes - such as StockBrushes.highlighter or StockBrushes.emojiHighlighter.

Summary

Public companion properties

SelfOverlap

Self overlap will be accumulated, meaning that both the overlapped content and the overlapping content will be drawn.

android
SelfOverlap

Any of the options listed below may be used, depending on what would be most efficient and feature-complete for the brush and the device.

android
SelfOverlap

Self overlap will be drawn in a way that discards the overlapping content.

android

Public functions

open String
android

Public companion properties

ACCUMULATE

val ACCUMULATESelfOverlap

Self overlap will be accumulated, meaning that both the overlapped content and the overlapping content will be drawn. For a translucent color stroke, this typically means that the overlapping portion will appear with double the opacity of the non-overlapping portions. This option is most analogous to physical writing and drawing, and it is the option that best matches the appearance as if the stroke were drawn as separate, shorter strokes. This is the default behavior for Android U and above when ANY is used because it leads to the most performant rendering. This cannot be rendered on Android devices before API level U.

ANY

val ANYSelfOverlap

Any of the options listed below may be used, depending on what would be most efficient and feature-complete for the brush and the device.

DISCARD

val DISCARDSelfOverlap

Self overlap will be drawn in a way that discards the overlapping content. This can be used to make the stroke appear as if it's drawn as a PDF page object or annotation, where a stroke can be filled only with a solid color or textures using BrushPaint.TextureMapping.Companion.TILING. This is the default behavior for Android T and below when ANY is used, and can also be used on Android U and above if desired.

Public functions

toString

open fun toString(): String