18 #define SHAPED_WINDOW_X 150
19 #define SHAPED_WINDOW_Y 150
20 #define SHAPED_WINDOW_DIMENSION 640
36 SDL_RenderCopy(renderer,texture,&texture_dimensions,&texture_dimensions);
41 int main(
int argc,
char** argv)
52 unsigned int current_picture;
71 num_pictures = argc - 1;
77 for(i=0;i<num_pictures;i++)
79 for(i=0;i<num_pictures;i++) {
81 pictures[
i].
name = argv[i+1];
83 for(j=0;j<num_pictures;j++)
108 for(i=0;i<num_pictures;i++)
118 for(i=0;i<num_pictures;i++)
126 for(i=0;i<num_pictures;i++)
128 for(i=0;i<num_pictures;i++) {
131 for(i=0;i<num_pictures;i++)
134 for(i=0;i<num_pictures;i++)
148 texture_dimensions.
h = 0;
149 texture_dimensions.
w = 0;
150 texture_dimensions.
x = 0;
151 texture_dimensions.
y = 0;
156 while(should_exit == 0) {
167 current_picture += 1;
168 if(current_picture >= num_pictures)
171 SDL_QueryTexture(pictures[current_picture].texture,(
Uint32 *)&pixelFormat,(
int *)&access,&texture_dimensions.
w,&texture_dimensions.
h);
173 SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode);
180 render(renderer,pictures[current_picture].texture,texture_dimensions);
185 for(i=0;i<num_pictures;i++)
191 for(i=0;i<num_pictures;i++)
#define SDL_SetWindowShape
#define SDL_LoadBMP(file)
#define SDL_SetWindowSize
A collection of pixels used in software blitting.
#define SDL_ISPIXELFORMAT_ALPHA(format)
GLuint GLint GLboolean GLint GLenum access
GLuint const GLchar * name
void render(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Rect texture_dimensions)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLenum GLenum GLuint texture
#define SDL_CreateTextureFromSurface
static SDL_Renderer * renderer
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
SDL_WindowShapeParams parameters
Window-shape parameters.
#define SDL_LogSetPriority
A binarized alpha cutoff with a given integer value.
EGLSurface EGLNativeWindowType * window
#define SDL_DestroyTexture
#define SDL_CreateShapedWindow
The type used to identify a window.
#define SHAPED_WINDOW_DIMENSION
Uint8 binarizationCutoff
A cutoff alpha value for binarization of the window shape's alpha channel.
A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents...
#define SDL_SetRenderDrawColor
int main(int argc, char **argv)
#define SDL_DestroyRenderer
WindowShapeMode mode
The mode of these window-shape parameters.
#define SDL_DestroyWindow
#define SDL_SetWindowPosition
#define SDL_CreateRenderer
A rectangle, with the origin at the upper left.
#define SDL_RenderPresent