Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gdk.Structs.Rectangle
Description
Defines the position and size of a rectangle. It is identical to
RectangleInt
.
- newtype Rectangle = Rectangle (ManagedPtr Rectangle)
- newZeroRectangle :: MonadIO m => m Rectangle
- noRectangle :: Maybe Rectangle
- data RectangleEqualMethodInfo
- rectangleEqual :: (HasCallStack, MonadIO m) => Rectangle -> Rectangle -> m Bool
- data RectangleIntersectMethodInfo
- rectangleIntersect :: (HasCallStack, MonadIO m) => Rectangle -> Rectangle -> m (Bool, Rectangle)
- data RectangleUnionMethodInfo
- rectangleUnion :: (HasCallStack, MonadIO m) => Rectangle -> Rectangle -> m Rectangle
- getRectangleHeight :: MonadIO m => Rectangle -> m Int32
- rectangle_height :: AttrLabelProxy "height"
- setRectangleHeight :: MonadIO m => Rectangle -> Int32 -> m ()
- getRectangleWidth :: MonadIO m => Rectangle -> m Int32
- rectangle_width :: AttrLabelProxy "width"
- setRectangleWidth :: MonadIO m => Rectangle -> Int32 -> m ()
- getRectangleX :: MonadIO m => Rectangle -> m Int32
- rectangle_x :: AttrLabelProxy "x"
- setRectangleX :: MonadIO m => Rectangle -> Int32 -> m ()
- getRectangleY :: MonadIO m => Rectangle -> m Int32
- rectangle_y :: AttrLabelProxy "y"
- setRectangleY :: MonadIO m => Rectangle -> Int32 -> m ()
Exported types
Constructors
Rectangle (ManagedPtr Rectangle) |
Instances
BoxedObject Rectangle Source # | |
(~) AttrOpTag tag AttrSet => Constructible Rectangle tag Source # | |
((~) * info (ResolveRectangleMethod t Rectangle), MethodInfo * info Rectangle p) => IsLabel t (Rectangle -> p) Source # | |
((~) * info (ResolveRectangleMethod t Rectangle), MethodInfo * info Rectangle p) => IsLabelProxy t (Rectangle -> p) Source # | |
HasAttributeList * Rectangle Source # | |
((~) * signature (Rectangle -> m Rectangle), MonadIO m) => MethodInfo * RectangleUnionMethodInfo Rectangle signature Source # | |
((~) * signature (Rectangle -> m (Bool, Rectangle)), MonadIO m) => MethodInfo * RectangleIntersectMethodInfo Rectangle signature Source # | |
((~) * signature (Rectangle -> m Bool), MonadIO m) => MethodInfo * RectangleEqualMethodInfo Rectangle signature Source # | |
type AttributeList Rectangle Source # | |
newZeroRectangle :: MonadIO m => m Rectangle Source #
Construct a Rectangle
struct initialized to zero.
Methods
equal
data RectangleEqualMethodInfo Source #
Instances
((~) * signature (Rectangle -> m Bool), MonadIO m) => MethodInfo * RectangleEqualMethodInfo Rectangle signature Source # | |
Arguments
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> Rectangle |
|
-> m Bool | Returns: |
Checks if the two given rectangles are equal.
Since: 3.20
intersect
Arguments
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> Rectangle |
|
-> m (Bool, Rectangle) | Returns: |
Calculates the intersection of two rectangles. It is allowed for
dest
to be the same as either src1
or src2
. If the rectangles
do not intersect, dest
’s width and height is set to 0 and its x
and y values are undefined. If you are only interested in whether
the rectangles intersect, but not in the intersecting area itself,
pass Nothing
for dest
.
union
data RectangleUnionMethodInfo Source #
Instances
((~) * signature (Rectangle -> m Rectangle), MonadIO m) => MethodInfo * RectangleUnionMethodInfo Rectangle signature Source # | |
Arguments
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> Rectangle |
|
-> m Rectangle |
Calculates the union of two rectangles.
The union of rectangles src1
and src2
is the smallest rectangle which
includes both src1
and src2
within it.
It is allowed for dest
to be the same as either src1
or src2
.
Note that this function does not ignore 'empty' rectangles (ie. with zero width or height).
Properties
height
rectangle_height :: AttrLabelProxy "height" Source #
width
rectangle_width :: AttrLabelProxy "width" Source #
x
rectangle_x :: AttrLabelProxy "x" Source #
y
rectangle_y :: AttrLabelProxy "y" Source #