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 |
Information about a color stop on a color line.
Color lines typically have offsets ranging between 0 and 1, but that is not required.
Note: despite color
being unpremultiplied here, interpolation in
gradients shall happen in premultiplied space. See the OpenType spec
COLR
section for details.
Since: 7.0.0
Synopsis
- newtype ColorStopT = ColorStopT (ManagedPtr ColorStopT)
- newZeroColorStopT :: MonadIO m => m ColorStopT
- getColorStopTColor :: MonadIO m => ColorStopT -> m Word32
- setColorStopTColor :: MonadIO m => ColorStopT -> Word32 -> m ()
- getColorStopTIsForeground :: MonadIO m => ColorStopT -> m Int32
- setColorStopTIsForeground :: MonadIO m => ColorStopT -> Int32 -> m ()
- getColorStopTOffset :: MonadIO m => ColorStopT -> m Float
- setColorStopTOffset :: MonadIO m => ColorStopT -> Float -> m ()
Exported types
newtype ColorStopT Source #
Memory-managed wrapper type.
ColorStopT (ManagedPtr ColorStopT) |
Instances
newZeroColorStopT :: MonadIO m => m ColorStopT Source #
Construct a ColorStopT
struct initialized to zero.
Methods
Properties
color
the color, unpremultiplied
getColorStopTColor :: MonadIO m => ColorStopT -> m Word32 Source #
Get the value of the “color
” field.
When overloading is enabled, this is equivalent to
get
colorStopT #color
setColorStopTColor :: MonadIO m => ColorStopT -> Word32 -> m () Source #
Set the value of the “color
” field.
When overloading is enabled, this is equivalent to
set
colorStopT [ #color:=
value ]
isForeground
whether the color is the foreground
getColorStopTIsForeground :: MonadIO m => ColorStopT -> m Int32 Source #
Get the value of the “is_foreground
” field.
When overloading is enabled, this is equivalent to
get
colorStopT #isForeground
setColorStopTIsForeground :: MonadIO m => ColorStopT -> Int32 -> m () Source #
Set the value of the “is_foreground
” field.
When overloading is enabled, this is equivalent to
set
colorStopT [ #isForeground:=
value ]
offset
the offset of the color stop
getColorStopTOffset :: MonadIO m => ColorStopT -> m Float Source #
Get the value of the “offset
” field.
When overloading is enabled, this is equivalent to
get
colorStopT #offset
setColorStopTOffset :: MonadIO m => ColorStopT -> Float -> m () Source #
Set the value of the “offset
” field.
When overloading is enabled, this is equivalent to
set
colorStopT [ #offset:=
value ]