Package ch.bailu.gtk.graphene
Class Size
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.graphene.Size
- All Implemented Interfaces:
PointerInterface
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Size
Allocates a new #graphene_size_t.boolean
Checks whether the two give #graphene_size_t are equal.void
free()
Frees the resources allocated by graphene_size_alloc().static ClassHandler
float
the heightfloat
the widthstatic int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
init
(float width, float height) Initializes a #graphene_size_t using the given @width and @height.initFromSize
(Size src) Initializes a #graphene_size_t using the width and height of
the given @src.void
interpolate
(Size b, double factor, Size res) Linearly interpolates the two given #graphene_size_t using the given
interpolation @factor.void
Scales the components of a #graphene_size_t using the given @factor.void
setFieldHeight
(float height) the heightvoid
setFieldWidth
(float width) the widthstatic Size
zero()
A constant pointer to a zero #graphene_size_t, useful for
equality checks and interpolations.Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
WIDTH
the width- See Also:
-
HEIGHT
the height- See Also:
-
-
Constructor Details
-
Size
-
Size
public Size()
-
-
Method Details
-
getClassHandler
-
setFieldWidth
public void setFieldWidth(float width) the width -
getFieldWidth
public float getFieldWidth()the width -
setFieldHeight
public void setFieldHeight(float height) the height -
getFieldHeight
public float getFieldHeight()the height -
allocSize
Allocates a new #graphene_size_t.
The contents of the returned value are undefined.- Returns:
- the newly allocated #graphene_size_t
-
equal
Checks whether the two give #graphene_size_t are equal.- Parameters:
b
- a #graphene_size_t- Returns:
- `true` if the sizes are equal
-
free
public void free()Frees the resources allocated by graphene_size_alloc(). -
init
Initializes a #graphene_size_t using the given @width and @height.- Parameters:
width
- the widthheight
- the height- Returns:
- the initialized #graphene_size_t
-
initFromSize
Initializes a #graphene_size_t using the width and height of
the given @src.- Parameters:
src
- a #graphene_size_t- Returns:
- the initialized #graphene_size_t
-
interpolate
Linearly interpolates the two given #graphene_size_t using the given
interpolation @factor.- Parameters:
b
- a #graphene_size_tfactor
- the linear interpolation factorres
- return location for the interpolated size
-
scale
Scales the components of a #graphene_size_t using the given @factor.- Parameters:
factor
- the scaling factorres
- return location for the scaled size
-
zero
A constant pointer to a zero #graphene_size_t, useful for
equality checks and interpolations.- Returns:
- a constant size
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-