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 |
A Rectangle
is used to describe
locations on a page and bounding boxes
Synopsis
- newtype Rectangle = Rectangle (ManagedPtr Rectangle)
- newZeroRectangle :: MonadIO m => m Rectangle
- rectangleCopy :: (HasCallStack, MonadIO m) => Rectangle -> m Rectangle
- rectangleFindGetIgnoredHyphen :: (HasCallStack, MonadIO m) => Rectangle -> m Bool
- rectangleFindGetMatchContinued :: (HasCallStack, MonadIO m) => Rectangle -> m Bool
- rectangleFree :: (HasCallStack, MonadIO m) => Rectangle -> m ()
- rectangleNew :: (HasCallStack, MonadIO m) => m Rectangle
- getRectangleX1 :: MonadIO m => Rectangle -> m Double
- setRectangleX1 :: MonadIO m => Rectangle -> Double -> m ()
- getRectangleX2 :: MonadIO m => Rectangle -> m Double
- setRectangleX2 :: MonadIO m => Rectangle -> Double -> m ()
- getRectangleY1 :: MonadIO m => Rectangle -> m Double
- setRectangleY1 :: MonadIO m => Rectangle -> Double -> m ()
- getRectangleY2 :: MonadIO m => Rectangle -> m Double
- setRectangleY2 :: MonadIO m => Rectangle -> Double -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Rectangle Source # | |
GBoxed Rectangle Source # | |
Defined in GI.Poppler.Structs.Rectangle | |
ManagedPtrNewtype Rectangle Source # | |
Defined in GI.Poppler.Structs.Rectangle toManagedPtr :: Rectangle -> ManagedPtr Rectangle | |
TypedObject Rectangle Source # | |
Defined in GI.Poppler.Structs.Rectangle | |
HasParentTypes Rectangle Source # | |
Defined in GI.Poppler.Structs.Rectangle | |
tag ~ 'AttrSet => Constructible Rectangle tag Source # | |
IsGValue (Maybe Rectangle) Source # | Convert |
Defined in GI.Poppler.Structs.Rectangle gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Rectangle -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Rectangle) | |
type ParentTypes Rectangle Source # | |
Defined in GI.Poppler.Structs.Rectangle |
newZeroRectangle :: MonadIO m => m Rectangle Source #
Construct a Rectangle
struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
copy
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> m Rectangle | Returns: a new allocated copy of |
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 #
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> m Bool | Returns: whether a hyphen was ignored at the end of the line corresponding to |
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 #
:: (HasCallStack, MonadIO m) | |
=> 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
:: (HasCallStack, MonadIO m) | |
=> 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
:: (HasCallStack, MonadIO m) | |
=> m Rectangle | Returns: a new |
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 ]