summaryrefslogtreecommitdiff
path: root/doc/classes/ImageTexture.xml
blob: d122d74e85c0f60058247c64664973049d073ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImageTexture" inherits="Texture2D" version="4.0">
	<brief_description>
		A [Texture2D] based on an [Image].
	</brief_description>
	<description>
		A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
		[b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="create_from_image">
			<return type="void">
			</return>
			<argument index="0" name="image" type="Image">
			</argument>
			<description>
				Create a new [ImageTexture] from an [Image].
			</description>
		</method>
		<method name="get_format" qualifiers="const">
			<return type="int" enum="Image.Format">
			</return>
			<description>
				Returns the format of the [ImageTexture], one of [enum Image.Format].
			</description>
		</method>
		<method name="set_size_override">
			<return type="void">
			</return>
			<argument index="0" name="size" type="Vector2">
			</argument>
			<description>
				Resizes the [ImageTexture] to the specified dimensions.
			</description>
		</method>
		<method name="update">
			<return type="void">
			</return>
			<argument index="0" name="image" type="Image">
			</argument>
			<argument index="1" name="immediate" type="bool" default="false">
			</argument>
			<description>
				Replaces the texture's data with a new [code]image[/code]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call.
			</description>
		</method>
	</methods>
	<constants>
	</constants>
</class>