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.TextureScaleNode

Contents

- Exported types
- Methods
  - getFilter
  - getTexture
  - new

Description

A render node for a `GdkTexture`, with control over scaling.

Since: 4.10

Synopsis

- newtype TextureScaleNode = TextureScaleNode (ManagedPtr TextureScaleNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf TextureScaleNode o) => IsTextureScaleNode o
- toTextureScaleNode :: (MonadIO m, IsTextureScaleNode o) => o -> m TextureScaleNode
- textureScaleNodeGetFilter :: (HasCallStack, MonadIO m, IsTextureScaleNode a) => a -> m ScalingFilter
- textureScaleNodeGetTexture :: (HasCallStack, MonadIO m, IsTextureScaleNode a) => a -> m Texture
- textureScaleNodeNew :: (HasCallStack, MonadIO m, IsTexture a) => a -> Rect -> ScalingFilter -> m TextureScaleNode

# Exported types

newtype TextureScaleNode Source #

Memory-managed wrapper type.

Constructors

TextureScaleNode (ManagedPtr TextureScaleNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf TextureScaleNode o) => IsTextureScaleNode o Source #

Type class for types which can be safely cast to `TextureScaleNode`, for instance with `toTextureScaleNode`.

#### Instances

Instances details

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

toTextureScaleNode :: (MonadIO m, IsTextureScaleNode o) => o -> m TextureScaleNode Source #

Cast to `TextureScaleNode`, 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, getChildren, getFilter, getNodeType, getOpaqueRect, getTexture.

#### Setters

None.

## getFilter

textureScaleNodeGetFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextureScaleNode a) |
=> a | `node`: a `GskRenderNode` of type `RenderNodeTypeTextureScaleNode`
-> m ScalingFilter | Returns: the `GskScalingFilter`

Retrieves the `GskScalingFilter` used when creating this `GskRenderNode`.

Since: 4.10

## getTexture

textureScaleNodeGetTexture Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextureScaleNode a) |
=> a | `node`: a `GskRenderNode` of type `RenderNodeTypeTextureScaleNode`
-> m Texture | Returns: the `GdkTexture`

Retrieves the `GdkTexture` used when creating this `GskRenderNode`.

Since: 4.10

## new

textureScaleNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) |
=> a | `texture`: the texture to scale
-> Rect | `bounds`: the size of the texture to scale to
-> ScalingFilter | `filter`: how to scale the texture
-> m TextureScaleNode | Returns: A new `GskRenderNode`

Creates a node that scales the texture to the size given by the bounds using the filter and then places it at the bounds' position.

Note that further scaling and other transformations which are applied to the node will apply linear filtering to the resulting texture, as usual.

This node is intended for tight control over scaling applied to a texture, such as in image editors and requires the application to be aware of the whole render tree as further transforms may be applied that conflict with the desired effect of this node.

Since: 4.10