亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sdl_pixelformat.3

?? MPEG-4編解碼的實現(xiàn)(包括MPEG4視音頻編解碼)
?? 3
字號:
.TH "SDL_PixelFormat" "3" "Tue 11 Sep 2001, 23:01" "SDL" "SDL API Reference" 
.SH "NAME"
SDL_PixelFormat\- Stores surface format information
.SH "STRUCTURE DEFINITION"
.PP
.nf
\f(CWtypedef struct{
  SDL_Palette *palette;
  Uint8  BitsPerPixel;
  Uint8  BytesPerPixel;
  Uint32 Rmask, Gmask, Bmask, Amask;
  Uint8  Rshift, Gshift, Bshift, Ashift;
  Uint8  Rloss, Gloss, Bloss, Aloss;
  Uint32 colorkey;
  Uint8  alpha;
} SDL_PixelFormat;\fR
.fi
.PP
.SH "STRUCTURE DATA"
.TP 20
\fBpalette\fR
Pointer to the \fIpalette\fR, or \fBNULL\fP if the \fBBitsPerPixel\fR>8
.TP 20
\fBBitsPerPixel\fR
The number of bits used to represent each pixel in a surface\&. Usually 8, 16, 24 or 32\&.
.TP 20
\fBBytesPerPixel\fR
The number of bytes used to represent each pixel in a surface\&. Usually one to four\&.
.TP 20
\fB[RGBA]mask\fR
Binary mask used to retrieve individual color values
.TP 20
\fB[RGBA]loss\fR
Precision loss of each color component (2^[RGBA]loss)
.TP 20
\fB[RGBA]shift\fR
Binary left shift of each color component in the pixel value
.TP 20
\fBcolorkey\fR
Pixel value of transparent pixels
.TP 20
\fBalpha\fR
Overall surface alpha value
.SH "DESCRIPTION"
.PP
A \fBSDL_PixelFormat\fR describes the format of the pixel data stored at the \fBpixels\fR field of a \fI\fBSDL_Surface\fR\fR\&. Every surface stores a \fBSDL_PixelFormat\fR in the \fBformat\fR field\&.
.PP
If you wish to do pixel level modifications on a surface, then understanding how SDL stores its color information is essential\&.
.PP
8-bit pixel formats are the easiest to understand\&. Since its an 8-bit format, we have 8 \fBBitsPerPixel\fR and 1 \fBBytesPerPixel\fR\&. Since \fBBytesPerPixel\fR is 1, all pixels are represented by a Uint8 which contains an index into \fBpalette\fR->\fBcolors\fR\&. So, to determine the color of a pixel in a 8-bit surface: we read the color index from \fBsurface\fR->\fBpixels\fR and we use that index to read the \fI\fBSDL_Color\fR\fR structure from \fBsurface\fR->\fBformat\fR->\fBpalette\fR->\fBcolors\fR\&. Like so: 
.PP
.nf
\f(CWSDL_Surface *surface;
SDL_PixelFormat *fmt;
SDL_Color *color;
Uint8 index;

\&.
\&.

/* Create surface */
\&.
\&.
fmt=surface->format;

/* Check the bitdepth of the surface */
if(fmt->BitsPerPixel!=8){
  fprintf(stderr, "Not an 8-bit surface\&.
");
  return(-1);
}

/* Lock the surface */
SDL_LockSurface(surface);

/* Get the topleft pixel */
index=*(Uint8 *)surface->pixels;
color=fmt->palette->colors[index];

/* Unlock the surface */
SDL_UnlockSurface(surface);
printf("Pixel Color-> Red: %d, Green: %d, Blue: %d\&. Index: %d
",
          color->r, color->g, color->b, index);
\&.
\&.\fR
.fi
.PP
.PP
Pixel formats above 8-bit are an entirely different experience\&. They are considered to be "TrueColor" formats and the color information is stored in the pixels themselves, not in a palette\&. The mask, shift and loss fields tell us how the color information is encoded\&. The mask fields allow us to isolate each color component, the shift fields tell us the number of bits to the right of each component in the pixel value and the loss fields tell us the number of bits lost from each component when packing 8-bit color component in a pixel\&. 
.PP
.nf
\f(CW/* Extracting color components from a 32-bit color value */
SDL_PixelFormat *fmt;
SDL_Surface *surface;
Uint32 temp, pixel;
Uint8 red, green, blue, alpha;
\&.
\&.
\&.
fmt=surface->format;
SDL_LockSurface(surface);
pixel=*((Uint32*)surface->pixels);
SDL_UnlockSurface(surface);

/* Get Red component */
temp=pixel&fmt->Rmask; /* Isolate red component */
temp=temp>>fmt->Rshift;/* Shift it down to 8-bit */
temp=temp<<fmt->Rloss; /* Expand to a full 8-bit number */
red=(Uint8)temp;

/* Get Green component */
temp=pixel&fmt->Gmask; /* Isolate green component */
temp=temp>>fmt->Gshift;/* Shift it down to 8-bit */
temp=temp<<fmt->Gloss; /* Expand to a full 8-bit number */
green=(Uint8)temp;

/* Get Blue component */
temp=pixel&fmt->Bmask; /* Isolate blue component */
temp=temp>>fmt->Bshift;/* Shift it down to 8-bit */
temp=temp<<fmt->Bloss; /* Expand to a full 8-bit number */
blue=(Uint8)temp;

/* Get Alpha component */
temp=pixel&fmt->Amask; /* Isolate alpha component */
temp=temp>>fmt->Ashift;/* Shift it down to 8-bit */
temp=temp<<fmt->Aloss; /* Expand to a full 8-bit number */
alpha=(Uint8)temp;

printf("Pixel Color -> R: %d,  G: %d,  B: %d,  A: %d
", red, green, blue, alpha);
\&.
\&.
\&.\fR
.fi
.PP
.SH "SEE ALSO"
.PP
\fI\fBSDL_Surface\fR\fR, \fI\fBSDL_MapRGB\fP\fR
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:01

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日本韩国| 懂色av中文字幕一区二区三区| 欧洲一区二区av| 亚洲成va人在线观看| 欧美日韩在线观看一区二区| 丝袜美腿高跟呻吟高潮一区| 91精品国产91久久综合桃花| 日韩va亚洲va欧美va久久| 日韩久久久久久| 国产不卡免费视频| 亚洲激情五月婷婷| 日韩欧美一区中文| 黄色成人免费在线| 亚洲女厕所小便bbb| 欧美日韩一区小说| 国产乱一区二区| 亚洲女同ⅹxx女同tv| 日韩午夜三级在线| 成人久久18免费网站麻豆 | 99综合影院在线| 一级中文字幕一区二区| 精品国产污网站| www.亚洲人| 日韩国产欧美一区二区三区| 中文字幕精品—区二区四季| 欧美日韩国产经典色站一区二区三区| 美女看a上一区| 亚洲乱码国产乱码精品精可以看| 91麻豆精品国产91| 成人小视频在线观看| 天天操天天干天天综合网| 久久久久久夜精品精品免费| 91精品福利在线| 国产成人精品免费看| 性做久久久久久久久| 五月天久久比比资源色| 日韩精品在线一区二区| 欧美xxxxx牲另类人与| 成人av第一页| 蜜桃在线一区二区三区| 中文字幕久久午夜不卡| 69精品人人人人| 不卡一区在线观看| 极品瑜伽女神91| 亚洲国产美国国产综合一区二区| 国产免费久久精品| 日韩精品一区二区三区蜜臀 | 国产电影一区在线| 婷婷夜色潮精品综合在线| 亚洲色图19p| 久久精品亚洲一区二区三区浴池| 欧美一区二区大片| 欧美情侣在线播放| 欧美色爱综合网| 91官网在线免费观看| 99久久精品免费看国产| 成人深夜在线观看| 国产成人亚洲综合a∨婷婷| 99精品久久99久久久久| 奇米影视在线99精品| 一级女性全黄久久生活片免费| 国产精品久久久久久久久免费桃花 | 亚洲国产成人精品视频| 成人欧美一区二区三区视频网页| 2020国产成人综合网| 日韩欧美国产一区二区在线播放| 欧美日韩亚洲综合| 欧美日韩精品一区二区三区四区| 日本道在线观看一区二区| 99久久国产综合精品麻豆| www.日韩精品| 91在线观看污| 色婷婷综合久久久中文字幕| 91麻豆免费观看| 色综合久久综合网97色综合| 91在线视频在线| 成人国产视频在线观看| 99久久综合国产精品| 91一区二区在线观看| 色噜噜偷拍精品综合在线| 欧美午夜寂寞影院| 欧美美女直播网站| 91精品国产黑色紧身裤美女| 欧美一级二级三级蜜桃| 久久影视一区二区| 国产精品伦一区| 一区二区三区中文字幕在线观看| 亚洲在线视频网站| 美女视频黄久久| 国产精品1区2区3区在线观看| 成人福利视频在线| 欧美日韩在线一区二区| 日韩一区二区免费高清| 久久久久久久久久久99999| 国产精品不卡在线| 亚洲国产视频在线| 国产在线视视频有精品| 99免费精品在线观看| 欧美日本韩国一区二区三区视频 | 久久久久亚洲蜜桃| 日韩理论片中文av| 性久久久久久久久久久久| 久久精品国产精品亚洲综合| 国产精品一区二区不卡| 日本精品一级二级| 精品日韩一区二区三区免费视频| 国产欧美精品区一区二区三区| 亚洲日韩欧美一区二区在线| 亚洲国产成人91porn| 国产一区福利在线| 欧美在线色视频| 欧美不卡一区二区| 亚洲精品中文在线影院| 国产一区在线精品| 欧洲一区在线电影| 国产午夜精品美女毛片视频| 亚洲国产一区二区三区| 国产精品一区一区三区| 欧美在线一区二区| 中文字幕不卡在线播放| 免费看欧美美女黄的网站| 99久久精品国产一区二区三区| 欧美精品在线视频| 国产精品乱码一区二区三区软件| 日韩精品免费视频人成| 99久久免费视频.com| 日韩欧美在线网站| 亚洲小说春色综合另类电影| 成人国产精品免费观看动漫| 欧美一级精品在线| 一区二区三区中文在线观看| 韩国成人福利片在线播放| 在线视频你懂得一区| 中文一区在线播放| 久久超碰97中文字幕| 欧美色电影在线| 亚洲精品国产a| www.综合网.com| 国产女主播一区| 国产剧情一区二区三区| 欧美一区二区精品在线| 亚洲在线免费播放| 色8久久人人97超碰香蕉987| 亚洲欧洲一区二区三区| 国产精品小仙女| 久久噜噜亚洲综合| 久久超碰97人人做人人爱| 在线播放中文字幕一区| 亚洲网友自拍偷拍| 欧洲国产伦久久久久久久| 亚洲视频在线一区二区| 春色校园综合激情亚洲| 国产欧美日本一区视频| 国产盗摄一区二区三区| 2023国产精品| 国产美女久久久久| 国产午夜精品久久| 国产a精品视频| 中文在线一区二区| 成人免费看黄yyy456| 国产欧美日本一区二区三区| 国产精品羞羞答答xxdd| 国产日韩亚洲欧美综合| 风流少妇一区二区| 国产精品青草综合久久久久99| 国产成人在线看| 国产精品免费久久久久| 成人高清免费在线播放| 亚洲欧美日韩国产中文在线| 色噜噜狠狠一区二区三区果冻| 夜夜操天天操亚洲| 欧美日韩精品欧美日韩精品一综合| 五月天一区二区三区| 91精品婷婷国产综合久久竹菊| 青青草国产成人av片免费| 日韩欧美国产一区二区三区 | 成人黄色片在线观看| 中文字幕在线播放不卡一区| 91亚洲精品乱码久久久久久蜜桃| 一区二区三区中文字幕| 欧美精品亚洲一区二区在线播放| 免费的成人av| 国产日韩成人精品| 91看片淫黄大片一级| 午夜精品久久一牛影视| 精品理论电影在线观看 | 中文字幕欧美日本乱码一线二线| 99vv1com这只有精品| 亚洲国产你懂的| 久久综合九色综合97婷婷| 99久久综合狠狠综合久久| 五月天激情综合网| 久久久99精品免费观看不卡| 成人一二三区视频| 亚洲成a人片在线观看中文| 日韩欧美国产一区二区在线播放| 成人免费毛片嘿嘿连载视频| 亚洲大片在线观看| 337p日本欧洲亚洲大胆色噜噜| 91美女精品福利|