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 Color
describes a RGB color. Color components
are values between 0 and 65535
Synopsis
- newtype Color = Color (ManagedPtr Color)
- newZeroColor :: MonadIO m => m Color
- colorCopy :: (HasCallStack, MonadIO m) => Color -> m Color
- colorFree :: (HasCallStack, MonadIO m) => Color -> m ()
- colorNew :: (HasCallStack, MonadIO m) => m Color
- getColorBlue :: MonadIO m => Color -> m Word16
- setColorBlue :: MonadIO m => Color -> Word16 -> m ()
- getColorGreen :: MonadIO m => Color -> m Word16
- setColorGreen :: MonadIO m => Color -> Word16 -> m ()
- getColorRed :: MonadIO m => Color -> m Word16
- setColorRed :: MonadIO m => Color -> Word16 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Color Source # | |
GBoxed Color Source # | |
Defined in GI.Poppler.Structs.Color | |
ManagedPtrNewtype Color Source # | |
Defined in GI.Poppler.Structs.Color toManagedPtr :: Color -> ManagedPtr Color | |
TypedObject Color Source # | |
Defined in GI.Poppler.Structs.Color | |
HasParentTypes Color Source # | |
Defined in GI.Poppler.Structs.Color | |
tag ~ 'AttrSet => Constructible Color tag Source # | |
IsGValue (Maybe Color) Source # | Convert |
Defined in GI.Poppler.Structs.Color gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Color -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Color) | |
type ParentTypes Color Source # | |
Defined in GI.Poppler.Structs.Color |
Methods
Click to display all available methods, including inherited ones
copy
:: (HasCallStack, MonadIO m) | |
=> Color |
|
-> m Color | Returns: a new allocated copy of |
Creates a copy of color
free
new
:: (HasCallStack, MonadIO m) | |
=> m Color |
Creates a new Color
Properties
blue
the blue component of color
getColorBlue :: MonadIO m => Color -> m Word16 Source #
Get the value of the “blue
” field.
When overloading is enabled, this is equivalent to
get
color #blue
setColorBlue :: MonadIO m => Color -> Word16 -> m () Source #
Set the value of the “blue
” field.
When overloading is enabled, this is equivalent to
set
color [ #blue:=
value ]
green
the green component of color
getColorGreen :: MonadIO m => Color -> m Word16 Source #
Get the value of the “green
” field.
When overloading is enabled, this is equivalent to
get
color #green
setColorGreen :: MonadIO m => Color -> Word16 -> m () Source #
Set the value of the “green
” field.
When overloading is enabled, this is equivalent to
set
color [ #green:=
value ]
red
the red component of color
getColorRed :: MonadIO m => Color -> m Word16 Source #
Get the value of the “red
” field.
When overloading is enabled, this is equivalent to
get
color #red
setColorRed :: MonadIO m => Color -> Word16 -> m () Source #
Set the value of the “red
” field.
When overloading is enabled, this is equivalent to
set
color [ #red:=
value ]