MarkerCorneredShape

open class MarkerCorneredShape(val topLeft: Corner, val topRight: Corner, val bottomRight: Corner, val bottomLeft: Corner, val tickSizeDp: Float = MARKER_TICK_SIZE) : CorneredShape

MarkerCorneredShape is an extension of CorneredShape that supports drawing a triangular tick at a given point.

Parameters

topLeft

specifies a Corner for the top left of the Shape.

topRight

specifies a Corner for the top right of the Shape.

bottomLeft

specifies a Corner for the bottom left of the Shape.

bottomRight

specifies a Corner for the bottom right of the Shape.

tickSizeDp

the size of the tick (in dp).

Constructors

Link copied to clipboard
constructor(all: Corner, tickSizeDp: Float = MARKER_TICK_SIZE)
constructor(corneredShape: CorneredShape, tickSizeDp: Float = MARKER_TICK_SIZE)
constructor(topLeft: Corner, topRight: Corner, bottomRight: Corner, bottomLeft: Corner, tickSizeDp: Float = MARKER_TICK_SIZE)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Specifies the position of a MarkerCorneredShape’s tick.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun createPath(density: Float, path: Path, left: Float, top: Float, right: Float, bottom: Float)

Adds a contour of this CorneredShape to the provided Path.

Link copied to clipboard
open override fun drawShape(context: DrawContext, paint: Paint, path: Path, left: Float, top: Float, right: Float, bottom: Float)

Draws the Shape on the canvas.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getCornerScale(width: Float, height: Float, density: Float): Float

Returns a scale factor for the corner size, which will prevent graphical glitches in case the size of the corners is larger than the shape’s dimensions.

Link copied to clipboard
open override fun hashCode(): Int