CSFML

- Main Page
- Data Structures
- Files

- File List
- Globals

Texture.h
Go to the documentation of this file.
1 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2013 Laurent Gomila (laurent.gom@gmail.com)
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
156 CSFML_GRAPHICS_API void sfTexture_updateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
157
167 CSFML_GRAPHICS_API void sfTexture_updateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
168
178 CSFML_GRAPHICS_API void sfTexture_updateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
179
187 CSFML_GRAPHICS_API void sfTexture_setSmooth(sfTexture* texture, sfBool smooth);
188
197 CSFML_GRAPHICS_API sfBool sfTexture_isSmooth(const sfTexture* texture);
198
220 CSFML_GRAPHICS_API void sfTexture_setRepeated(sfTexture* texture, sfBool repeated);
221
230 CSFML_GRAPHICS_API sfBool sfTexture_isRepeated(const sfTexture* texture);
231
253 CSFML_GRAPHICS_API void sfTexture_bind(const sfTexture* texture);
254
261 CSFML_GRAPHICS_API unsigned int sfTexture_getMaximumSize();
262
263
264 #endif // SFML_TEXTURE_H