CSFML

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Texture.h
1 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24
25 #ifndef SFML_TEXTURE_H
26 #define SFML_TEXTURE_H
27
29 // Headers
31 #include <SFML/Graphics/Export.h>
32 #include <SFML/Graphics/Rect.h>
33 #include <SFML/Graphics/Types.h>
34 #include <SFML/Window/Types.h>
35 #include <SFML/System/InputStream.h>
36 #include <SFML/System/Vector2.h>
37 #include <stddef.h>
38
39
49 CSFML_GRAPHICS_API sfTexture* sfTexture_create(unsigned int width, unsigned int height);
50
60 CSFML_GRAPHICS_API sfTexture* sfTexture_createFromFile(const char* filename, const sfIntRect* area);
61
72 CSFML_GRAPHICS_API sfTexture* sfTexture_createFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
73
83 CSFML_GRAPHICS_API sfTexture* sfTexture_createFromStream(sfInputStream* stream, const sfIntRect* area);
84
94 CSFML_GRAPHICS_API sfTexture* sfTexture_createFromImage(const sfImage* image, const sfIntRect* area);
95
104 CSFML_GRAPHICS_API sfTexture* sfTexture_copy(const sfTexture* texture);
105
112 CSFML_GRAPHICS_API void sfTexture_destroy(sfTexture* texture);
113
122 CSFML_GRAPHICS_API sfVector2u sfTexture_getSize(const sfTexture* texture);
123
132 CSFML_GRAPHICS_API sfImage* sfTexture_copyToImage(const sfTexture* texture);
133
145 CSFML_GRAPHICS_API void sfTexture_updateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
146
163 CSFML_GRAPHICS_API void sfTexture_updateFromTexture(sfTexture* destination, const sfTexture* source, unsigned int x, unsigned int y);
164
174 CSFML_GRAPHICS_API void sfTexture_updateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
175
185 CSFML_GRAPHICS_API void sfTexture_updateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
186
196 CSFML_GRAPHICS_API void sfTexture_updateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
197
205 CSFML_GRAPHICS_API void sfTexture_setSmooth(sfTexture* texture, sfBool smooth);
206
215 CSFML_GRAPHICS_API sfBool sfTexture_isSmooth(const sfTexture* texture);
216
240 CSFML_GRAPHICS_API void sfTexture_setSrgb(sfTexture* texture, sfBool sRgb);
241
250 CSFML_GRAPHICS_API sfBool sfTexture_isSrgb(const sfTexture* texture);
251
273 CSFML_GRAPHICS_API void sfTexture_setRepeated(sfTexture* texture, sfBool repeated);
274
283 CSFML_GRAPHICS_API sfBool sfTexture_isRepeated(const sfTexture* texture);
284
308 CSFML_GRAPHICS_API sfBool sfTexture_generateMipmap(sfTexture* texture);
309
317 CSFML_GRAPHICS_API void sfTexture_swap(sfTexture* left, sfTexture* right);
318
331 CSFML_GRAPHICS_API unsigned int sfTexture_getNativeHandle(const sfTexture* texture);
332
354 CSFML_GRAPHICS_API void sfTexture_bind(const sfTexture* texture);
355
362 CSFML_GRAPHICS_API unsigned int sfTexture_getMaximumSize();
363
364
365 #endif // SFML_TEXTURE_H
sfInputStream
Set of callbacks that allow users to define custom file streams.
Definition: InputStream.h:44
sfVector2u
2-component vector of unsigned integers
Definition: Vector2.h:49
sfIntRect
Definition: Rect.h:46