Scroll to navigation

XDrawArc(3X11) XLIB FUNCTIONS XDrawArc(3X11)

̾Á°

XDrawArc, XDrawArcs, XArc - ±ß¸Ì/Âʱ߸̤ÎÉÁ²è¡¢¸Ì¤òɽ¤¹¹½Â¤ÂÎ

½ñ¼°

XDrawArc(display, d, gc, x, y, width, height, angle1, angle2)
Display *display;
Drawable d;
GC gc;
int x, y;
unsigned int width, height;
int angle1, angle2;

XDrawArcs(display, d, gc, arcs, narcs)
Display *display;
Drawable d;
GC gc;
XArc *arcs;
int narcs;

°ú¤­¿ô

¸Ì¤ÎÃæ¿´¤È3»þ¤Î°ÌÃÖ¤ò·ë¤ó¤ÀÀþ¤ò´ð½à¤È¤·¤Æ¸Ì¤Î³«»Ï³Ñ¤ò»ØÄꤹ¤ë¡£ ñ°Ì¤Ï¸ÌÅÙ(degree)*64¤Ç¤¢¤ë¡£
¸Ì¤Î³«»Ï³Ñ¤«¤é¤Î³ÑÅ٤Ǹ̤ε°ÀפÈÎΰè¤ò»ØÄꤹ¤ë¡£ ñ°Ì¤Ï¸ÌÅÙ*64¤Ç¤¢¤ë¡£
¸Ì¤ÎÇÛÎó¤ò»ØÄꤹ¤ë¡£
¥É¥í¥¦¥¢¥Ö¥ë¤ò»ØÄꤹ¤ë¡£
X ¥µ¡¼¥Ð¤Ø¤ÎÀܳ¤ò»ØÄꤹ¤ë¡£
GC ¤ò»ØÄꤹ¤ë¡£
ÇÛÎóÃæ¤Î¸Ì¤Î¿ô¤ò»ØÄꤹ¤ë¡£

Éý¤È¹â¤µ¤ò»ØÄꤹ¤ë¡£ ¤³¤ì¤Ï¸Ì¤ÎĹ¼´¤Èû¼´¤Ç¤¢¤ë¡£

x, y ºÂɸ¤ò»ØÄꤹ¤ë¡£ ¤³¤ì¤Ï¥É¥í¥¦¥¢¥Ö¥ë¤Î¸¶ÅÀ¤«¤é¤ÎÁêÂкÂɸ¤Ç¤¢¤ê¡¢±ß¸Ì¤ò°Ï¤àĹÊý·Á¤Îº¸¾å¶ù ¤ÎºÂɸ¤Ç¤¢¤ë¡£

ÀâÌÀ

´Ø¿ô XDrawArc ¤ÏñÆȤαߤ¢¤ë¤¤¤ÏÂʱߤθ̤òÉÁ²è¤·¡¢ XDrawArcs ¤ÏÊ£¿ô¤Î±ß¤¢¤ë¤¤¤ÏÂʱߤθ̤òÉÁ²è¤¹¤ë¡£ ¤Ï ¤½¤ì¤¾¤ì¤Î¸Ì¤ÏĹÊý·Á¤È2¤Ä¤Î³ÑÅ٤ǻØÄꤵ¤ì¤ë¡£ ±ß¡¢¤¢¤ë¤¤¤ÏÂʱߤθ̤ÎÃæ¿´¤ÏĹÊý·Á¤ÎÃæ¿´¤Ç¤¢¤ê¡¢Ä¹¼´¤Èû¼´¤ÏĹÊý·Á¤ÎÉý ¤È¹â¤µ¤Ç»ØÄꤹ¤ë¡£ Àµ¤Î³ÑÅÙ¤ÏÈ¿»þ·×¼þ¤ê¤Î¸þ¤­¤ò¼¨¤·¡¢Éé¤Î³ÑÅ٤ϻþ·×¼þ¤ê¤Î¸þ¤­¤ò¼¨¤¹¡£ angle2 ¤ÎÂ礭¤µ¤¬360Åٰʾå¤Î¾ì¹ç¡¢ XDrawArc ¤ä XDrawArcs ¤Ï¤³¤Î³ÑÅÙ¤ò360Å٤˽̤á¤ë¡£

