gi-poppler-0.18.29: Poppler bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Poppler.Structs.Rectangle

Description

A Rectangle is used to describe locations on a page and bounding boxes

Synopsis

Exported types

newtype Rectangle Source #

Memory-managed wrapper type.

Constructors

Rectangle (ManagedPtr Rectangle) 

Instances

Instances details
Eq Rectangle Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

GBoxed Rectangle Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

ManagedPtrNewtype Rectangle Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

Methods

toManagedPtr :: Rectangle -> ManagedPtr Rectangle

TypedObject Rectangle Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

Methods

glibType :: IO GType

HasParentTypes Rectangle Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

tag ~ 'AttrSet => Constructible Rectangle tag Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

Methods

new :: MonadIO m => (ManagedPtr Rectangle -> Rectangle) -> [AttrOp Rectangle tag] -> m Rectangle

IsGValue (Maybe Rectangle) Source #

Convert Rectangle to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Poppler.Structs.Rectangle

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Rectangle -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Rectangle)

type ParentTypes Rectangle Source # 
Instance details

Defined in GI.Poppler.Structs.Rectangle

type ParentTypes Rectangle = '[] :: [Type]

newZeroRectangle :: MonadIO m => m Rectangle Source #

Construct a Rectangle struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

copy, findGetIgnoredHyphen, findGetMatchContinued, free.

Getters

None.

Setters

None.

copy

rectangleCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

rectangle: a Rectangle to copy

-> m Rectangle

Returns: a new allocated copy of rectangle

Creates a copy of rectangle.

Note that you must only use this function on an allocated PopplerRectangle, as returned by rectangleNew, rectangleCopy, or the list elements returned from pageFindText or pageFindTextWithOptions.

findGetIgnoredHyphen

rectangleFindGetIgnoredHyphen Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

rectangle: a Rectangle

-> m Bool

Returns: whether a hyphen was ignored at the end of the line corresponding to rectangle.

When using pageFindTextWithOptions with the FindFlagsMultiline flag, a match may span more than one line, and may have been formed by ignoring a hyphen at the end of the line. When this happens at the end of the line corresponding to rectangle, this function returns True (and then rectangleFindGetMatchContinued will also return True); otherwise it returns False.

Note that you must only call this function on a Rectangle returned in the list from pageFindText or pageFindTextWithOptions.

Since: 21.05.0

findGetMatchContinued

rectangleFindGetMatchContinued Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

rectangle: a Rectangle

-> m Bool

Returns: whether there are more rectangles belonging to the same match

When using pageFindTextWithOptions with the FindFlagsMultiline flag, a match may span more than one line and thus consist of more than one rectangle. Every rectangle belonging to the same match will return True from this function, except for the last rectangle, where this function will return False.

Note that you must only call this function on a Rectangle returned in the list from pageFindText or pageFindTextWithOptions.

Since: 21.05.0

free

rectangleFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

rectangle: a Rectangle

-> m () 

Frees the given Rectangle.

Note that you must only use this function on an allocated PopplerRectangle, as returned by rectangleNew, rectangleCopy, or the list elements returned from pageFindText or pageFindTextWithOptions.

new

rectangleNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Rectangle

Returns: a new Rectangle, use rectangleFree to free it

Creates a new Rectangle

Properties

x1

x coordinate of lower left corner

getRectangleX1 :: MonadIO m => Rectangle -> m Double Source #

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

get rectangle #x1

setRectangleX1 :: MonadIO m => Rectangle -> Double -> m () Source #

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

set rectangle [ #x1 := value ]

x2

x coordinate of upper right corner

getRectangleX2 :: MonadIO m => Rectangle -> m Double Source #

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

get rectangle #x2

setRectangleX2 :: MonadIO m => Rectangle -> Double -> m () Source #

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

set rectangle [ #x2 := value ]

y1

y coordinate of lower left corner

getRectangleY1 :: MonadIO m => Rectangle -> m Double Source #

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

get rectangle #y1

setRectangleY1 :: MonadIO m => Rectangle -> Double -> m () Source #

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

set rectangle [ #y1 := value ]

y2

y coordinate of upper right corner

getRectangleY2 :: MonadIO m => Rectangle -> m Double Source #

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

get rectangle #y2

setRectangleY2 :: MonadIO m => Rectangle -> Double -> m () Source #

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

set rectangle [ #y2 := value ]