gi-rsvg-2.0.3: librsvg bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Rsvg.Structs.Length

Description

RsvgLength values are used in handleGetIntrinsicDimensions, for example, to return the CSS length values of the width and height attributes of an <svg> element.

This is equivalent to CSS lengths.

It is up to the calling application to convert lengths in non-pixel units (i.e. those where the unit field is not RSVG_UNIT_PX) into something meaningful to the application. For example, if your application knows the dots-per-inch (DPI) it is using, it can convert lengths with unit in RSVG_UNIT_IN or other physical units.

Synopsis

Exported types

newtype Length Source #

Memory-managed wrapper type.

Constructors

Length (ManagedPtr Length) 

Instances

Instances details
Eq Length Source # 
Instance details

Defined in GI.Rsvg.Structs.Length

Methods

(==) :: Length -> Length -> Bool #

(/=) :: Length -> Length -> Bool #

BoxedPtr Length Source # 
Instance details

Defined in GI.Rsvg.Structs.Length

CallocPtr Length Source # 
Instance details

Defined in GI.Rsvg.Structs.Length

ManagedPtrNewtype Length Source # 
Instance details

Defined in GI.Rsvg.Structs.Length

Methods

toManagedPtr :: Length -> ManagedPtr Length

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

Defined in GI.Rsvg.Structs.Length

Methods

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

newZeroLength :: MonadIO m => m Length Source #

Construct a Length struct initialized to zero.

Methods

Properties

length

numeric part of the length

getLengthLength :: MonadIO m => Length -> m Double Source #

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

get length #length

setLengthLength :: MonadIO m => Length -> Double -> m () Source #

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

set length [ #length := value ]

unit

unit part of the length

getLengthUnit :: MonadIO m => Length -> m Unit Source #

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

get length #unit

setLengthUnit :: MonadIO m => Length -> Unit -> m () Source #

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

set length [ #unit := value ]