KiteSelectionHandlePainter

Draws one selection boundary marker ("thumb") for KiteDocView.

Called once per edge inside the page's draw pass. x is the boundary's horizontal position; top/bottom are the boundary line's vertical extent, all in page-slot pixels. Size the marker against bottom - top (the line height) so it scales with the text through thumbnails and deep zoom, like KiteSelectionHandleDefaults.CaretAndDot does. A boundary in vertical text, where a line is a column, goes to drawColumnHandle instead.

Drawing does not move the grab target. A thumb is dragged by pressing near the boundary line, not near the shape you paint, so a marker drawn far from its boundary still answers to the boundary. Keep it close to the line and the two agree.

Functions

Link copied to clipboard
open fun DrawScope.drawColumnHandle(edge: KiteSelectionHandleEdge, y: Float, left: Float, right: Float, color: Color)

Draws the marker for a boundary in vertical text, where a line is a column running down the page: y is the boundary's position down the column, and left/right the column's extent, in page-slot pixels. The default turns drawHandle a quarter turn clockwise, so a marker drawn below a line sits to the left of a column.

Link copied to clipboard
abstract fun DrawScope.drawHandle(edge: KiteSelectionHandleEdge, x: Float, top: Float, bottom: Float, color: Color)