StickyTextItem

data class StickyTextItem(val text: String = "input", val id: String = Uuid.random().toString(), val type: StickyType, val isFocus: Boolean = false, val firstPoint: Offset, val translate: Offset = Offset.Zero, val scaleFactor: Float = 1.0f, val scaleOffset: Offset = Offset.Zero, val property: Property) : Attachable

Represents a sticky text item that can be attached to the canvas. This class contains properties related to the text, including its position, scaling, and properties.

Parameters

text

The text content of the sticky item. Defaults to "input".

id

The unique identifier for the sticky text item, generated using Uuid.

type

The type of the sticky item (e.g., text, image, etc.).

isFocus

A boolean indicating whether the sticky item is currently focused.

firstPoint

The initial position of the sticky text item on the canvas.

translate

The offset used for translating the sticky text item on the canvas.

scaleFactor

The scaling factor for the sticky text item.

scaleOffset

The offset used for scaling the sticky text item.

property

The properties related to the sticky text item (e.g., font, size, color).

Constructors

Link copied to clipboard
constructor(text: String = "input", id: String = Uuid.random().toString(), type: StickyType, isFocus: Boolean = false, firstPoint: Offset, translate: Offset = Offset.Zero, scaleFactor: Float = 1.0f, scaleOffset: Offset = Offset.Zero, property: Property)

Properties

Link copied to clipboard
open override val firstPoint: Offset
Link copied to clipboard
open override val id: String
Link copied to clipboard
open override val isFocus: Boolean = false
Link copied to clipboard
open override val property: Property
Link copied to clipboard
open override val scaleFactor: Float = 1.0f
Link copied to clipboard
open override val scaleOffset: Offset
Link copied to clipboard
Link copied to clipboard
open override val translate: Offset
Link copied to clipboard
open override val type: StickyType

Functions

Link copied to clipboard
open override fun copySelf(id: String, type: StickyType, isFocus: Boolean, firstPoint: Offset, translate: Offset, scaleOffset: Offset, scaleFactor: Float, property: Property): Attachable

Creates and returns a copy of the attachable object with updated properties. This method allows for creating a new instance with specific modifications, while preserving the original attributes.