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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SizeAllocates a new #graphene_size_t.booleanChecks whether the two give #graphene_size_t are equal.voidfree()Frees the resources allocated by graphene_size_alloc().static ClassHandlerfloatthe heightfloatthe widthstatic intstatic longstatic TypeSystem.TypeSizestatic longstatic TypeSystem.TypeSizeinit(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.voidinterpolate(Size b, double factor, Size res) Linearly interpolates the two given #graphene_size_t using the given
interpolation @factor.voidScales the components of a #graphene_size_t using the given @factor.voidsetFieldHeight(float height) the heightvoidsetFieldWidth(float width) the widthstatic Sizezero()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, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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()
-