Scroll to navigation

XCreateImage(3X11) XLIB FUNCTIONS XCreateImage(3X11)

̾??

XInitImage, XCreateImage, XGetPixel, XPutPixel, XSubImage, XAddPixel, XDestroyImage - ???᡼???ѥ桼?ƥ????ƥ?

????

Status XInitImage(image)
XImage *image;

XImage *XCreateImage(display, visual, depth, format, offset, data, width, height, bitmap_pad,
bytes_per_line)
Display *display;
Visual *visual;
unsigned int depth;
int format;
int offset;
char *data;
unsigned int width;
unsigned int height;
int bitmap_pad;
int bytes_per_line;

unsigned long XGetPixel(ximage, x, y)
XImage *ximage;
int x;
int y;

XPutPixel(ximage, x, y, pixel)
XImage *ximage;
int x;
int y;
unsigned long pixel;

XImage *XSubImage(ximage, x, y, subimage_width, subimage_height)
XImage *ximage;
int x;
int y;
unsigned int subimage_width;
unsigned int subimage_height;

XAddPixel(ximage, value)
XImage *ximage;
long value;

XDestroyImage(ximage)
XImage *ximage;

??????

?????????饤???κǾ?ñ??(8, 16, 32 ?Τ????줫)?????ꤹ?롣 ?????ؤ????С????饤?????ȤΥ????????Ǥϡ??????????饤??????Ƭ?ϼ??? ?????????饤??????Ƭ?Ȥ??Υӥåȿ????????ܤ???Υ???Ƥ??롣
???饤?????ȤΥ??᡼?????ǤΡ????륹???????饤??????Ƭ?ȼ??? ?????????饤??????Ƭ?δ֤ΥХ??ȿ??????ꤹ?롣
???᡼???ǡ????????ꤹ?롣
???᡼???ο????????ꤹ?롣
X ?????Фؤ???³?????ꤹ?롣
???᡼???η????????ꤹ?롣 XYBitmap, XYPixmap, ZPixmap ?Τ????줫???????Ǥ??롣
???᡼???ι⤵???????ԥ????????ǻ??ꤹ?롣
?????????饤??????Ƭ??̵?뤹???ӥåȿ??????ꤹ?롣
???????ԥ??????ͤ????ꤹ?롣
?????????֥??᡼???ι⤵?Υԥ????????????ꤹ?롣
?????????֥??᡼???????Υԥ????????????ꤹ?롣
?û????????????????ꤹ?롣
Visual ??¤?Τ????ꤹ?롣
???᡼?????????ԥ????????ǻ??ꤹ?롣
???᡼???????ꤹ?롣

x, y ??ɸ?????ꤹ?롣

????

?ؿ? XInitImage ?ϥ??᡼????¤?Τ????????᡼???????롼?????ν????????Ԥ??????ν??????? ??¤?ΤγƼ??????Ф??ͤ˴??Ť??ƹԤ????롣 ?????롼?????ʳ??????ƤΥե??????ɤϴ??˽??????????Ƥ??ʤ????Фʤ??ʤ??? bytes_per_line ?????Ф? 0 ?ξ??硢 XInitImage ?ϥ??᡼???ǡ???????????????Ϣ³?Ǥ????Ȳ??ꤷ??¾?Υ????Ф??Ȥä? bytes_per_line ??Ŭ?ڤ??ͤ????ꤹ?롣?????Ǥʤ??????ˤϡ? bytes_per_line ???ѹ??????ʤ??? ???Ƥ??????롼?????ϡ???¤?ΤλĤ?????ʬ?ǻ??ꤵ?줿???Υ??᡼???????? ???뤿???? Xlib ?Υ??᡼???????ؿ???ɬ?פȤ????ؿ??˽??????????롣

???饤?????Ȥ????᡼?????????????????ϡ????Υ??᡼????¾?? Xlib ?ؿ??? ?Ϥ?????ɬ?????δؿ????ƤФʤ????Фʤ??ʤ??? Xlib ?????????뤤???֤??????᡼????¤?Τξ????ϡ????Τ褦?ʽ???????ɬ ?פʤ???

???δؿ??Ϲ?¤?Τν????????????????? 0 ?Ǥʤ????ơ????????֤??????顼 ?????????????乽¤?Τ?̷?⤬???Ĥ??ä??????ˤϡ????δؿ??? 0 ???֤??? ???ξ????ˤϥ??᡼?????ѹ??????ʤ???

