From 8f5f7361f978ea96498a5ddb1c608d26d44abd87 Mon Sep 17 00:00:00 2001 From: Jaro Date: Wed, 12 Apr 2023 17:04:59 +0200 Subject: [PATCH] Fix documentation: document remaining names. --- src/Data/Text/ParagraphLayout/Internal/LineHeight.hs | 1 + src/Data/Text/ParagraphLayout/Internal/Paginable.hs | 1 + src/Data/Text/ParagraphLayout/Internal/Rect.hs | 12 +++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Data/Text/ParagraphLayout/Internal/LineHeight.hs b/src/Data/Text/ParagraphLayout/Internal/LineHeight.hs index 40582a6..a27ad01 100644 --- a/src/Data/Text/ParagraphLayout/Internal/LineHeight.hs +++ b/src/Data/Text/ParagraphLayout/Internal/LineHeight.hs @@ -3,6 +3,7 @@ where import Data.Int (Int32) +-- | Determines the preferred line height of text in the resulting layout. data LineHeight = Normal diff --git a/src/Data/Text/ParagraphLayout/Internal/Paginable.hs b/src/Data/Text/ParagraphLayout/Internal/Paginable.hs index 8ce64d0..44f4cb8 100644 --- a/src/Data/Text/ParagraphLayout/Internal/Paginable.hs +++ b/src/Data/Text/ParagraphLayout/Internal/Paginable.hs @@ -11,6 +11,7 @@ import Data.Text.ParagraphLayout.Internal.LinePagination import Data.Text.ParagraphLayout.Internal.ParagraphLine import Data.Text.ParagraphLayout.Internal.Plain.ParagraphLayout +-- | Defines options for breaking a layout into pages. data PageOptions = PageOptions { pageCurrentHeight :: Int32 diff --git a/src/Data/Text/ParagraphLayout/Internal/Rect.hs b/src/Data/Text/ParagraphLayout/Internal/Rect.hs index c43bb1f..b1a0b59 100644 --- a/src/Data/Text/ParagraphLayout/Internal/Rect.hs +++ b/src/Data/Text/ParagraphLayout/Internal/Rect.hs @@ -14,7 +14,17 @@ module Data.Text.ParagraphLayout.Internal.Rect ) where -data Rect a = Rect { x_origin :: a, y_origin :: a, x_size :: a, y_size :: a } +-- | An axis-aligned rectangle on a 2D plane. +data Rect a = Rect + { 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. + } deriving (Eq, Read, Show) -- | Absolute difference between the X coordinates of the rectangle's sides. -- 2.30.2