About my projects, examples and tutorials
NO_TITLE

NO_TITLE

Gnome::Graphene::N-Size§

Description§

A size.

Record N-Size§

class N-Size:auth<github:MARTIMM>:api<2> is export is repr('CStruct') {

  has gfloat $.width;
  has gfloat $.height;
}
Code
  • width; the width
  • height; the height

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

alloc§

Allocates a new #graphene_size_t.

The contents of the returned value are undefined.

method alloc ( --> Gnome::Graphene::Size \)
Code

Methods§

equal This function is not yet available§

Checks whether the two give #graphene_size_t are equal.

method equal ( CArray[N-Size] $b )
Code
  • $b; a #graphene_size_t.

free§

Frees the resources allocated by .alloc().

method free ( )
Code

init§

Initializes a #graphene_size_t using the given $width and $height.

method init ( Num() $width, Num() $height --> CArray[N-Size] )
Code
  • $width; the width.
  • $height; the height.

Return value; the initialized #graphene_size_t.

init-from-size§

Initializes a #graphene_size_t using the width and height of the given $src.

method init-from-size ( CArray[N-Size] $src --> CArray[N-Size] )
Code
  • $src; a #graphene_size_t.

Return value; the initialized #graphene_size_t.

interpolate§

Linearly interpolates the two given #graphene_size_t using the given interpolation $factor.

method interpolate ( CArray[N-Size] $b, Num() $factor, CArray[N-Size] $res )
Code
  • $b; a #graphene_size_t.
  • $factor; the linear interpolation factor.
  • $res; return location for the interpolated size.

scale§

Scales the components of a #graphene_size_t using the given $factor.

method scale ( Num() $factor, CArray[N-Size] $res )
Code
  • $factor; the scaling factor.
  • $res; return location for the scaled size.

Functions§

zero§

A constant pointer to a zero #graphene_size_t, useful for equality checks and interpolations.

method zero (--> CArray[N-Size] )
Code

Return value; a constant size.