[x,y,width,height,angle1,angle2] , [x+width2,y+height2] , [x,y+height2] and [x+width,y+height2] [x+width2,y] and [x+width2,y+height] . [x,y,width,height,angle1,angle2] ¤Ç»ØÄꤵ¤ì¤ë¸Ì¤Î¾ì¹ç¡¢ Ĺ¼´¤Èû¼´¤Î¸¶ÅÀ¤Ï [x+width2,y+height2] ¤Ç¤¢¤ë¡£¤Þ¤¿¡¢±ß¤äÂʱߤÎ̵¸Â¤ËºÙ¤¤µ°Àפϲ£¼´¤È¤Ï
[x,y+height2] ¤È [x+width,y+height2] ¤Ç¸ò¤ï¤ê¡¢½Ä¼´¤È¤Ï [x+width2,y]
[x+width2,y+height] ¤Ç¸ò¤ï¤ë¡£ ¤³¤ì¤é¤ÎºÂɸ¤Ï¾®¿ô¤Ç¤¢¤ê¡¢Î¥»¶Åª¤ÊºÂɸ¤Ë¤Ï´Ý¤á¤é¤ì¤Ê¤¤¡£ µ°ÀפϿô³ØŪ¤Ë¸·Ì©¤ËÄêµÁ¤¹¤Ù¤­¤Ç¤¢¤ë¡£ Éý lw ¤ò»ý¤ÄÀþ¤Î¾ì¹ç¡¢Åɤê¤Ä¤Ö¤·¤ÎÎسÔÀþ¤Ï¡¢±ß/Âʱߤε°Àפ«¤é¤Îµ÷Î¥¤¬ lw/2(¤³¤ì¤Ï¾®¿ô¤Ë¤Ê¤êÆÀ¤ë) ¤ËÅù¤·¤¤ÅÀ¤«¤é¤Ê¤ë2¤Ä¤Î̵¸Â¤ËºÙ¤¤µ°Àפˤè¤Ã ¤ÆÍ¿¤¨¤é¤ì¤ë¡£ ¸Ì¤ÎüÅÀ¤Ë¤Ä¤¤¤Æ¤Ï¡¢¤½¤Î±ß/ÂʱߤÎÀÜÀþ¤ËÂФ¹¤ë cap_style ¤ä join_style ¤ÈƱ¤¸¤â¤Î¤¬ÍѤ¤¤é¤ì¤ë¡£

[x,y,width,height,angle1,angle2] , [x,y,width,height,angle1,angle2] ¤Ç»ØÄꤵ¤ì¤ë¸Ì¤Î¾ì¹ç¡¢ ¤³¤Î³ÑÅ٤ϼºݤˤÏÏĤó¤Ç¤¤¤ëÂʱߤκÂɸ·Ï¤ÇÄêµÁ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤(±ß¤Î ¾ì¹ç¤Ë¤Ï¡¢³ÑÅ٤ȺÂɸ·Ï¤Ï°ìÃפ·¤Æ¤¤¤ë)¡£ ¤³¤ì¤é¤Î³ÑÅ٤ȥ¹¥¯¥ê¡¼¥ó¤ÎÄ̾ï¤ÎºÂɸ·Ï¤Çɽ¸½¤µ¤ì¤ë³ÑÅÙ(ʬÅÙ´ï¤Ç¬¤ë¤è ¤¦¤Ê³ÑÅÙ)¤Î´Ø·¸¤Ï¼¡¼°¤Çɽ¤µ¤ì¤ë¡£


skewed-angle=atantan(normal-angle)*widthheight+adjust



[0,2π] and where atan [π2,π2] skewed-angle ¤È normal-angle ¤ÏÈϰϤ¬ [0,2π] ¤Î¥é¥¸¥¢¥ó(64 ¤Ç³ä¤Ã¤¿¸ÌÅ٤ǤϤʤ¤)¤Çɽ¤µ¤ì¤ë¡£¤³¤Î³ÑÅ٤Υ¢¡¼¥¯¥¿¥ó¥¸¥§¥ó¥È¤ÏÈÏ°Ï [π2,π2] ¤òÊÖ¤¹¡£¤Þ¤¿¡¢adjust ¤Ï°Ê²¼¤ÎÃͤò¼è ¤ë¡£


0

	for normal-angle in the range 

[0,π2]


π

	for normal-angle in the range 

[π2,3π2]


2π

	for normal-angle in the range 

[3π2,2π]


0

	Ä̾ï¤Î³ÑÅÙ¤¬ 

[0,π2]

 ¤ÎÈϰϤˤ¢¤ë¾ì¹ç

π

	Ä̾ï¤Î³ÑÅÙ¤¬ 

[π2,3π2]

 ¤ÎÈϰϤˤ¢¤ë¾ì¹ç

2π

	Ä̾ï¤Î³ÑÅÙ¤¬ 

[3π2,2π]

 ¤ÎÈϰϤˤ¢¤ë¾ì¹ç


