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 |
A point in 2D space.
Since: 1.12
Synopsis
- newtype Point = Point (ManagedPtr Point)
- newZeroPoint :: MonadIO m => m Point
- pointAlloc :: (HasCallStack, MonadIO m) => m Point
- pointCopy :: (HasCallStack, MonadIO m) => Point -> m Point
- pointDistance :: (HasCallStack, MonadIO m) => Point -> Point -> m (Float, Float, Float)
- pointEquals :: (HasCallStack, MonadIO m) => Point -> Point -> m Bool
- pointFree :: (HasCallStack, MonadIO m) => Point -> m ()
- pointInit :: (HasCallStack, MonadIO m) => Point -> Float -> Float -> m Point
- pointZero :: (HasCallStack, MonadIO m) => m Point
- getPointX :: MonadIO m => Point -> m Float
- setPointX :: MonadIO m => Point -> Float -> m ()
- getPointY :: MonadIO m => Point -> m Float
- setPointY :: MonadIO m => Point -> Float -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Point Source # | |
GBoxed Point Source # | |
Defined in GI.Clutter.Structs.Point | |
ManagedPtrNewtype Point Source # | |
Defined in GI.Clutter.Structs.Point toManagedPtr :: Point -> ManagedPtr Point | |
TypedObject Point Source # | |
Defined in GI.Clutter.Structs.Point | |
HasParentTypes Point Source # | |
Defined in GI.Clutter.Structs.Point | |
tag ~ 'AttrSet => Constructible Point tag Source # | |
IsGValue (Maybe Point) Source # | Convert |
Defined in GI.Clutter.Structs.Point gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Point -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Point) | |
type ParentTypes Point Source # | |
Defined in GI.Clutter.Structs.Point |
Methods
Click to display all available methods, including inherited ones
alloc
:: (HasCallStack, MonadIO m) | |
=> m Point | Returns: the newly allocated |
Allocates a new Point
.
Since: 1.12
copy
:: (HasCallStack, MonadIO m) | |
=> Point |
|
-> m Point | Returns: a newly allocated |
Creates a new Point
with the same coordinates of point
.
Since: 1.12
distance
:: (HasCallStack, MonadIO m) | |
=> Point |
|
-> Point |
|
-> m (Float, Float, Float) | Returns: the distance between the points. |
Computes the distance between two Point
.
Since: 1.12
equals
:: (HasCallStack, MonadIO m) | |
=> Point |
|
-> Point |
|
-> m Bool | Returns: |
Compares two Point
for equality.
Since: 1.12
free
:: (HasCallStack, MonadIO m) | |
=> Point |
|
-> m () |
Frees the resources allocated for point
.
Since: 1.12
init
:: (HasCallStack, MonadIO m) | |
=> Point |
|
-> Float |
|
-> Float |
|
-> m Point | Returns: the initialized |
Initializes point
with the given coordinates.
Since: 1.12
zero
:: (HasCallStack, MonadIO m) | |
=> m Point | Returns: a point centered in (0, 0); the returned |
A point centered at (0, 0).
The returned value can be used as a guard.
Since: 1.12
Properties
x
X coordinate, in pixels
getPointX :: MonadIO m => Point -> m Float Source #
Get the value of the “x
” field.
When overloading is enabled, this is equivalent to
get
point #x
setPointX :: MonadIO m => Point -> Float -> m () Source #
Set the value of the “x
” field.
When overloading is enabled, this is equivalent to
set
point [ #x:=
value ]
y
Y coordinate, in pixels