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.GlyphGeometry

Contents

- Exported types
- Methods
- Properties
  - width
  - xOffset
  - yOffset

Description

The `PangoGlyphGeometry` structure contains width and positioning information for a single glyph.

Note that `width` is not guaranteed to be the same as the glyph extents. Kerning and other positioning applied during shaping will affect both the `width` and the `xOffset` for the glyphs in the glyph string that results from shaping.

The information in this struct is intended for rendering the glyphs, as follows:

1. Assume the current point is (x, y)
2. Render the current glyph at (x + x_offset, y + y_offset),
3. Advance the current point to (x + width, y)
4. Render the next glyph

Synopsis

- newtype GlyphGeometry = GlyphGeometry (ManagedPtr GlyphGeometry)
- newZeroGlyphGeometry :: MonadIO m => m GlyphGeometry
- getGlyphGeometryWidth :: MonadIO m => GlyphGeometry -> m Int32
- setGlyphGeometryWidth :: MonadIO m => GlyphGeometry -> Int32 -> m ()
- getGlyphGeometryXOffset :: MonadIO m => GlyphGeometry -> m Int32
- setGlyphGeometryXOffset :: MonadIO m => GlyphGeometry -> Int32 -> m ()
- getGlyphGeometryYOffset :: MonadIO m => GlyphGeometry -> m Int32
- setGlyphGeometryYOffset :: MonadIO m => GlyphGeometry -> Int32 -> m ()

# Exported types

newtype GlyphGeometry Source #

Memory-managed wrapper type.

Constructors

GlyphGeometry (ManagedPtr GlyphGeometry) |

#### Instances

Instances details

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

newZeroGlyphGeometry :: MonadIO m => m GlyphGeometry Source #

Construct a `GlyphGeometry` struct initialized to zero.

# Methods

# Properties

## width

the logical width to use for the the character.

getGlyphGeometryWidth :: MonadIO m => GlyphGeometry -> m Int32 Source #

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

    get glyphGeometry #width

setGlyphGeometryWidth :: MonadIO m => GlyphGeometry -> Int32 -> m () Source #

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

    set glyphGeometry [ #width := value ]

## xOffset

horizontal offset from nominal character position.

getGlyphGeometryXOffset :: MonadIO m => GlyphGeometry -> m Int32 Source #

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

    get glyphGeometry #xOffset

setGlyphGeometryXOffset :: MonadIO m => GlyphGeometry -> Int32 -> m () Source #

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

    set glyphGeometry [ #xOffset := value ]

## yOffset

vertical offset from nominal character position.

getGlyphGeometryYOffset :: MonadIO m => GlyphGeometry -> m Int32 Source #

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

    get glyphGeometry #yOffset

setGlyphGeometryYOffset :: MonadIO m => GlyphGeometry -> Int32 -> m () Source #

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

    set glyphGeometry [ #yOffset := value ]