Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Gsk.Structs.PathMeasure
Description
GskPathMeasure
is an object that allows measurements
on GskPath
s 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
Eq PathMeasure Source # | |
Defined in GI.Gsk.Structs.PathMeasure | |
GBoxed PathMeasure Source # | |
Defined in GI.Gsk.Structs.PathMeasure | |
ManagedPtrNewtype PathMeasure Source # | |
Defined in GI.Gsk.Structs.PathMeasure Methods toManagedPtr :: PathMeasure -> ManagedPtr PathMeasure | |
TypedObject PathMeasure Source # | |
Defined in GI.Gsk.Structs.PathMeasure | |
HasParentTypes PathMeasure Source # | |
Defined in GI.Gsk.Structs.PathMeasure | |
IsGValue (Maybe PathMeasure) Source # | Convert |
Defined in GI.Gsk.Structs.PathMeasure Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe PathMeasure -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe PathMeasure) | |
type ParentTypes PathMeasure Source # | |
Defined in GI.Gsk.Structs.PathMeasure |
Methods
Click to display all available methods, including inherited ones
getLength
Arguments
:: (HasCallStack, MonadIO m) | |
=> PathMeasure |
|
-> m Float | Returns: The length of the path measured by |
Gets the length of the path being measured.
The length is cached, so this function does not do any work.
Since: 4.14
getPath
Arguments
:: (HasCallStack, MonadIO m) | |
=> PathMeasure |
|
-> m Path | Returns: the path of |
Returns the path that the measure was created for.
Since: 4.14
getTolerance
pathMeasureGetTolerance Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> PathMeasure |
|
-> m Float | Returns: the tolerance of |
Returns the tolerance that the measure was created with.
Since: 4.14
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Path |
|
-> m PathMeasure | Returns: a new |
Creates a measure object for the given path
with the
default tolerance.
Since: 4.14
newWithTolerance
pathMeasureNewWithTolerance Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Path |
|
-> Float |
|
-> m PathMeasure | Returns: a new |
Creates a measure object for the given path
and tolerance
.
Since: 4.14
ref
Arguments
:: (HasCallStack, MonadIO m) | |
=> PathMeasure |
|
-> m PathMeasure | Returns: the passed in |
Increases the reference count of a GskPathMeasure
by one.
Since: 4.14
unref
Arguments
:: (HasCallStack, MonadIO m) | |
=> PathMeasure |
|
-> m () |
Decreases the reference count of a GskPathMeasure
by one.
If the resulting reference count is zero, frees the object.
Since: 4.14