Package ch.bailu.gtk.gdk
Klasse MemoryTextureBuilder
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gdk.MemoryTextureBuilder
- Alle implementierten Schnittstellen:
PointerInterface
Constructs [class@Gdk.Texture] objects from system memory provided
via [struct@GLib.Bytes].
The operation is quite simple: Create a texture builder, set all the necessary
properties - keep in mind that the properties [property@Gdk.MemoryTextureBuilder:bytes],
[property@Gdk.MemoryTextureBuilder:stride], [property@Gdk.MemoryTextureBuilder:width],
and [property@Gdk.MemoryTextureBuilder:height] are mandatory - and then call
[method@Gdk.MemoryTextureBuilder.build] to create the new texture.
`GdkMemoryTextureBuilder` can be used for quick one-shot construction of
textures as well as kept around and reused to construct multiple textures.
via [struct@GLib.Bytes].
The operation is quite simple: Create a texture builder, set all the necessary
properties - keep in mind that the properties [property@Gdk.MemoryTextureBuilder:bytes],
[property@Gdk.MemoryTextureBuilder:stride], [property@Gdk.MemoryTextureBuilder:width],
and [property@Gdk.MemoryTextureBuilder:height] are mandatory - and then call
[method@Gdk.MemoryTextureBuilder.build] to create the new texture.
`GdkMemoryTextureBuilder` can be used for quick one-shot construction of
textures as well as kept around and reused to construct multiple textures.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify -
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new texture builder.MemoryTextureBuilder(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuild()Builds a new `GdkTexture` with the values set up in the builder.getBytes()Gets the bytes previously set via gdk_memory_texture_builder_set_bytes()
or %NULL if none was set.static ClassHandlerGets the colorstate previously set via gdk_memory_texture_builder_set_color_state().intGets the format previously set via gdk_memory_texture_builder_set_format().intGets the height previously set via gdk_memory_texture_builder_set_height()
or 0 if the height wasn't set.static intstatic longstatic TypeSystem.TypeSizelongGets the stride previously set via gdk_memory_texture_builder_set_stride().static longstatic TypeSystem.TypeSizeGets the region previously set via gdk_memory_texture_builder_set_update_region()
or %NULL if none was set.Gets the texture previously set via gdk_memory_texture_builder_set_update_texture()
or %NULL if none was set.intgetWidth()Gets the width previously set via gdk_memory_texture_builder_set_width()
or 0 if the width wasn't set.voidSets the data to be shown but the texture.voidsetColorState(ColorState color_state) Sets the colorstate describing the data.voidsetFormat(int format) Sets the format of the bytes.voidsetHeight(int height) Sets the height of the texture.voidsetStride(long stride) Sets the rowstride of the bytes used.voidsetUpdateRegion(Region region) Sets the region to be updated by this texture.voidsetUpdateTexture(Texture texture) Sets the texture to be updated by this texture.voidsetWidth(int width) Sets the width of the texture.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrPropertyVon Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnrefVon Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksVon Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
MemoryTextureBuilder
-
MemoryTextureBuilder
public MemoryTextureBuilder()Creates a new texture builder.
-
-
Methodendetails
-
getClassHandler
-
build
Builds a new `GdkTexture` with the values set up in the builder.
Note that it is a programming error to call this function if any mandatory
property has not been set.
It is possible to call this function multiple times to create multiple textures,
possibly with changing properties in between.- Gibt zurück:
- a newly built `GdkTexture`
-
getBytes
Gets the bytes previously set via gdk_memory_texture_builder_set_bytes()
or %NULL if none was set.- Gibt zurück:
- The bytes
-
getColorState
Gets the colorstate previously set via gdk_memory_texture_builder_set_color_state().- Gibt zurück:
- The colorstate
-
getFormat
public int getFormat()Gets the format previously set via gdk_memory_texture_builder_set_format().- Gibt zurück:
- The format
-
getHeight
public int getHeight()Gets the height previously set via gdk_memory_texture_builder_set_height()
or 0 if the height wasn't set.- Gibt zurück:
- The height
-
getStride
public long getStride()Gets the stride previously set via gdk_memory_texture_builder_set_stride().- Gibt zurück:
- the stride
-
getUpdateRegion
Gets the region previously set via gdk_memory_texture_builder_set_update_region()
or %NULL if none was set.- Gibt zurück:
- The update region
-
getUpdateTexture
Gets the texture previously set via gdk_memory_texture_builder_set_update_texture()
or %NULL if none was set.- Gibt zurück:
- The update texture
-
getWidth
public int getWidth()Gets the width previously set via gdk_memory_texture_builder_set_width()
or 0 if the width wasn't set.- Gibt zurück:
- The width
-
setBytes
Sets the data to be shown but the texture.
The bytes must be set before calling [method@Gdk.MemoryTextureBuilder.build].- Parameter:
bytes- The bytes the texture shows or %NULL to unset
-
setColorState
Sets the colorstate describing the data.
By default, the sRGB colorstate is used. If you don't know
what colorstates are, this is probably the right thing.- Parameter:
color_state- The colorstate describing the data
-
setFormat
public void setFormat(int format) Sets the format of the bytes.
The default is `GDK_MEMORY_R8G8B8A8_PREMULTIPLIED`.- Parameter:
format- The texture's format
-
setHeight
public void setHeight(int height) Sets the height of the texture.
The height must be set before calling [method@Gdk.MemoryTextureBuilder.build].- Parameter:
height- The texture's height or 0 to unset
-
setStride
public void setStride(long stride) Sets the rowstride of the bytes used.
The rowstride must be set before calling [method@Gdk.MemoryTextureBuilder.build].- Parameter:
stride- the stride or 0 to unset
-
setUpdateRegion
Sets the region to be updated by this texture.
Together with [property@Gdk.MemoryTextureBuilder:update-texture],
this describes an update of a previous texture.
When rendering animations of large textures, it is possible that
consecutive textures are only updating contents in parts of the texture.
It is then possible to describe this update via these two properties,
so that GTK can avoid rerendering parts that did not change.
An example would be a screen recording where only the mouse pointer moves.- Parameter:
region- the region to update
-
setUpdateTexture
Sets the texture to be updated by this texture.
See [method@Gdk.MemoryTextureBuilder.set_update_region] for an explanation.- Parameter:
texture- the texture to update
-
setWidth
public void setWidth(int width) Sets the width of the texture.
The width must be set before calling [method@Gdk.MemoryTextureBuilder.build].- Parameter:
width- The texture's width or 0 to unset
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-