gi-graphene-1.0.1: Graphene bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Graphene.Structs.Quad

Description

A 4 vertex quadrilateral, as represented by four Point.

The contents of a Quad are private and should never be accessed directly.

Since: 1.0

Synopsis

Exported types

newtype Quad Source #

Memory-managed wrapper type.

Constructors

Quad (ManagedPtr Quad) 

Instances

Instances details
Eq Quad Source # 
Instance details

Defined in GI.Graphene.Structs.Quad

Methods

(==) :: Quad -> Quad -> Bool #

(/=) :: Quad -> Quad -> Bool #

BoxedObject Quad Source # 
Instance details

Defined in GI.Graphene.Structs.Quad

Methods

boxedType :: Quad -> IO GType #

IsGValue Quad Source #

Convert Quad to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Graphene.Structs.Quad

tag ~ 'AttrSet => Constructible Quad tag Source # 
Instance details

Defined in GI.Graphene.Structs.Quad

Methods

new :: MonadIO m => (ManagedPtr Quad -> Quad) -> [AttrOp Quad tag] -> m Quad #

newZeroQuad :: MonadIO m => m Quad Source #

Construct a Quad struct initialized to zero.

noQuad :: Maybe Quad Source #

A convenience alias for Nothing :: Maybe Quad.

Methods

Overloaded methods

alloc

quadAlloc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Quad

Returns: the newly created Quad instance

Allocates a new Quad instance.

The contents of the returned instance are undefined.

Since: 1.0

bounds

quadBounds Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: a Quad

-> m Rect 

Computes the bounding rectangle of q and places it into r.

Since: 1.0

contains

quadContains Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: a Quad

-> Point

p: a Point

-> m Bool

Returns: true if the point is inside the Quad

Checks if the given Quad contains the given Point.

Since: 1.0

free

quadFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: a Quad

-> m () 

Frees the resources allocated by quadAlloc

Since: 1.0

getPoint

quadGetPoint Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: a Quad

-> Word32

index_: the index of the point to retrieve

-> m Point

Returns: a Point

Retrieves the point of a Quad at the given index.

Since: 1.0

init

quadInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: the Quad to initialize

-> Point

p1: the first point of the quadrilateral

-> Point

p2: the second point of the quadrilateral

-> Point

p3: the third point of the quadrilateral

-> Point

p4: the fourth point of the quadrilateral

-> m Quad

Returns: the initialized Quad

Initializes a Quad with the given points.

Since: 1.0

initFromPoints

quadInitFromPoints Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: the Quad to initialize

-> [Point]

points: an array of 4 Point

-> m Quad

Returns: the initialized Quad

Initializes a Quad using an array of points.

Since: 1.2

initFromRect

quadInitFromRect Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Quad

q: the Quad to initialize

-> Rect

r: a Rect

-> m Quad

Returns: the initialized Quad

Initializes a Quad using the four corners of the given Rect.

Since: 1.0