Path

class Path(pointer: <Error class: unknown class><<Error class: unknown class>>)

A GskPath describes lines and curves that are more complex than simple rectangles.

Paths can used for rendering (filling or stroking) and for animations (e.g. as trajectories).

GskPath is an immutable, opaque, reference-counted struct. After creation, you cannot change the types it represents. Instead, new GskPath objects have to be created. The struct@Gsk.PathBuilder structure is meant to help in this endeavor.

Conceptually, a path consists of zero or more contours (continuous, connected curves), each of which may or may not be closed. Contours are typically constructed from Bézier segments.

A Path

Skipped during bindings generation

  • parameter distance: distance: Out parameter is not supported

  • parameter cr: cairo.Context

Since

4.14

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gskPathPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Calls @func for every operation of the path.

Link copied to clipboard
fun getBounds(bounds: <Error class: unknown class>): Boolean

Computes the bounds of the given path.

Link copied to clipboard

Gets the end point of the path.

Link copied to clipboard

Gets the start point of the path.

Link copied to clipboard
fun getStrokeBounds(stroke: Stroke, bounds: <Error class: unknown class>): Boolean

Computes the bounds for stroking the given path with the parameters in @stroke.

Link copied to clipboard
fun inFill(point: <Error class: unknown class>, fillRule: FillRule): Boolean

Returns whether the given point is inside the area that would be affected if the path was filled according to @fill_rule.

Link copied to clipboard

Returns if the path represents a single closed contour.

Link copied to clipboard

Checks if the path is empty, i.e. contains no lines or curves.

Link copied to clipboard
fun print(string: <Error class: unknown class>)

Converts @self into a human-readable string representation suitable for printing.

Link copied to clipboard
fun ref(): Path

Increases the reference count of a GskPath by one.

Link copied to clipboard
open override fun toString(): String

Converts the path into a string that is suitable for printing.

Link copied to clipboard
fun unref()

Decreases the reference count of a GskPath by one.