other versions
- wheezy 4.1.0.20011224-6
XFillRectangle(3X11) | XLIB FUNCTIONS | XFillRectangle(3X11) |
名前¶
XFillRectangle, XFillRectangles, XFillPolygon, XFillArc, XFillArcs - 長方形、多角形、円弧を塗りつぶす書式¶
XFillRectangle( display, d, gc, x, y, width, height)Display * display;
Drawable d;
GC gc;
int x, y;
unsigned int width, height; XFillRectangles( display, d, gc, rectangles, nrectangles)
Display * display;
Drawable d;
GC gc;
XRectangle * rectangles;
int nrectangles; XFillPolygon( display, d, gc, points, npoints, shape, mode)
Display * display;
Drawable d;
GC gc;
XPoint * points;
int npoints;
int shape;
int mode; XFillArc( 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; XFillArcs( display, d, gc, arcs, narcs)
Display * display;
Drawable d;
GC gc;
XArc * arcs;
int narcs;
引き数¶
- angle1
- 開始角を指定する。 基準は円の中央から3時の方向であり、単位は弧度 * 64である。
- angle2
- 開始角に対して弧の軌跡と領域を指定する。 単位は弧度*64である。
- arcs
- 円弧の配列を指定する。
- d
- ドロウアブルを指定する。
- display
- X サーバへの接続を指定する。
- gc
- GC を指定する。
- mode
- 座標モードを指定する。 CoordModeOrigin あるいは CoordModePrevious を渡すことができる。
- narcs
- 配列中の円弧の数を指定する。
- npoints
- 配列中の点の数を指定する。
- nrectangles
- 配列中の長方形の数を指定する。
- points
- 点の配列を指定する。
- rectangles
- 長方形の配列を指定する。
- shape
- サーバの効率向上の補助をするための形状を指定する。 Complex, Convex, Nonconvex のいずれかを渡すことができる。
- width
-
- height
- 幅と高さを指定する。
- x
-
- y
- x, y 座標を指定する。
説明¶
関数 XFillRectangle および XFillRectangles は、4点[x,y] [x+width,y] [x+width,y+height] [x,y+height]についての FillPolygon プロトコルリクエストが指定されたかのように、指定した長方形(単数あるい は複数)を塗りつぶす。 どちらの関数も、指定された x, y 座標・幅と高さ・GC を使う。 XFillRectangles は配列内で列挙されている順に長方形を塗りつぶす。 どんな長方形を与えても、 XFillRectangle および XFillRectangles は1つのピクセルを1回しか描画しない。 長方形が重なっている場合、重なっている部分は複数回描画される。 どちらの関数も以下の GC コンポーネントを使用する: function, plane-mask, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask。 これらはまた、以下の GC モード依存のコンポーネントを使用する: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin。 XFillRectangle および XFillRectangles はエラー BadDrawable, BadGC, BadMatch を起こすことがある。 XFillPolygon は指定されたパスで閉じた領域を塗りつぶす。 リストの最後の点が最初の点と一致しない場合には、パスは自動的に閉じられる。 XFillPolygon は、ある1つのピクセル領域について1回しか描画しない。 CoordModeOrigin では全ての座標を原点からの相対位置で表し、 CoordModePrevious では全ての座標を前の点からの相対位置で表す。 指定した shape によっては、以下のことが起こる:
- •
- もし shape が Complex ならば、パスは自己干渉するかもしれない。 パス上で隣接する点が一致しても、これは自己干渉として扱わない。
- •
- shape が Convex (凸包)の場合には、多角形の内側の任意の点の組について、これらを繋ぐ線分 はパスと干渉しない。 凸包になることをクライアントが知っている場合、 Convex を指定することで効率を高めることができる。 凸包でないパスに対して Convex を指定した場合、表示結果は未定義である。
- •
- shape が Nonconvex の場合、パスは自己干渉しないが、かならずしも凸包ではない。 これをクライアントが知っている場合、 Complex でなく Nonconvex を指定することで描画効率を上げることができる。 If you specify パスが自己干渉している場合に Nonconvex を指定した場合の表示結果は未定義である。
返り値¶
- BadDrawable
- 引き数 Drawable の値が、定義されている Window あるいは Pixmap を指してい ない。
- BadGC
- 引き数 GContext の値が、定義されている GContext を指していない。
- BadMatch
- InputOnly ウィンドウが Drawable として使用された。
- BadMatch
- 引き数や引き数の組の型・範囲は正しいが、そのリクエストが要求す る他の条件に適合できなかったものがある。
- BadValue
- 指定された数値に、リクエストの許容範囲を越えているものがある。引き数に対 して特定の範囲が指定されていなければ、引き数の型で定義されている全ての範 囲が許される。選択肢として定義されている引き数はこのエラーを起こすことが ある。
関連項目¶
XDrawArc(3X11), XDrawPoint(3X11), XDrawRectangle(3X11)Release 6.5 | X Version 11 |