Scroll to navigation

XDrawLine(3X11) XLIB FUNCTIONS XDrawLine(3X11)

̾??

XDrawLine, XDrawLines, XDrawSegments, XSegment - ????¿?ѷ??????衢????ɽ????¤??

????

XDrawLine(display, d, gc, x1, y1, x2, y2)
Display *display;
Drawable d;
GC gc;
int x1, y1, x2, y2;

XDrawLines(display, d, gc, points, npoints, mode)
Display *display;
Drawable d;
GC gc;
XPoint *points;
int npoints;
int mode;

XDrawSegments(display, d, gc, segments, nsegments)
Display *display;
Drawable d;
GC gc;
XSegment *segments;
int nsegments;

??????

?ɥ??????֥?(drawable)?????ꡣ
X ?????Фؤ???³?????ꡣ
GC ?????ꡣ
??ɸ?⡼?ɤ????ꡣ CoordModeOrigin ?? CoordModePrevious ?Τ????줫?????ꤹ?롣
???????????ο??????ꡣ
??????????ʬ?ο??????ꡣ
?????????????ꡣ
??ʬ???????????ꡣ



???Ƿ??Ф????? (x1, y1) ?? (x2, y2) ?????ꡣ

????

?ؿ? XDrawLine ?ϻ??ꤵ?줿 GC ?Υ????ݡ??ͥ??Ȥ??Ȥ??????ꤵ?줿?????? (x1, y1) ?? (x2, y2) ?????????????褹?롣 ???δؿ??ϰ??פ???ü??????³?ϹԤ??ʤ??? Ϳ?????줿Ǥ?դ??????Ф??ơ? XDrawLine ??1?٤??????????????Ԥ??ʤ??? ?????򺹤??????硢?????Υԥ???????ʣ???????褵???롣

?ؿ? XDrawLines ?ϡ????ꤷ?? GC ?Υ????ݡ??ͥ??Ȥ??Ȥ??? XPoint ??¤?Τ????󤬼????????? (point[i], point[i+1]) ?????? npoints-1 ?Ĥ? ?????????? ???δؿ????????????äƤ??????????????褹?롣 ???֤??????Ƥˤ???????ʬ??????????³???졢?ǽ??????ȺǸ??????????פ??? ?????кǽ??ȺǸ???????????????³?????롣 Ϳ?????줿Ǥ?դ????ˤĤ??ơ? XDrawLines ??1?ĤΥԥ???????2?ٰʾ????褷?ʤ??? ?٤?(line-width ?? 0 ??)?????򺹤??Ƥ??????硢?򺹤??Ƥ???????ʣ???? ???褵???롣 ?????????????򺹤??Ƥ????????ϡ??򺹤??Ƥ????ԥ???????1?٤??????褵???롣 ?Ĥޤꡢ???????????Τ? PolyLine ?ץ??ȥ????ꥯ?????Ȥ?ñ???Ρ??ɤ??Ĥ֤????Ф??????ΤǤ??뤫?Τ褦?˽? ???????롣 CoordModeOrigin ?ξ????????Ƥκ?ɸ?ͤϸ????????????к?ɸ?Ȥʤꡢ CoordModePrevious ?ξ????ˤϡ??ǽ????????????κ?ɸ?????????????????????к?ɸ?Ȥʤ롣

XDrawSegments ?ؿ???ʣ???Ρ???³?????Ƥ??ʤ????????褹?롣 ????ʬ???Ф??ơ? XDrawSegments ???? (x1, y1) ?? (x2, y2) ???????????????? ???δؿ??? XSegment ??¤?Τ??????????äƤ??????????????褹?롣???פ???ü??????³?ϹԤ??ʤ??? ???????ˤĤ??ơ? XDrawSegments ??1?ĤΥԥ???????1?٤??????褷?ʤ??? ?????򺹤??Ƥ????????ϡ??򺹤??Ƥ????ԥ???????ʣ???????褵???롣

??????3?Ĥδؿ????Ȥ? GC ?????ݡ??ͥ??Ȥϰʲ??Ǥ??롣 function, plane-mask, line-width, line-style, cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, clip-mask. ?ؿ? XDrawLines ?ϡ?GC ?? join-style ?????ݡ??ͥ??Ȥ????Ѥ??롣 ??????3?Ĥδؿ??ϡ??ʲ??? GC ?⡼?ɰ?¸?Υ????ݡ??ͥ??Ȥ????Ѥ??롣 foreground, background, tile, stipple, tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dash-list.

XDrawLine, XDrawLines, XDrawSegments ?ϥ??顼 BadDrawable, BadGC, BadMatch ?򵯤??????Ȥ????롣 XDrawLines ?Ϥ????? BadValue ?ⵯ???????Ȥ????롣

??¤??

XSegment ??¤?Τ????Ƥ򼨤???

typedef struct {
	short x1, y1, x2, y2;
} XSegment;


???Ƥ? x, y ?????Ф??????դ??????Ǥ??롣 width, height ?????Ф?16?ӥåȤ?????̵???????Ǥ??롣 ?ץ??ȥ????ǤϤ????????ͤ?16?ӥåȤΥե??????ɤ????????ʤ??Τǡ?16?ӥ? ?Ȥ??ϰϤ??ۤ?????ɸ?䥵?????????????ʤ??褦???դ??ʤ????Фʤ??ʤ???

?֤???

?????? Drawable ???ͤ????????????Ƥ??? Window ?? Pixmap ???ؤ??Ƥ??ʤ???
?????? GContext ???ͤ????????????Ƥ??? GContext ???ؤ??Ƥ??ʤ???
InputOnly ?Υ??????ɥ????ɥ??????֥??Ȥ??ƻ??ꤵ?줿??
?????????????????Ȥ????????????ϰϤ????äƤ??뤬?????Υꥯ?????Ȥ??׵᤹?? ¾?ξ?????Ŭ???Ǥ??ʤ??ä??? BadValue ???ꤵ?줿???ͤˡ??ꥯ?????Ȥε????ϰϤ??ۤ??Ƥ??????Τ????롣?????????? ???????????ϰϤ????ꤵ???Ƥ??ʤ????С????????η????????????Ƥ??????Ƥ??? ?Ϥ????????롣???????Ȥ????????????Ƥ??????????Ϥ??Υ??顼?򵯤??????Ȥ? ???롣

??Ϣ????

XDrawArc(3X11), XDrawPoint(3X11), XDrawRectangle(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11