balkon-1.1.0.0: Text layout engine built on top of HarfBuzz.
Safe HaskellSafe
LanguageHaskell2010

Data.Text.ParagraphLayout.Rect

Description

Representation of an axis-aligned rectangle on a 2D plane, with one of its corners being a designated origin point.

Synopsis

Documentation

data Rect a #

An axis-aligned rectangle on a 2D plane.

Constructors

Rect 

Fields

  • x_origin :: a

    X coordinate of the corner designated as the rectangle's origin.

  • y_origin :: a

    Y coordinate of the corner designated as the rectangle's origin.

  • x_size :: a

    Signed difference between the X coordinates of the rectangle's sides.

  • y_size :: a

    Signed difference between the Y coordinates of the rectangle's sides.

Instances

Instances details
Eq a => Eq (Rect a) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rect

Methods

(==) :: Rect a -> Rect a -> Bool

(/=) :: Rect a -> Rect a -> Bool

Read a => Read (Rect a) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rect

Methods

readsPrec :: Int -> ReadS (Rect a)

readList :: ReadS [Rect a]

readPrec :: ReadPrec (Rect a)

readListPrec :: ReadPrec [Rect a]

Show a => Show (Rect a) 
Instance details

Defined in Data.Text.ParagraphLayout.Internal.Rect

Methods

showsPrec :: Int -> Rect a -> ShowS

show :: Rect a -> String

showList :: [Rect a] -> ShowS

height :: Num a => Rect a -> a #

Absolute difference between the Y coordinates of the rectangle's sides.

width :: Num a => Rect a -> a #

Absolute difference between the X coordinates of the rectangle's sides.

x_max :: (Num a, Ord a) => Rect a -> a #

The larger of the two X coordinates of the rectangle's edges.

x_min :: (Num a, Ord a) => Rect a -> a #

The smaller of the two X coordinates of the rectangle's edges.

x_terminus :: Num a => Rect a -> a #

X coordinate of the corner opposite of the origin.

y_max :: (Num a, Ord a) => Rect a -> a #

The larger of the two Y coordinates of the rectangle's edges.

y_min :: (Num a, Ord a) => Rect a -> a #

The smaller of the two Y coordinates of the rectangle's edges.

y_terminus :: Num a => Rect a -> a #

Y coordinate of the corner opposite of the origin.