Í¿¤¨¤é¤ì¤¿¸Ì¤Ë¤Ä¤¤¤Æ¡¢ XDrawArc ¤È XDrawArcs ¤Ï¡¢1¤Ä¤Î¥Ô¥¯¥»¥ë¤ò1ÅÙ¤·¤«ÉÁ²è¤·¤Ê¤¤¡£ Àµ¤·¤¯Àܳ¤·¤Æ¤¤¤ë2¤Ä¤Î¸Ì¤ÎÉý¤¬ 0 ¤è¤êÂ礭¤¯¡¢¸Ì¤¬¸ò¤ï¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë ¤Ï¡¢ XDrawArc ¤È XDrawArcs ¤Ï¡¢1¤Ä¤Î¥Ô¥¯¥»¥ë¤ò1ÅÙ¤·¤«ÉÁ²è¤·¤Ê¤¤¡£ ¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¡¢¸ò¤ï¤Ã¤Æ¤¤¤ë¸Ì¤Î¥Ô¥¯¥»¥ë¤ÏÊ£¿ô²óÉÁ²è¤µ¤ì¤ë¡£ ¤¢¤ëüÅÀ¤«¤é»þ·×¼þ¤ê¤Ë»ØÄꤷ¤¿¸Ì¤È¾Êý¤ÎüÅÀ¤«¤éÈ¿»þ·×¼þ¤ê¤ËƱ¤¸³ÑÅÙ¤ò »ØÄꤷ¤¿¸Ì¤Ï¡¢Àܳ¤Ë°ã¤¤¤¬½Ð¤ë°Ê³°¤ÏƱ¤¸¥Ô¥¯¥»¥ë¤òÉÁ²è¤¹¤ë¡£

¤¢¤ë¸Ì¤Î½ªÅÀ¤È¼¡¤Î¸Ì¤ÎºÇ½é¤ÎÅÀ¤¬°ìÃפ·¤¿¾ì¹ç¡¢2¤Ä¤Î¸Ì¤ÏÀµ¤·¤¯Àܳ¤µ¤ì ¤ë¡£ ºÇ½é¤Î¸Ì¤ÎºÇ½é¤ÎÅÀ¤ÈºÇ¸å¤Î¸Ì¤ÎºÇ¸å¤ÎÅÀ¤¬°ìÃפ¹¤ë¾ì¹ç¡¢2¤Ä¤Î¸Ì¤ÏÀµ¤·¤¯ Àܳ¤µ¤ì¤ë¡£ 1¤Ä¤Î¼´¤Ë 0 ¤ò»ØÄꤹ¤ì¤Ð¡¢¿åÊ¿¤ÊÀþ¤«¿âľ¤ÊÀþ¤òÉÁ¤¯¤³¤È¤¬¤Ç¤­¤ë¡£ ³ÑÅÙ¤Ïñ¤ËºÂɸ·Ï¤Ë´ð¤Å¤¤¤Æ·×»»¤µ¤ì¡¢¥¢¥¹¥Ú¥¯¥ÈÈæ¤Ï̵»ë¤µ¤ì¤ë¡£

¤É¤Á¤é¤Î´Ø¿ô¤â°Ê²¼¤Î GC ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò»ÈÍѤ¹¤ë¡£ function, plane-mask, line-width, line-style, cap-style, join-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. They also use these GC mode-dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dash-list.

XDrawArc ¤È XDrawArcs ¤Ï¥¨¥é¡¼ BadDrawable, BadGC, BadMatch ¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë¡£

¹½Â¤ÂÎ

XArc ¹½Â¤ÂΤÎÆâÍƤò¼¨¤¹¡£

typedef struct {
	short x, y;
	unsigned short width, height;
	short angle1, angle2;             
} XArc;


x, y ¥á¥ó¥Ð¤ÏÉä¹æÉÕ¤­¤ÎÀ°¿ô¤Ç¤¢¤ë¡£ width, height ¥á¥ó¥Ð¤Ï16¥Ó¥Ã¥È¤ÎÉä¹æ¤Ê¤·À°¿ô¤Ç¤¢¤ë¡£ ¥×¥í¥È¥³¥ë¤Ï¤³¤ì¤é¤ÎÃͤˤĤ¤¤Æ16¥Ó¥Ã¥È¤Î¥Õ¥£¡¼¥ë¥É¤·¤«»ý¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢ ºÂɸ¤ä¥µ¥¤¥º¤¬16¥Ó¥Ã¥È¤ÎÈϰϤò±Û¤¨¤Ê¤¤¤è¤¦¤ËÃí°Õ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£

ÊÖ¤êÃÍ

°ú¤­¿ô Drawable ¤ÎÃͤ¬¡¢ÄêµÁ¤µ¤ì¤Æ¤¤¤ë Window ¤ä Pixmap ¤ò»Ø¤·¤Æ¤¤¤Ê¤¤¡£
°ú¤­¿ô GContext ¤ÎÃͤ¬¡¢ÄêµÁ¤µ¤ì¤Æ¤¤¤ë GContext ¤ò»Ø¤·¤Æ¤¤¤Ê¤¤¡£
InputOnly ¤Î¥¦¥£¥ó¥É¥¦¤¬¥É¥í¥¦¥¢¥Ö¥ë¤È¤·¤Æ»ØÄꤵ¤ì¤¿¡£
°ú¤­¿ô¤ä°ú¤­¿ô¤ÎÁȤÏÀµ¤·¤¤·¿¡¦ÈϰϤò»ý¤Ã¤Æ¤¤¤ë¤¬¡¢¤½¤Î¥ê¥¯¥¨¥¹¥È¤¬Í׵᤹¤ë ¾¤Î¾ò·ï¤ËŬ¹ç¤Ç¤­¤Ê¤«¤Ã¤¿¡£

´ØÏ¢¹àÌÜ

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

Release 6.5 X Version 11