1masked_blit(3)                  Allegro manual                  masked_blit(3)
2
3
4

NAME

6       masked_blit  -  Copies a rectangle skipping pixels with the mask color.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void  masked_blit(BITMAP  *source,  BITMAP  *dest,  int  source_x,  int
14       source_y, int dest_x, int dest_y, int width, int height);
15

DESCRIPTION

17       Like  blit(),  but skips transparent pixels, which are marked by a zero
18       in 256-color modes or bright pink for truecolor data (maximum  red  and
19       blue,  zero  green), and requires the source and destination bitmaps to
20       be of the same color depth. The source and destination regions must not
21       overlap.  Example:
22
23          BITMAP *hud_overlay;
24          ...
25          /* Paint hud overlay on the screen. */
26          masked_blit(hud_overlay, screen, 0, 0, 0, 0,
27                      hud_overlay->w, hud_overlay->h);
28
29       If the GFX_HW_VRAM_BLIT_MASKED bit in the gfx_capabilities flag is set,
30       the current driver supports hardware accelerated masked blits from  one
31       part  of  the screen onto another. This is extremely fast, so when this
32       flag is set it may be worth storing some of your more  frequently  used
33       sprites in an offscreen portion of the video memory.
34
35       Warning:  if  the  hardware acceleration flag is not set, masked_blit()
36       will not work correctly when used with a  source  image  in  system  or
37       video memory so the latter must be a memory bitmap.
38
39

SEE ALSO

41       blit(3),  masked_stretch_blit(3), draw_sprite(3), bitmap_mask_color(3),
42       ex12bit(3), expat(3)
43
44
45
46Allegro                          version 4.4.2                  masked_blit(3)
Impressum