gi-gsk-4.0.9: Gsk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gsk.Structs.PathMeasure

Contents

- Exported types
- Methods
  - getLength
  - getPath
  - getTolerance
  - new
  - newWithTolerance
  - ref
  - unref

Description

Performs measurements on paths such as determining the length of the path.

Many measuring operations require sampling the path length at intermediate points. Therefore, a `GskPathMeasure` has a tolerance that determines what precision is required for such approximations.

A `GskPathMeasure` struct is a reference counted struct and should be treated as opaque.

Since: 4.14

Synopsis

- newtype PathMeasure = PathMeasure (ManagedPtr PathMeasure)
- pathMeasureGetLength :: (HasCallStack, MonadIO m) => PathMeasure -> m Float
- pathMeasureGetPath :: (HasCallStack, MonadIO m) => PathMeasure -> m Path
- pathMeasureGetTolerance :: (HasCallStack, MonadIO m) => PathMeasure -> m Float
- pathMeasureNew :: (HasCallStack, MonadIO m) => Path -> m PathMeasure
- pathMeasureNewWithTolerance :: (HasCallStack, MonadIO m) => Path -> Float -> m PathMeasure
- pathMeasureRef :: (HasCallStack, MonadIO m) => PathMeasure -> m PathMeasure
- pathMeasureUnref :: (HasCallStack, MonadIO m) => PathMeasure -> m ()

# Exported types

newtype PathMeasure Source #

Memory-managed wrapper type.

Constructors

PathMeasure (ManagedPtr PathMeasure) |

#### Instances

Instances details

Eq PathMeasure Source # |
Instance details Defined in GI.Gsk.Structs.PathMeasure Methods (==) :: PathMeasure -> PathMeasure -> Bool Source # (/=) :: PathMeasure -> PathMeasure -> Bool Source #
GBoxed PathMeasure Source # |
Instance details Defined in GI.Gsk.Structs.PathMeasure
ManagedPtrNewtype PathMeasure Source # |
Instance details Defined in GI.Gsk.Structs.PathMeasure Methods toManagedPtr :: PathMeasure -> ManagedPtr PathMeasure Source #
TypedObject PathMeasure Source # |
Instance details Defined in GI.Gsk.Structs.PathMeasure Methods glibType :: IO GType Source #
HasParentTypes PathMeasure Source # |
Instance details Defined in GI.Gsk.Structs.PathMeasure
IsGValue (Maybe PathMeasure) Source # | Convert `PathMeasure` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gsk.Structs.PathMeasure Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe PathMeasure -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe PathMeasure) Source #
type ParentTypes PathMeasure Source # |
Instance details Defined in GI.Gsk.Structs.PathMeasure type ParentTypes PathMeasure = '[] :: [Type]

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

ref, unref.

#### Getters

getLength, getPath, getTolerance.

#### Setters

None.

## getLength

pathMeasureGetLength Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PathMeasure | `self`: a path measure
-> m Float | Returns: the length of the path measured by `self`

Gets the length of the path being measured.

The length is cached, so this function does not do any work.

Since: 4.14

## getPath

pathMeasureGetPath Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PathMeasure | `self`: a path measure
-> m Path | Returns: the path of `self`

Returns the path that the measure was created for.

Since: 4.14

## getTolerance

pathMeasureGetTolerance Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PathMeasure | `self`: a path measure
-> m Float | Returns: the tolerance of `self`

Returns the tolerance that the measure was created with.

Since: 4.14

## new

pathMeasureNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Path | `path`: the path to measure
-> m PathMeasure | Returns: a new `GskPathMeasure` representing `path`

Creates a measure object for the given `path` with the default tolerance.

Since: 4.14

## newWithTolerance

pathMeasureNewWithTolerance Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Path | `path`: the path to measure
-> Float | `tolerance`: the tolerance for measuring operations
-> m PathMeasure | Returns: a new `GskPathMeasure` representing `path`

Creates a measure object for the given `path` and `tolerance`.

Since: 4.14

## ref

pathMeasureRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PathMeasure | `self`: a path measure
-> m PathMeasure | Returns: the passed in `GskPathMeasure`.

Increases the reference count of a `GskPathMeasure` by one.

Since: 4.14

## unref

pathMeasureUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> PathMeasure | `self`: a path measure
-> m () |

Decreases the reference count of a `GskPathMeasure` by one.

If the resulting reference count is zero, frees the object.

Since: 4.14