N-Size

#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------

Gnome::Graphene::N-Size

Description

A size.

#------------------------------------------------------------------------------- #--[Record Structure Documentation]--------------------------------------------- #-------------------------------------------------------------------------------

Record N-Size

class N-Size:auth<github:MARTIMM>:api<2> is export is repr('CStruct') {
has gfloat $.width;
    has gfloat $.height;
  }
  • width; the width

  • height; the height

#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

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

#-------------------------------------------------------------------------------

alloc

Allocates a new #graphene_size_t.

The contents of the returned value are undefined.

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

#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------

Methods

#-------------------------------------------------------------------------------

equal This function is not yet available

Checks whether the two give #graphene_size_t are equal.

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

#-------------------------------------------------------------------------------

free

Frees the resources allocated by .alloc().

method free ( )

#-------------------------------------------------------------------------------

init

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

method init ( Num() $width, Num() $height --> CArray[N-Size] )
  • $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] )
  • $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 )
  • $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 )
  • $factor; the scaling factor.

  • $res; return location for the scaled size.

#------------------------------------------------------------------------------- #--[Functions]------------------------------------------------------------------ #-------------------------------------------------------------------------------

Functions

#-------------------------------------------------------------------------------

zero

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

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

Return value; a constant size.

Gnome::Graphene v0.1.11

Graphene is a library of data types commonly used to implement 2D-in-3D or full 3D canvases

Authors

  • Marcel Timmerman

License

Artistic-2.0

Dependencies

Gnome::GObject:api<2>Gnome::Glib:api<2>Gnome::N:api<2>

Test Dependencies

Provides

  • Gnome::Graphene::N-Box
  • Gnome::Graphene::N-Euler
  • Gnome::Graphene::N-Frustum
  • Gnome::Graphene::N-Matrix
  • Gnome::Graphene::N-Plane
  • Gnome::Graphene::N-Point
  • Gnome::Graphene::N-Point3D
  • Gnome::Graphene::N-Quad
  • Gnome::Graphene::N-Quaternion
  • Gnome::Graphene::N-Ray
  • Gnome::Graphene::N-Rect
  • Gnome::Graphene::N-Size
  • Gnome::Graphene::N-Sphere
  • Gnome::Graphene::N-Triangle
  • Gnome::Graphene::N-Vec2
  • Gnome::Graphene::N-Vec3
  • Gnome::Graphene::N-Vec4
  • Gnome::Graphene::T-box
  • Gnome::Graphene::T-config
  • Gnome::Graphene::T-euler
  • Gnome::Graphene::T-frustum
  • Gnome::Graphene::T-matrix
  • Gnome::Graphene::T-plane
  • Gnome::Graphene::T-point
  • Gnome::Graphene::T-point3d
  • Gnome::Graphene::T-quad
  • Gnome::Graphene::T-quaternion
  • Gnome::Graphene::T-ray
  • Gnome::Graphene::T-rect
  • Gnome::Graphene::T-size
  • Gnome::Graphene::T-sphere
  • Gnome::Graphene::T-triangle
  • Gnome::Graphene::T-vec

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.