XReadBitmapFile(3X11) | XLIB FUNCTIONS | XReadBitmapFile(3X11) |
̾??¶
XReadBitmapFile, XReadBitmapFileData, XWriteBitmapFile, XCreatePixmapFromBitmapData, XCreateBitmapFromData - ?ӥåȥޥåפ??????
????¶
int XReadBitmapFile(display, d, filename,
width_return, height_return, bitmap_return,
x_hot_return,
y_hot_return)
Display *display;
Drawable d;
char *filename;
unsigned int *width_return, *height_return;
Pixmap *bitmap_return;
int *x_hot_return, *y_hot_return;
int XReadBitmapFileData(filename, width_return,
height_return, data_return, x_hot_return,
y_hot_return)
char *filename;
unsigned int *width_return, *height_return;
unsigned char *data_return;
int *x_hot_return, *y_hot_return;
int XWriteBitmapFile(display, filename,
bitmap, width, height, x_hot, y_hot)
Display *display;
char *filename;
Pixmap bitmap;
unsigned int width, height;
int x_hot, y_hot;
Pixmap XCreatePixmapFromBitmapData(display, d,
data, width, height, fg, bg,
depth)
Display *display;
Drawable d;
char *data;
unsigned int width, height;
unsigned long fg, bg;
unsigned int depth;
Pixmap XCreateBitmapFromData(display, d,
data, width, height)
Display *display;
Drawable d;
char *data;
unsigned int width, height;
??????¶
- bitmap
- ?ӥåȥޥåפ????ꤹ?롣
- bitmap_return
- ???????줿?ӥåȥޥåפ??֤????롣
- d
- ????????????ꤹ?뤿???Υɥ??????֥??????ꤹ?롣
- data
- ?ӥåȥޥå????Υǡ????????ꤹ?롣
- data
- ?ӥåȥޥåץǡ????ξ????????ꤹ?롣
- data_return
- ?ӥåȥޥåץǡ??????֤????롣
- depth
- ?ԥå????ޥåפο????????ꤹ?롣
- display
- X ?????Фؤ???³?????ꤹ?롣
- fg
-
- bg
- ???Ѥ??????ʿ????طʿ??Υԥ??????ͤ????ꤹ?롣
- filename
- ???Ѥ????ե?????̾?????ꤹ?롣 ?ե?????̾??ʸ?????η????? OS ?˰?¸???롣
- width
-
- height
- ???ȹ⤵?????ꤹ?롣
- width_return
-
- height_return
- ?ɤ߹??????ӥåȥޥåפ????ȹ⤵???֤????롣
- x_hot
-
- y_hot
- ?ե????????˥ۥåȥ??ݥåȤ????֤?????ɸ??????(¸?ߤ??ʤ??Ȥ??? -1, -1 ??????)??
- x_hot_return
-
- y_hot_return
- ?ۥåȥ??ݥåȤκ?ɸ???֤????롣
????¶
?ؿ? XReadBitmapFile ?ϥӥåȥޥåפ??ޤ??ե????????ɤ߹??ࡣ ?ե??????ϸ??ߤΥ????????Υ????ǥ??˽??ä?Ÿ???????롣 ɸ???ե????ޥåȰʳ??Υե????????ɤ߹????뤫?ɤ????ϼ????˰?¸???롣 ?ե??????????Ȥ??Ǥ??ʤ??ä????硢 XReadBitmapFile ?? BitmapOpenFailed ???֤??? ?ե??????????ȤϤǤ??????????줬???????ӥåȥޥåץǡ????Ǥʤ??ä? ?????ˤ? BitmapFileInvalid ???֤????롣 ??ʬ?ʺ????ΰ??????????Ƥ????ʤ??ä??????ˤ? BitmapNoMemory ???֤????롣 ?ե????뤬?ɤ߹??߲?ǽ?????????ǡ????Ǥ????С? BitmapSuccess ???֤????롣
XReadBitmapFile ?ϡ??ե????뤫???ɤ߹????ݤ˥ӥåȥޥåפ????ȹ⤵?? width_return ?? height_return ???֤??? ????Ŭ?ڤʥ??????Υԥå????ޥåפ??????????ե????뤫???ӥåȥޥåפ??? ?߹????Ǥ??Υԥå????ޥåפ˳?Ǽ???????Υԥå????ޥåפ??ؿ??ΰ????? bitmap ?˳??????Ƥ롣 ???δؿ????ƤӽФ??????饤?????Ȥϡ??ӥåȥޥåפ??Ȥ??????ä????? XFreePixmap ???ȤäƤ????????????ʤ????Фʤ??ʤ??? name_x_hot ?? name_y_hot ??¸?ߤ??????硢 XReadBitmapFile ?Ϥ??????? x_hot_return ?? y_hot_return ???֤????????Ǥʤ??????ˤ? -1,-1 ???֤???
XReadBitmapFile ?ϥ??顼 BadAlloc ?? BadDrawable ???????Ȥ????롣
?ؿ? XReadBitmapFileData ?? XReadBitmapFile ??Ʊ???褦?˥ӥåȥޥåפ??ޤ??ե????????ɤ߹??ब???????????? ?ԥå????ޥåפ???????????ľ?ܥǡ??????֤??? ?ӥåȥޥåפΥǡ????? data_return ???֤????롣???饤?????ȤϤ??? ?ǡ??????Ȥ??????ä????ϡ? XFree ???Ȥäƥ??????????????ʤ????Фʤ??ʤ??? ???ơ????????ͤ??֤??????ѿ??ˤĤ??Ƥ? XReadBitmapFile ??Ʊ???Ǥ??롣
The ?ؿ? XWriteBitmapFile ?ϥӥåȥޥåפ? X ?С??????? 11 ?Υե????ޥåȤǥե??????˽Ф??? ???ϥե????????ǻȤ??????ӥåȥޥåפ?̾???ϡ??ե?????̾???? ?ǥ??쥯?ȥ???ʬ???????????????Τ????????????롣 ?ե??????ϸ??ߤΥ????????Υ????ǥ??ǽ??Ϥ????롣 ?????ե????????ʤ??ä??????ϡ????δؿ??? BitmapOpenFailed ???֤??? ??ʬ?ʥ??????????????Ƥ????ʤ??ä??????ϡ? XWriteBitmapFile ?? BitmapNoMemory ???֤??? ?????ʳ??ξ??硢?Ĥޤꥨ?顼???????ʤ??ä??????ˤϡ????δؿ??? BitmapSuccess ???֤??? x_hot ?? y_hot ?? -1, -1 ?Ǥʤ????硢 XWriteBitmapFile ?Ϥ????????ӥåȥޥåפΥۥåȥ??ݥåȺ?ɸ?Ȥ??ƽ??Ϥ??롣
XWriteBitmapFile ?ϥ??顼 BadDrawable, BadMatch ???????Ȥ????롣
?ؿ? XCreatePixmapFromBitmapData ??Ϳ?????줿?????Υԥå????ޥåפ????????????θ??? XPutImage ???Ȥäƥӥåȥޥå????Υǡ????Υԥå????ޥåפ˽??ࡣ ???ο????ϡ????ꤷ???ɥ??????֥????б????륹????????б????Ƥ??ʤ??? ?Фʤ??ʤ????б????Ƥ??ʤ????С????顼 BadMatch ?Ȥʤ롣
XCreatePixmapFromBitmapData ?ϥ??顼 BadAlloc, BadMatch ???????Ȥ????롣
?ؿ? XCreateBitmapFromData ???Ȥ??ȡ??ӥåȥޥåפ??¹Ի??˥ե????뤫???ɤ߹????ΤǤϤʤ??? XWriteBitmapFile ?ǽФ????ӥåȥޥåץե?????(X ?С???????11?????Τ?)??( #include ???Ȥä?) C ?Υץ??????????˴ޤ??뤳?Ȥ??Ǥ??롣 ???Υץ??????????? gray ?Ȥ????ӥåȥޥåפ????????ΤǤ??롣
#include "gray.bitmap" Pixmap bitmap; bitmap = XCreateBitmapFromData(display, window, gray_bits, gray_width, gray_height);
??ʬ?ʺ????ѥ??????ΰ??????????Ƥ????ʤ??ä????硢 XCreateBitmapFromData ?? None ???֤??? ?ӥåȥޥåפ??Ȥ??????ä????? XFreePixmap ???ȤäƤ??????????????Τϥ??饤?????Ȥ???Ǥ?Ǥ??롣
XCreateBitmapFromData ?ϥ??顼 BadAlloc ???????Ȥ????롣
?֤???¶
- BadAlloc
- ?ᤵ?줿??????䥵???Х??????γ??????Ƥ˥????Ф????Ԥ?????
- BadDrawable
- Drawable ???ΰ????????ͤ????????????Ƥ??? Window ?? Pixmap ???ؤ??Ƥ??ʤ???
- BadMatch
- InputOnly ?Υ??????ɥ??? Drawable ?Ȥ??ƻ??Ѥ??줿??
??Ϣ????¶
XCreatePixmap(3X11), XPutImage(3X11)
Xlib - C Language X Interface
Release 6.5 | X Version 11 |