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 |
Bounding box of an actor. The coordinates of the top left and right bottom corners of an actor. The coordinates of the two points are expressed in pixels with sub-pixel precision
Synopsis
- newtype ActorBox = ActorBox (ManagedPtr ActorBox)
- newZeroActorBox :: MonadIO m => m ActorBox
- actorBoxAlloc :: (HasCallStack, MonadIO m) => m ActorBox
- actorBoxClampToPixel :: (HasCallStack, MonadIO m) => ActorBox -> m ()
- actorBoxContains :: (HasCallStack, MonadIO m) => ActorBox -> Float -> Float -> m Bool
- actorBoxCopy :: (HasCallStack, MonadIO m) => ActorBox -> m ActorBox
- actorBoxEqual :: (HasCallStack, MonadIO m) => ActorBox -> ActorBox -> m Bool
- actorBoxFree :: (HasCallStack, MonadIO m) => ActorBox -> m ()
- actorBoxFromVertices :: (HasCallStack, MonadIO m) => ActorBox -> [Vertex] -> m ()
- actorBoxGetArea :: (HasCallStack, MonadIO m) => ActorBox -> m Float
- actorBoxGetHeight :: (HasCallStack, MonadIO m) => ActorBox -> m Float
- actorBoxGetOrigin :: (HasCallStack, MonadIO m) => ActorBox -> m (Float, Float)
- actorBoxGetSize :: (HasCallStack, MonadIO m) => ActorBox -> m (Float, Float)
- actorBoxGetWidth :: (HasCallStack, MonadIO m) => ActorBox -> m Float
- actorBoxGetX :: (HasCallStack, MonadIO m) => ActorBox -> m Float
- actorBoxGetY :: (HasCallStack, MonadIO m) => ActorBox -> m Float
- actorBoxInit :: (HasCallStack, MonadIO m) => ActorBox -> Float -> Float -> Float -> Float -> m ActorBox
- actorBoxInitRect :: (HasCallStack, MonadIO m) => ActorBox -> Float -> Float -> Float -> Float -> m ()
- actorBoxInterpolate :: (HasCallStack, MonadIO m) => ActorBox -> ActorBox -> Double -> m ActorBox
- actorBoxNew :: (HasCallStack, MonadIO m) => Float -> Float -> Float -> Float -> m ActorBox
- actorBoxSetOrigin :: (HasCallStack, MonadIO m) => ActorBox -> Float -> Float -> m ()
- actorBoxSetSize :: (HasCallStack, MonadIO m) => ActorBox -> Float -> Float -> m ()
- actorBoxUnion :: (HasCallStack, MonadIO m) => ActorBox -> ActorBox -> m ActorBox
- getActorBoxX1 :: MonadIO m => ActorBox -> m Float
- setActorBoxX1 :: MonadIO m => ActorBox -> Float -> m ()
- getActorBoxX2 :: MonadIO m => ActorBox -> m Float
- setActorBoxX2 :: MonadIO m => ActorBox -> Float -> m ()
- getActorBoxY1 :: MonadIO m => ActorBox -> m Float
- setActorBoxY1 :: MonadIO m => ActorBox -> Float -> m ()
- getActorBoxY2 :: MonadIO m => ActorBox -> m Float
- setActorBoxY2 :: MonadIO m => ActorBox -> Float -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq ActorBox Source # | |
GBoxed ActorBox Source # | |
Defined in GI.Clutter.Structs.ActorBox | |
ManagedPtrNewtype ActorBox Source # | |
Defined in GI.Clutter.Structs.ActorBox toManagedPtr :: ActorBox -> ManagedPtr ActorBox # | |
TypedObject ActorBox Source # | |
Defined in GI.Clutter.Structs.ActorBox | |
HasParentTypes ActorBox Source # | |
Defined in GI.Clutter.Structs.ActorBox | |
tag ~ 'AttrSet => Constructible ActorBox tag Source # | |
Defined in GI.Clutter.Structs.ActorBox | |
IsGValue (Maybe ActorBox) Source # | Convert |
Defined in GI.Clutter.Structs.ActorBox | |
type ParentTypes ActorBox Source # | |
Defined in GI.Clutter.Structs.ActorBox |
Methods
Click to display all available methods, including inherited ones
alloc
:: (HasCallStack, MonadIO m) | |
=> m ActorBox | Returns: the newly allocated |
Allocates a new ActorBox
.
Since: 1.12
clampToPixel
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m () |
Clamps the components of box
to the nearest integer
Since: 1.2
contains
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> Float |
|
-> Float |
|
-> m Bool |
Checks whether a point with x
, y
coordinates is contained
withing box
Since: 1.0
copy
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m ActorBox | Returns: a newly allocated copy of |
Copies box
Since: 1.0
equal
Checks boxA
and boxB
for equality
Since: 1.0
free
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m () |
Frees a ActorBox
allocated using actorBoxNew
or actorBoxCopy
Since: 1.0
fromVertices
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> [Vertex] |
|
-> m () |
Calculates the bounding box represented by the four vertices; for details
of the vertex array see actorGetAbsAllocationVertices
.
Since: 1.0
getArea
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m Float | Returns: the area of a |
Retrieves the area of box
Since: 1.0
getHeight
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m Float | Returns: the height of the box |
Retrieves the height of the box
Since: 1.0
getOrigin
Retrieves the origin of box
Since: 1.0
getSize
Retrieves the size of box
Since: 1.0
getWidth
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m Float | Returns: the width of the box |
Retrieves the width of the box
Since: 1.0
getX
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m Float | Returns: the X coordinate of the origin |
Retrieves the X coordinate of the origin of box
Since: 1.0
getY
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> m Float | Returns: the Y coordinate of the origin |
Retrieves the Y coordinate of the origin of box
Since: 1.0
init
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m ActorBox | Returns: the initialized |
Initializes box
with the given coordinates.
Since: 1.10
initRect
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m () |
Initializes box
with the given origin and size.
Since: 1.10
interpolate
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> ActorBox |
|
-> Double |
|
-> m ActorBox |
Interpolates between initial
and final
ActorBox
es
using progress
Since: 1.2
new
:: (HasCallStack, MonadIO m) | |
=> Float |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> m ActorBox | Returns: the newly allocated |
Allocates a new ActorBox
using the passed coordinates
for the top left and bottom right points.
This function is the logical equivalent of:
clutter_actor_box_init (clutter_actor_box_alloc (), x_1, y_1, x_2, y_2);
Since: 1.0
setOrigin
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> Float |
|
-> Float |
|
-> m () |
Changes the origin of box
, maintaining the size of the ActorBox
.
Since: 1.6
setSize
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> Float |
|
-> Float |
|
-> m () |
Sets the size of box
, maintaining the origin of the ActorBox
.
Since: 1.6
union
:: (HasCallStack, MonadIO m) | |
=> ActorBox |
|
-> ActorBox |
|
-> m ActorBox |
Unions the two boxes a
and b
and stores the result in result
.
Since: 1.4
Properties
x1
X coordinate of the top left corner
getActorBoxX1 :: MonadIO m => ActorBox -> m Float Source #
Get the value of the “x1
” field.
When overloading is enabled, this is equivalent to
get
actorBox #x1
setActorBoxX1 :: MonadIO m => ActorBox -> Float -> m () Source #
Set the value of the “x1
” field.
When overloading is enabled, this is equivalent to
set
actorBox [ #x1:=
value ]
x2
X coordinate of the bottom right corner
getActorBoxX2 :: MonadIO m => ActorBox -> m Float Source #
Get the value of the “x2
” field.
When overloading is enabled, this is equivalent to
get
actorBox #x2
setActorBoxX2 :: MonadIO m => ActorBox -> Float -> m () Source #
Set the value of the “x2
” field.
When overloading is enabled, this is equivalent to
set
actorBox [ #x2:=
value ]
y1
Y coordinate of the top left corner
getActorBoxY1 :: MonadIO m => ActorBox -> m Float Source #
Get the value of the “y1
” field.
When overloading is enabled, this is equivalent to
get
actorBox #y1
setActorBoxY1 :: MonadIO m => ActorBox -> Float -> m () Source #
Set the value of the “y1
” field.
When overloading is enabled, this is equivalent to
set
actorBox [ #y1:=
value ]
y2
Y coordinate of the bottom right corner
getActorBoxY2 :: MonadIO m => ActorBox -> m Float Source #
Get the value of the “y2
” field.
When overloading is enabled, this is equivalent to
get
actorBox #y2
setActorBoxY2 :: MonadIO m => ActorBox -> Float -> m () Source #
Set the value of the “y2
” field.
When overloading is enabled, this is equivalent to
set
actorBox [ #y2:=
value ]