gi-gsk-4.0.9: Gsk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gsk.Objects.StrokeNode

Contents

- Exported types
- Methods
  - getChild
  - getPath
  - getStroke
  - new

Description

A render node that will fill the area determined by stroking the the given `Path` using the `Stroke` attributes.

Since: 4.14

Synopsis

- newtype StrokeNode = StrokeNode (ManagedPtr StrokeNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf StrokeNode o) => IsStrokeNode o
- toStrokeNode :: (MonadIO m, IsStrokeNode o) => o -> m StrokeNode
- strokeNodeGetChild :: (HasCallStack, MonadIO m, IsStrokeNode a) => a -> m RenderNode
- strokeNodeGetPath :: (HasCallStack, MonadIO m, IsStrokeNode a) => a -> m Path
- strokeNodeGetStroke :: (HasCallStack, MonadIO m, IsStrokeNode a) => a -> m Stroke
- strokeNodeNew :: (HasCallStack, MonadIO m, IsRenderNode a) => a -> Path -> Stroke -> m StrokeNode

# Exported types

newtype StrokeNode Source #

Memory-managed wrapper type.

Constructors

StrokeNode (ManagedPtr StrokeNode) |

#### Instances

Instances details

Eq StrokeNode Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode Methods (==) :: StrokeNode -> StrokeNode -> Bool Source # (/=) :: StrokeNode -> StrokeNode -> Bool Source #
BoxedPtr StrokeNode Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode Methods boxedPtrCopy :: StrokeNode -> IO StrokeNode Source # boxedPtrFree :: StrokeNode -> IO () Source #
ManagedPtrNewtype StrokeNode Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode Methods toManagedPtr :: StrokeNode -> ManagedPtr StrokeNode Source #
TypedObject StrokeNode Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode Methods glibType :: IO GType Source #
HasParentTypes StrokeNode Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode
type ParentTypes StrokeNode Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode type ParentTypes StrokeNode = '[RenderNode]

class (BoxedPtr o, TypedObject o, IsDescendantOf StrokeNode o) => IsStrokeNode o Source #

Type class for types which can be safely cast to `StrokeNode`, for instance with `toStrokeNode`.

#### Instances

Instances details

(BoxedPtr o, TypedObject o, IsDescendantOf StrokeNode o) => IsStrokeNode o Source # |
Instance details Defined in GI.Gsk.Objects.StrokeNode

toStrokeNode :: (MonadIO m, IsStrokeNode o) => o -> m StrokeNode Source #

Cast to `StrokeNode`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

draw, ref, serialize, unref, writeToFile.

#### Getters

getBounds, getChild, getChildren, getNodeType, getOpaqueRect, getPath, getStroke.

#### Setters

None.

## getChild

strokeNodeGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsStrokeNode a) |
=> a | `node`: a stroke `RenderNode`
-> m RenderNode | Returns: The child that is getting drawn

Gets the child node that is getting drawn by the given `node`.

Since: 4.14

## getPath

strokeNodeGetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsStrokeNode a) |
=> a | `node`: a stroke `RenderNode`
-> m Path | Returns: a `Path`

Retrieves the path that will be stroked with the contents of the `node`.

Since: 4.14

## getStroke

strokeNodeGetStroke Source #

Arguments

:: (HasCallStack, MonadIO m, IsStrokeNode a) |
=> a | `node`: a stroke `RenderNode`
-> m Stroke | Returns: a `Stroke`

Retrieves the stroke attributes used in this `node`.

Since: 4.14

## new

strokeNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a) |
=> a | `child`: The node to stroke the area with
-> Path | `path`: The path describing the area to stroke
-> Stroke | `stroke`: The stroke attributes to use
-> m StrokeNode | Returns: A new `RenderNode`

Creates a `RenderNode` that will fill the outline generated by stroking the given `path` using the attributes defined in `stroke`.

The area is filled with `child`.

GSK aims to follow the SVG semantics for stroking paths. E.g. zero-length contours will get round or square line caps drawn, regardless whether they are closed or not.

Since: 4.14