Home | History | Annotate | Download | only in SDL

Lines Matching full:surface

41  *  These define alpha as the opacity of a surface
89 /** Alpha value information (per-surface alpha) */
94 * which, if not NULL, contains the raw pixel data for the surface.
104 /** Hardware-specific surface info */
120 /** Reference count -- used when freeing surface */
131 #define SDL_SWSURFACE 0x00000000 /**< Surface is in system memory */
132 #define SDL_HWSURFACE 0x00000001 /**< Surface is in video memory */
139 #define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
141 #define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
153 #define SDL_RLEACCEL 0x00004000 /**< Surface is RLE encoded */
155 #define SDL_PREALLOC 0x01000000 /**< Surface uses preallocated memory */
160 /** Evaluates to true if the surface needs to be locked before access */
161 #define SDL_MUSTLOCK(surface) \
162 (surface->offset || \
163 ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0))
165 /** typedef for private surface blitting functions */
185 SDL_PixelFormat *vfmt; /**< Value: The format of the video surface */
215 /** @name Hardware-specific surface info */
287 * This function returns a pointer to the current display surface.
288 * If SDL is doing format conversion on the display surface, this
289 * function returns the publicly visible surface, not the real video
290 * surface.
308 * but will emulate the requested bits-per-pixel with a shadow surface.
336 * If SDL_HWSURFACE is set in 'flags', the video surface will be placed in
338 * in order to access the raw framebuffer. Otherwise, the video surface
349 * at the video surface structure to determine the actual palette.
351 * i.e. if the colormap is shared, then the video surface may be created
358 * will be set in the surface that is returned.
377 * This function returns the video framebuffer surface, or NULL if it fails.
380 * flags of the returned surface to make sure that functionality is available.
407 * video buffers before the next video surface blit or lock will return.
452 * Sets a portion of the colormap for the given 8-bit surface. If 'surface'
453 * is not a palettized surface, this function does nothing, returning 0.
456 * it will return 0, and you should look at the surface palette to
459 * When 'surface' is the surface associated with the current display, the
466 extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface *surface,
470 * Sets a portion of the colormap for a given 8-bit surface.
473 * to/from the surface,
485 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface *surface, int flags,
520 * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
521 * If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
526 * The 'flags' tell what kind of surface to create.
527 * SDL_SWSURFACE means that the surface should be created in system memory.
528 * SDL_HWSURFACE means that the surface should be created in video memory,
529 * with the same format as the display surface. This is useful for surfaces
531 * when being blitted to the display surface.
533 * this surface, but you must always lock it before accessing the pixels.
535 * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits.
537 * two surfaces in video memory, SDL will try to place the surface in
539 * acceleration available, the surface will be placed in system memory.
540 * SDL_SRCALPHA means that the surface will be used for alpha blits and
542 * two surfaces in video memory, to place the surface in video memory
544 * If the surface is created in video memory, blits will be _much_ faster,
545 * but the surface format must be identical to the video surface format,
546 * and the only way to access the pixels member of the surface is to use
548 * If the requested surface actually resides in video memory, SDL_HWSURFACE
549 * will be set in the flags member of the returned surface. If for some
550 * reason the surface could not be placed in video memory, it will not have
560 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface *surface);
563 * SDL_LockSurface() sets up a surface for directly accessing the pixels.
565 * to and read from 'surface->pixels', using the pixel format stored in
566 * 'surface->format'. Once you are done accessing the surface, you should
569 * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates
570 * to 0, then you can read and write to the surface at any time, and the
571 * pixel format of the surface will not change. In particular, if the
573 * will not need to lock the display surface before accessing it.
578 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
580 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface *surface);
581 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface);
584 * Load a surface from a seekable SDL data source (memory or file.)
586 * Returns the new surface, or NULL if there was an error.
587 * The new surface should be freed with SDL_FreeSurface().
591 /** Convenience macro -- load a surface from a file */
595 * Save a surface to a seekable SDL data source (memory or file.)
600 (SDL_Surface *surface, SDL_RWops *dst, int freedst);
602 /** Convenience macro -- save a surface to a file */
603 #define SDL_SaveBMP(surface, file) \
604 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
607 * Sets the color key (transparent pixel) in a blittable surface.
610 * SDL_RLEACCEL requests RLE acceleration for the surface if present,
616 (SDL_Surface *surface, Uint32 flag, Uint32 key);
619 * This function sets the alpha value for the entire surface, as opposed to
621 * of transparency of the surface, 0 being completely transparent to 255
624 * that per-surface alpha can be combined with colorkey transparency.
626 * If 'flag' is 0, alpha blending is disabled for the surface.
627 * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface.
629 * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed.
633 extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
636 * Sets the clipping rectangle for the destination surface in a blit.
639 * If the clip rectangle doesn't intersect the surface, the function will
641 * function returns SDL_TRUE and blits to the surface will be clipped to
642 * the intersection of the surface area and the clipping rectangle.
647 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);
650 * Gets the clipping rectangle for the destination surface in a blit.
654 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);
657 * Creates a new surface of the specified format, and then copies and maps
658 * the given surface to it so the blit of the converted surface will be as
664 * surface.
672 * This performs a fast blit from the source surface to the destination
673 * surface. It assumes that the source and destination rectangles are
675 * surface (src or dst) is copied. The final blit rectangles are saved
679 * The blit function should not be called on a locked surface.
696 * alpha-blend (using the source per-surface alpha value);
699 * copy RGB, set destination alpha to source per-surface alpha value.
717 * alpha-blend (using the source per-surface alpha value).
751 /** This is a semi-private blit function and it performs low-level surface
760 * The given rectangle is clipped to the destination surface clip area
762 * If 'dstrect' is NULL, the whole surface will be filled with 'color'
763 * The color should be a pixel of the format used by the surface, and
771 * This function takes a surface and copies it to a new surface of the
773 * blitting onto the display surface. It calls SDL_ConvertSurface()
781 extern DECLSPEC SDL_Surface * SDLCALL SDL_DisplayFormat(SDL_Surface *surface);
784 * This function takes a surface and copies it to a new surface of the
786 * suitable for fast alpha blitting onto the display surface.
787 * The new surface will always have an alpha channel.
795 extern DECLSPEC SDL_Surface * SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *surface);
799 /** @name YUV video surface overlay functions */ /*@{*/
803 * Calling the returned surface an overlay is something of a misnomer because
804 * the contents of the display surface underneath the area where the overlay
814 /** Blit a video overlay to the display surface.
815 * The contents of the video surface underneath the blit destination are
894 * It takes an icon surface, and a mask in MSB format.
895 * If 'mask' is NULL, the entire icon surface will be used as the icon.
908 * If the display surface does not require locking before accessing
921 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface *surface);