?ؿ? XCreateImage ?ϡ????ꤷ???ǥ????ץ쥤?ˤ????? XImage ??ɬ?פʥ??????????????Ƥ롣???????????᡼?????Τ??ΤΤ????Υ??????? ???????Ƥʤ??? ???δؿ??ϥ??????γ??????Ƥȸ????????⡢?ǥ????ץ쥤???깽¤?ΤΥХ??Ƚ硢 ?ӥåȽ硢?ӥåȥޥåפδ???ñ??(bitmap-unit)???????????? XImage ??¤?ΤؤΥݥ??󥿤??֤????ΤǤ??롣 red, green, blue ?ޥ????ͤ? Z ?ե????ޥåȤΥ??᡼?????Ф??ƤΤ????? ?????롣?????????ͤϼ??????ä? Visual ?????????????롣 ????¾???ͤ??Ϥ????뤳?Ȥ????롣 ?????? offset ???Ȥ??ȳƥ????????饤??????Ƭ?˰?ư????ɬ?פ??ʤ??Τǡ? ???᡼??????®??ɽ???Ǥ??롣 bytes_per_line ?? 0 ?????ꤷ?????硢Xlib ?ϥ????????饤???ϥ????????? Ϣ³?Ǥ??????ΤȲ??ꤷ?? bytes_per_line ???ͤ??׻????롣

XCreateImage, XGetImage, XSubImage ???Ȥäƥ??᡼???????????????硢?ؿ? XDestroyImage ???ƤӽФ????᡼???˴??μ?³???ϥ??᡼????¤?ΤȤ??줬?ؤ??ǡ?????ξ?? ?????????????????դ??뤳?ȡ?

?ԥ??????μ??????ԥ??????????ꡢ???֥??᡼?????????????᡼???ؤ? ???????ɲä˻Ȥ????????ܴؿ??ϥ??᡼?????֥????????????????????롣 ???ξϤδؿ??ϡ??ºݤˤϥ??᡼?????֥??????????δؿ????ƤӽФ??ޥ????? ???ꡢ <X11/Xutil.h> ???????????Ƥ??롣

?ؿ? XGetPixel ?ϻ??ꤷ?????᡼???λ??ꤷ?????֤Υԥ??????ͤ??֤??? ?֤??????ԥ??????ͤ??????????줿?ե????ޥåȤǤ???(?Ĥޤ? long ?κDz??̥Х??Ȥ??ԥ??????κDz??̥Х??ȤȤʤ?)?? ???᡼???? x, y ??ɸ?????äƤ??ʤ??ƤϤʤ??ʤ???

?ؿ? XPutPixel ?ϡ????ꤷ?????᡼?????Υԥ??????????ꤷ???ԥ??????ͤǾ??񤭤??롣 ???Ϥ????ԥ??????ͤ??????????줿?ե????ޥåȤǤʤ??ƤϤʤ??ʤ?(?Ĥޤ? long ?κDz??̥Х??Ȥ??ԥ??????κDz??̥Х??ȤȤʤ?)?? ???᡼???? x, y ??ɸ?????äƤ??ʤ??ƤϤʤ??ʤ???

?ؿ? XSubImage ?ϴ?¸?Υ??᡼???ΰ???ʬ?Ǥ??륤?᡼???򿷤??????롣 ???δؿ??Ͽ????? XImage ??¤?Τ?ɬ?פʥ??????????????ơ??????????᡼???ؤΥݥ??󥿤??֤??? ?ǡ????ϸ??Υ??᡼?????饳?ԡ??????롣 ?ޤ??????᡼???? x, y, subimage_width, subimage_height ???ޤޤʤ??Ƥ? ?ʤ??ʤ???

?ؿ? XAddPixel ?ϥ??᡼?????????ƤΥԥ??????ͤ????????ä??롣 ???δؿ??ϡ????꥽?????????????Ƥ??????ԥ??????ͤ????äƤ??ơ? ???᡼???򤽤η????ˤ???ɬ?פ??????Ȥ????????Ǥ??롣

?ؿ? XDestroyImage ?? XImage ???б????????????????????롣

??Ϣ????

XPutImage(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11