1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
\r
5 <meta http-equiv="Content-Style-Type" content="text/css">
\r
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
\r
7 <link rel="top" href="index.html" title="
\83z
\81[
\83\80">
\r
8 <link rel="parent" href="CategoryPixels.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_AllocFormat</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryPixels.html">
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Æ
\95Ï
\8a·</a> - SDL_AllocFormat
\r
14 <h1>SDL_AllocFormat</h1>
\r
15 \8ew
\92è
\82Ì
\83s
\83N
\83Z
\83\8b\8c`
\8e®
\82Ì<a href="SDL_PixelFormat.html">SDL_PixelFormat</a>
\82ð
\90¶
\90¬
\82·
\82é
\r
17 <code>SDL_PixelFormat* SDL_AllocFormat(Uint32 pixel_format)</code>
\r
19 <table border="1" summary="SDL_AllocFormat">
\r
20 <tr><td>pixel_format</td><td><a href="SDL_PixelFormatEnum.html">SDL_PixelFormatEnum</a>
\82Ì
\92l
\82Ì1
\82Â</td></tr>
\r
22 <h2>
\96ß
\82è
\92l</h2>
\r
24 \90¬
\8c÷
\82Ì
\82Æ
\82«
\90¶
\90¬
\82³
\82ê
\82½<a href="SDL_PixelFormat.html">SDL_PixelFormat</a>,
\8e¸
\94s
\82Ì
\82Æ
\82«NULL
\82ð
\96ß
\82·.
\r
25 <a href="SDL_GetError.html">SDL_GetError()</a>
\82Å
\8fÚ
\8d×
\82ð
\92m
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é.
\r
27 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
31 SDL_PixelFormat* pixel_format = NULL;
\r
35 SDL_Init(SDL_INIT_EVERYTHING);
\r
37 pixel_format = SDL_AllocFormat(SDL_PIXELFORMAT_RGBA32)
\r
39 if (pixel_format == NULL) printf( "
\83G
\83\89\81[: %s\n", SDL_GetError() );
\r
43 printf("
\83o
\83C
\83g
\90\94: %i\n", pixel_format->BytesPerPixel);
\r
48 \96ß
\82³
\82ê
\82½
\8d\
\91¢
\91Ì
\82Í, (
\90V
\82µ
\82
\8am
\95Û
\82³
\82ê
\82½
\97Ì
\88æ
\82Å
\82Í
\82È
\82)
\8b¤
\92Ê
\82Ì
\83O
\83\8d\81[
\83o
\83\8b\82È
\97Ì
\88æ
\82È
\82Ì
\82Å,
\95Ï
\8dX
\82µ
\82Ä
\82Í
\82È
\82ç
\82È
\82¢.
\93Á
\82É
\83p
\83\8c\83b
\83g
\82Í
\82»
\82¤
\82Å
\82 \82é.
\r
49 "Blit combination not supported"
\82Ì
\82æ
\82¤
\82È
\95s
\89Â
\89ð
\82È
\83G
\83\89\81[
\82ª
\94
\90¶
\82·
\82é
\82¾
\82ë
\82¤.
\r
51 <h2>
\83o
\81[
\83W
\83\87\83\93</h2>
\r
53 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
54 <a href="SDL_FreeFormat.html">SDL_FreeFormat</a><br>
\r
55 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
56 <a href="https://wiki.libsdl.org/SDL_AllocFormat">SDL_AllocFormat - SDL Wiki</a>
\r