monomer-1.4.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
(c) 2016 Moritz Kiefer
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Monomer.Graphics.FFI

Description

Provides functions for getting text dimensions and metrics.

Based on code from cocreature's https://github.com/cocreature/nanovg-hs

Synopsis

Documentation

data V4 a Source #

Vector of 4 strict elements.

Constructors

V4 !a !a !a !a 

Instances

Instances details
Eq a => Eq (V4 a) Source # 
Instance details

Defined in Monomer.Graphics.FFI

Methods

(==) :: V4 a -> V4 a -> Bool #

(/=) :: V4 a -> V4 a -> Bool #

Ord a => Ord (V4 a) Source # 
Instance details

Defined in Monomer.Graphics.FFI

Methods

compare :: V4 a -> V4 a -> Ordering #

(<) :: V4 a -> V4 a -> Bool #

(<=) :: V4 a -> V4 a -> Bool #

(>) :: V4 a -> V4 a -> Bool #

(>=) :: V4 a -> V4 a -> Bool #

max :: V4 a -> V4 a -> V4 a #

min :: V4 a -> V4 a -> V4 a #

Read a => Read (V4 a) Source # 
Instance details

Defined in Monomer.Graphics.FFI

Show a => Show (V4 a) Source # 
Instance details

Defined in Monomer.Graphics.FFI

Methods

showsPrec :: Int -> V4 a -> ShowS #

show :: V4 a -> String #

showList :: [V4 a] -> ShowS #

newtype Bounds Source #

Bounds of a block of text.

Constructors

Bounds (V4 CFloat) 

Instances

Instances details
Eq Bounds Source # 
Instance details

Defined in Monomer.Graphics.FFI

Methods

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

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

Ord Bounds Source # 
Instance details

Defined in Monomer.Graphics.FFI

Read Bounds Source # 
Instance details

Defined in Monomer.Graphics.FFI

Show Bounds Source # 
Instance details

Defined in Monomer.Graphics.FFI

Storable Bounds Source # 
Instance details

Defined in Monomer.Graphics.FFI

data GlyphPosition Source #

Position of a glyph in a text string.

Constructors

GlyphPosition 

Fields

peekBounds :: Ptr CFloat -> IO Bounds Source #

Reads Bounds from a pointer.

allocaBounds :: (Ptr CFloat -> IO b) -> IO b Source #

Allocates space for Bounds.

withCString :: Text -> (CString -> IO b) -> IO b Source #

withText :: Text -> (CString -> IO b) -> IO b Source #

withNull :: (Ptr a -> b) -> b Source #

Marshalling helper for a constant nullPtr

newtype FMContext Source #

Constructors

FMContext (Ptr FMContext) 

Instances

Instances details
Storable FMContext Source # 
Instance details

Defined in Monomer.Graphics.FFI