gi-pango-1.0.30: Pango bindings

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.Pango.Structs.Rectangle

Contents

- Exported types
- Methods
- Properties
  - height
  - width
  - x
  - y

Description

The `PangoRectangle` structure represents a rectangle.

`PangoRectangle` is frequently used to represent the logical or ink extents of a single glyph or section of text. (See, for instance, `fontGetGlyphExtents`.)

Synopsis

- newtype Rectangle = Rectangle (ManagedPtr Rectangle)
- newZeroRectangle :: MonadIO m => m Rectangle
- getRectangleHeight :: MonadIO m => Rectangle -> m Int32
- setRectangleHeight :: MonadIO m => Rectangle -> Int32 -> m ()
- getRectangleWidth :: MonadIO m => Rectangle -> m Int32
- setRectangleWidth :: MonadIO m => Rectangle -> Int32 -> m ()
- getRectangleX :: MonadIO m => Rectangle -> m Int32
- setRectangleX :: MonadIO m => Rectangle -> Int32 -> m ()
- getRectangleY :: MonadIO m => Rectangle -> m Int32
- setRectangleY :: MonadIO m => Rectangle -> Int32 -> m ()

# Exported types

newtype Rectangle Source #

Memory-managed wrapper type.

Constructors

Rectangle (ManagedPtr Rectangle) |

#### Instances

Instances details

Eq Rectangle Source # |
Instance details Defined in GI.Pango.Structs.Rectangle Methods (==) :: Rectangle -> Rectangle -> Bool Source # (/=) :: Rectangle -> Rectangle -> Bool Source #
BoxedPtr Rectangle Source # |
Instance details Defined in GI.Pango.Structs.Rectangle Methods boxedPtrCopy :: Rectangle -> IO Rectangle Source # boxedPtrFree :: Rectangle -> IO () Source #
CallocPtr Rectangle Source # |
Instance details Defined in GI.Pango.Structs.Rectangle Methods boxedPtrCalloc :: IO (Ptr Rectangle) Source #
ManagedPtrNewtype Rectangle Source # |
Instance details Defined in GI.Pango.Structs.Rectangle Methods toManagedPtr :: Rectangle -> ManagedPtr Rectangle Source #
tag ~ 'AttrSet => Constructible Rectangle tag Source # |
Instance details Defined in GI.Pango.Structs.Rectangle Methods new :: MonadIO m => (ManagedPtr Rectangle -> Rectangle) -> [AttrOp Rectangle tag] -> m Rectangle Source #

newZeroRectangle :: MonadIO m => m Rectangle Source #

Construct a `Rectangle` struct initialized to zero.

# Methods

# Properties

## height

height of the rectangle.

getRectangleHeight :: MonadIO m => Rectangle -> m Int32 Source #

Get the value of the “`height`” field. When overloading is enabled, this is equivalent to

    get rectangle #height

setRectangleHeight :: MonadIO m => Rectangle -> Int32 -> m () Source #

Set the value of the “`height`” field. When overloading is enabled, this is equivalent to

    set rectangle [ #height := value ]

## width

width of the rectangle.

getRectangleWidth :: MonadIO m => Rectangle -> m Int32 Source #

Get the value of the “`width`” field. When overloading is enabled, this is equivalent to

    get rectangle #width

setRectangleWidth :: MonadIO m => Rectangle -> Int32 -> m () Source #

Set the value of the “`width`” field. When overloading is enabled, this is equivalent to

    set rectangle [ #width := value ]

## x

X coordinate of the left side of the rectangle.

getRectangleX :: MonadIO m => Rectangle -> m Int32 Source #

Get the value of the “`x`” field. When overloading is enabled, this is equivalent to

    get rectangle #x

setRectangleX :: MonadIO m => Rectangle -> Int32 -> m () Source #

Set the value of the “`x`” field. When overloading is enabled, this is equivalent to

    set rectangle [ #x := value ]

## y

Y coordinate of the the top side of the rectangle.

getRectangleY :: MonadIO m => Rectangle -> m Int32 Source #

Get the value of the “`y`” field. When overloading is enabled, this is equivalent to

    get rectangle #y

setRectangleY :: MonadIO m => Rectangle -> Int32 -> m () Source #

Set the value of the “`y`” field. When overloading is enabled, this is equivalent to

    set rectangle [ #y := value ]