## Tcl9.0.3/Tk9.0.3 Documentation > Tk C API > 3DBorder

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

  NAME
    Tk_Alloc3DBorderFromObj, Tk_ClipDrawableToRect, Tk_DrawHighlightBorder, Tk_Get3DBorder, Tk_Get3DBorderColors, Tk_Get3DBorderFromObj, Tk_Draw3DRectangle, Tk_Fill3DRectangle, Tk_Draw3DPolygon, Tk_Fill3DPolygon, Tk_3DVerticalBevel, Tk_3DHorizontalBevel, Tk_SetBackgroundFromBorder, Tk_NameOf3DBorder, Tk_3DBorderColor, Tk_3DBorderGC, Tk_Free3DBorderFromObj, Tk_Free3DBorder — 立体感を伴った縁の描画　 draw borders with three-dimensional appearance
  SYNOPSIS
    #include <tk.h>
    Tk_3DBorder
    Tk_Alloc3DBorderFromObj(interp, tkwin, objPtr)
    Tk_ClipDrawableToRect(display, drawable, x, y, width, height)
    Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, highlightWidth, drawable)
    Tk_3DBorder
    Tk_Get3DBorder(interp, tkwin, colorName)
    Tk_Get3DBorderColors(border, bgColorPtr, darkColorPtr, lightColorPtr)
    Tk_3DBorder
    Tk_Get3DBorderFromObj(tkwin, objPtr)
    Tk_Draw3DRectangle(tkwin, drawable, border, x, y, width, height, borderWidth, relief)
    Tk_Fill3DRectangle(tkwin, drawable, border, x, y, width, height, borderWidth, relief)
    Tk_Draw3DPolygon(tkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief)
    Tk_Fill3DPolygon(tkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief)
    Tk_3DVerticalBevel(tkwin, drawable, border, x, y, width, height, leftBevel, relief)
    Tk_3DHorizontalBevel(tkwin, drawable, border, x, y, width, height, leftIn, rightIn, topBevel, relief)
    Tk_SetBackgroundFromBorder(tkwin, border)
    const char *
    Tk_NameOf3DBorder(border)
    XColor *
    Tk_3DBorderColor(border)
    GC *
    Tk_3DBorderGC(tkwin, border, which)
    Tk_Free3DBorderFromObj(tkwin, objPtr)
    Tk_Free3DBorder(border)
  引数 ARGUMENTS
    Tcl_Interp *interp (入力in)
    Tk_Window tkwin (入力in)
    Tcl_Obj *objPtr (入力in)
    const char *colorName (入力in)
    Drawable drawable (入力in)
    Tk_3DBorder border (入力in)
    int x (入力in)
    int y (入力in)
    int width (入力in)
    int height (入力in)
    int borderWidth (入力in)
    int highlightWidth (入力in)
    int relief (入力in)
    XPoint *pointPtr (入力in)
    int numPoints (入力in)
    int polyBorderWidth (入力in)
    int leftRelief (入力in)
    int leftBevel (入力in)
    int leftIn (入力in)
    int rightIn (入力in)
    int topBevel (入力in)
    int which (入力in)
    XColor *bgColorPtr (出力out)
    XColor *darkColorPtr (出力out)
    XColor *lightColorPtr (出力out)
    GC fgGC (入力in)
    GC fgGC (入力in)
  説明 DESCRIPTION
  KEYWORDS

### NAME

Tk_Alloc3DBorderFromObj, Tk_ClipDrawableToRect, Tk_DrawHighlightBorder, Tk_Get3DBorder, Tk_Get3DBorderColors, Tk_Get3DBorderFromObj, Tk_Draw3DRectangle, Tk_Fill3DRectangle, Tk_Draw3DPolygon, Tk_Fill3DPolygon, Tk_3DVerticalBevel, Tk_3DHorizontalBevel, Tk_SetBackgroundFromBorder, Tk_NameOf3DBorder, Tk_3DBorderColor, Tk_3DBorderGC, Tk_Free3DBorderFromObj, Tk_Free3DBorder — 立体感を伴った縁の描画　 draw borders with three-dimensional appearance

### SYNOPSIS

#include <tk.h>
Tk_3DBorder
Tk_Alloc3DBorderFromObj(interp, tkwin, objPtr)
Tk_ClipDrawableToRect(display, drawable, x, y, width, height)
Tk_DrawHighlightBorder(tkwin, fgGC, bgGC, highlightWidth, drawable)
Tk_3DBorder
Tk_Get3DBorder(interp, tkwin, colorName)
Tk_Get3DBorderColors(border, bgColorPtr, darkColorPtr, lightColorPtr)
Tk_3DBorder
Tk_Get3DBorderFromObj(tkwin, objPtr)
Tk_Draw3DRectangle(tkwin, drawable, border, x, y, width, height, borderWidth, relief)
Tk_Fill3DRectangle(tkwin, drawable, border, x, y, width, height, borderWidth, relief)
Tk_Draw3DPolygon(tkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief)
Tk_Fill3DPolygon(tkwin, drawable, border, pointPtr, numPoints, polyBorderWidth, leftRelief)
Tk_3DVerticalBevel(tkwin, drawable, border, x, y, width, height, leftBevel, relief)
Tk_3DHorizontalBevel(tkwin, drawable, border, x, y, width, height, leftIn, rightIn, topBevel, relief)
Tk_SetBackgroundFromBorder(tkwin, border)
const char *
Tk_NameOf3DBorder(border)
XColor *
Tk_3DBorderColor(border)
GC *
Tk_3DBorderGC(tkwin, border, which)
Tk_Free3DBorderFromObj(tkwin, objPtr)
Tk_Free3DBorder(border)

### 引数 ARGUMENTS

Tcl_Interp *interp (入力in)
  不都合報告に使う解釈実行機能｡ Interpreter to use for error reporting.

Tk_Window tkwin (入力in)
  窓の字句解析結果( Tk_Get3DBorder を除く全ての手続函数の為に､縁が割付けられている窓の為でなければならない)｡ Token for window (for all procedures except Tk_Get3DBorder, must be the window for which the border was allocated).

Tcl_Obj *objPtr (入力in)
  背景に相当する色を記述した対象のポインタ(平滑領域)｡照らされた縁はこれより明るく､陰の縁はこれより暗い｡ Pointer to value whose value describes color corresponding to background (flat areas). Illuminated edges will be brighter than this and shadowed edges will be darker than this.

const char *colorName (入力in)
  値が､値より寧ろ文字列として供給されることを除き objPtr と同じ｡ Same as objPtr except value is supplied as a string rather than a value.

Drawable drawable (入力in)
  窓又は画素地図の為のX の字句解析結果; 図柄を何処に描くかを指し示す｡ tkwin に関する X 窓であるか､同じ画面と tkwin としての深さを有する画素地図のどちらかでなければならない｡ X token for window or pixmap; indicates where graphics are to be drawn. Must either be the X window for tkwin or a pixmap with the same screen and depth as tkwin.

Tk_3DBorder border (入力in)
  Tk_Get3DBorder.への呼出し内で前に割付られた縁の為の字句解析結果｡ Token for border previously allocated in call to Tk_Get3DBorder.

int x (入力in)
  縁か面取りを記述する矩形の左上隅の画素単位のX-座標｡ X-coordinate of upper-left corner of rectangle describing border or bevel, in pixels.

int y (入力in)
  縁か面取りを記述する矩形の左上隅の画素単位のY-座標｡ Y-coordinate of upper-left corner of rectangle describing border or bevel, in pixels.

int width (入力in)
  縁か面取りを記述する矩形の画素単位の幅｡ Width of rectangle describing border or bevel, in pixels.

int height (入力in)
  縁か面取りを記述する矩形の画素単位の高さ｡ Height of rectangle describing border or bevel, in pixels.

int borderWidth (入力in)
  縁の画素単位の幅｡正値は x, y, width, height によって与えられる矩形の内部を意味する､負数は矩形の外を意味する｡ Width of border in pixels. Positive means border is inside rectangle given by x, y, width, height, negative means border is outside rectangle.

int highlightWidth (入力in)
  もし､部品が入力焦点を受けていると､部品の外側の周りの環の巾｡ Width of ring around the outside of the widget if the widget has received the input focus.

int relief (入力in)
  対象の内部の 3-D 位置を外部に較べて指し示す; TK_RELIEF_RAISED か TK_RELIEF_SUNKEN か TK_RELIEF_GROOVE か TK_RELIEF_SOLID か TK_RELIEF_RIDGE であるべき(Tk_Fill3DRectangle には TK_RELIEF_FLAT でもよい)｡ Indicates 3-D position of interior of value relative to exterior; should be TK_RELIEF_RAISED, TK_RELIEF_SUNKEN, TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE (may also be TK_RELIEF_FLAT for Tk_Fill3DRectangle).

XPoint *pointPtr (入力in)
  多角形内の頂点の組を記述する点の配列を指す｡多角形は閉じてなくてもよい(必要な場合は自動的に閉じる)｡ Pointer to array of points describing the set of vertices in a polygon. The polygon need not be closed (it will be closed automatically if it is not).

int numPoints (入力in)
  *pointPtr に於ける点の数｡ Number of points at *pointPtr.

int polyBorderWidth (入力in)
  画素単位の縁の幅｡もし正なら､縁はpointPtr によって与えられる軌跡の左に描かれ､もし負なら､軌跡の右に描かれる｡もし leftRelief がTK_RELIEF_GROOVE か TK_RELIEF_RIDGE なら縁は軌跡の中央である｡ Width of border in pixels. If positive, border is drawn to left of trajectory given by pointPtr; if negative, border is drawn to right of trajectory. If leftRelief is TK_RELIEF_GROOVE or TK_RELIEF_RIDGE then the border is centered on the trajectory.

int leftRelief (入力in)
  多角形の経路の相対的右の側に対する左側の高さ｡ TK_RELIEF_RAISED は左側が高く見えることを意味し､ TK_RELIEF_SUNKEN は右側が高く見えることを意味する; TK_RELIEF_GROOVE と TK_RELIEF_RIDGE は外観の事を意味する[溝と峰]｡ Tk_Fill3DPolygon については､ TK_RELIEF_FLAT は高さには差異がないことを指し示す為に指定されことがある｡ Height of left side of polygon's path relative to right. TK_RELIEF_RAISED means left side should appear higher and TK_RELIEF_SUNKEN means right side should appear higher; TK_RELIEF_GROOVE and TK_RELIEF_RIDGE mean the obvious things. For Tk_Fill3DPolygon, TK_RELIEF_FLAT may also be specified to indicate no difference in height.

int leftBevel (入力in)
  非零はこの斜面は対象の左側に形成することを意味する; 零は右側を意味する｡ Non-zero means this bevel forms the left side of the value; zero means it forms the right side.

int leftIn (入力in)
  非零は水平の斜面の左縁が鋭利になる､そこで底面の縁が上辺より更に右になる｡零は縁の角度が開き､底面が上辺より更に左になる｡ Non-zero means that the left edge of the horizontal bevel angles in, so that the bottom of the edge is farther to the right than the top. Zero means the edge angles out, so that the bottom is farther to the left than the top.

int rightIn (入力in)
  非零は水平の斜面の右縁が鋭利になる､そこで底面の縁が上辺より更に左になる｡零は縁の角度が開き､底面が上辺より更に右になる｡ Non-zero means that the right edge of the horizontal bevel angles in, so that the bottom of the edge is farther to the left than the top. Zero means the edge angles out, so that the bottom is farther to the right than the top.

int topBevel (入力in)
  非零は斜面が対象の上側を形成することを意味し; 零は下側を形成することを意味する｡ Non-zero means this bevel forms the top side of the value; zero means it forms the bottom side.

int which (入力in)
  縁の図の文脈が記述されている規定｡ TK_3D_FLAT_GC か TK_3D_LIGHT_GC かTK_3D_DARK_GC かでなければならない｡ Specifies which of the border's graphics contexts is desired. Must be TK_3D_FLAT_GC, TK_3D_LIGHT_GC, or TK_3D_DARK_GC.

XColor *bgColorPtr (出力out)
  与えられた盤の背景色を保存する場所への指示子｡ Pointer to location in which to store the background color of the given border.

XColor *darkColorPtr (出力out)
  与えられた盤の暗い領域の為の色を保存する場所への指示子｡ Pointer to location in which to store the color for darker areas of the given border.

XColor *lightColorPtr (出力out)
  与えられた盤の明るい領域の為の色を保存する場所への指示子｡ Pointer to location in which to store the color for lighter areas of the given border.

GC fgGC (入力in)
  X 画像脈絡前景｡ Foreground X graphics context.

GC fgGC (入力in)
  X 画像脈絡背景｡ Background X graphics context.

### 説明 DESCRIPTION

これ等の手続函数は立体的外観を造り上げる方法により窓の境界を描く機能を提供する｡ Tk_Alloc3DBorderFromObj は tkwin 引数により与えられる窓内の境界を描く為に必要な色と画素地図を割当てる｡ objPtr の値は標準の Tk 色名称であり､境界の色を定める｡ objPtr に指示される色は実際には境界には使用されない; それは窓の背景の色を指示す(即ち､平坦な表面の色)｡境界の照らされた部位は objPtr により指示されるよりも明るく見え､境界の影の部位は objPtr よりも暗く見える｡ These procedures provide facilities for drawing window borders in a way that produces a three-dimensional appearance. Tk_Alloc3DBorderFromObj allocates colors and Pixmaps needed to draw a border in the window given by the tkwin argument. The value of objPtr is a standard Tk color name that determines the border colors. The color indicated by objPtr will not actually be used in the border; it indicates the background color for the window (i.e. a color for flat surfaces). The illuminated portions of the border will appear brighter than indicated by objPtr, and the shadowed portions of the border will appear darker than objPtr.

Tk_Alloc3DBorderFromObj は解析語句を返し､それは後にTk_Draw3DRectangle を呼ぶ時に使える｡もし境界の情報の割当てに不都合が生じると(譬えば､偽の色名が与えられ) NULL が返され､不都合伝言文が解釈実行機能 interp の結果として残される｡もし成功裏に帰ると Tk_Alloc3DBorderFromObj は objPtr 内の帰り値に関する情報を高速記憶域に保存し､それは後に同じ objPtr と tkwin とを伴う Tk_Alloc3DBorderFromObj の呼出しを加速する｡ Tk_Alloc3DBorderFromObj returns a token that may be used in later calls to Tk_Draw3DRectangle. If an error occurs in allocating information for the border (e.g. a bogus color name was given) then NULL is returned and an error message is left as the result of interpreter interp. If it returns successfully, Tk_Alloc3DBorderFromObj caches information about the return value in objPtr, which speeds up future calls to Tk_Alloc3DBorderFromObj with the same objPtr and tkwin.

Tk_ClipDrawableToRectは､ 描写可能な d 内への全ての描写は､与えられた矩形に切取る｡ もし､width か height が負数なら､切取りなしに組み直す｡ 引続く d 内への描写は､取り消し､且つ､指定に従って切取られる｡ 本函数は機械語翻訳時にTK_NO_DOUBLE_BUFFERINGが指定された時のみ使われる｡ Tk_ClipDrawableToRect will clip all drawing into the drawable d to the given rectangle. If width or height are negative, reset to no clipping. Subsequent drawing into d is offset and clipped as specified. The function is only used when TK_NO_DOUBLE_BUFFERING is specified at compile time.

Tk_DrawHighlightBorderは入力焦点を受取っていることを示す為に､部品の周りに矩形の輪を描く｡ マックでは､部品と焦点環の間に背景GC内の１画素縁を置く､但し強調巾が0か1では略す､その場合､縁は取り残す｡適切なマックなんたらには､3の強調巾を使え｡ Tk_DrawHighlightBorder draws a rectangular ring around the outside of a widget to indicate that it has received the input focus. On the Macintosh, this puts a 1 pixel border in the bgGC color between the widget and the focus ring, except in the case where highlightWidth is 0 or 1, in which case the border is left out. For proper Mac L&F, use highlightWidth of 3.

Tk_Get3DBorder は､色が値の代りに文字列で指定されていることを除きTk_Alloc3DBorderFromObj と同一である｡これは返り値を高速域に記憶することから Tk_Get3DBorder を阻むので､Tk_Get3DBorder は Tk_Alloc3DBorderFromObj より効率が低い｡ Tk_Get3DBorder is identical to Tk_Alloc3DBorderFromObj except that the color is specified with a string instead of a value. This prevents Tk_Get3DBorder from caching the return value, so Tk_Get3DBorder is less efficient than Tk_Alloc3DBorderFromObj.

Tk_Get3DBorderColorsは､与えられた盤の使われた色を返す｡ Tk_Get3DBorderColors returns the used colors of the given border.

Tk_Get3DBorderFromObj は､窓と縁を生成するために使われた色の名前を与えられ､実在する縁に関する字句解析結果を返す｡Tk_Get3DBorderFromObj は､実際は縁を作成しない; それは以前のTk_Alloc3DBorderFromObj か Tk_Get3DBorder の呼出しで作成すみでなければならない｡返り値は objPtr 内で高速記憶域に保存されるので､将来の同じ objPtr と tkwin. を伴うTk_Get3DBorderFromObj 呼出しを加速する｡ Tk_Get3DBorderFromObj returns the token for an existing border, given the window and color name used to create the border. Tk_Get3DBorderFromObj does not actually create the border; it must already have been created with a previous call to Tk_Alloc3DBorderFromObj or Tk_Get3DBorder. The return value is cached in objPtr, which speeds up future calls to Tk_Get3DBorderFromObj with the same objPtr and tkwin.

一度縁構造が作成されると､Tk_Draw3DRectangle は縁を描く為に起動されるかもしれない｡ tkwin 引数は､縁が割当てられる為の窓を指定する､又､ drawable は縁が描かれる窓か画素地図を指定する｡ drawable は tkwin と同じ窓を指定する必要はないが､両立できる画素地図か窓を参照しなければならない: 同じ画面に結合したものと､ tkwin と同じ深さのもの｡ x と y と width と height 引数は drawable 内部の縁の領域の束縛箱を定義し(通常 x と y は零､又 width と height は窓の寸法)､又､ borderWidth は実際に縁に占有されている画素の数を指定する｡ relief 引数は､幾つかの３次元効果の内の望まれているものを指し示す: TK_RELIEF_RAISED は矩形の内部が矩形の外部に較べ突出して表現されることを表し､ TK_RELIEF_SUNKEN は内部が窪んで表現されることを意味する｡ TK_RELIEF_GROOVE と TK_RELIEF_RIDGE は溝､或は峰が矩形を取巻く様に表現されるべきことを意味する｡ Once a border structure has been created, Tk_Draw3DRectangle may be invoked to draw the border. The tkwin argument specifies the window for which the border was allocated, and drawable specifies a window or pixmap in which the border is to be drawn. Drawable need not refer to the same window as tkwin, but it must refer to a compatible pixmap or window: one associated with the same screen and with the same depth as tkwin. The x, y, width, and height arguments define the bounding box of the border region within drawable (usually x and y are zero and width and height are the dimensions of the window), and borderWidth specifies the number of pixels actually occupied by the border. The relief argument indicates which of several three-dimensional effects is desired: TK_RELIEF_RAISED means that the interior of the rectangle should appear raised relative to the exterior of the rectangle, and TK_RELIEF_SUNKEN means that the interior should appear depressed. TK_RELIEF_GROOVE and TK_RELIEF_RIDGE mean that there should appear to be a groove or ridge around the exterior of the rectangle.

Tk_Fill3DRectangle は幾らか Tk_Draw3DRectangle に似ているが､違いは､初めに背景色で矩形領域を満たしている( border を作成する為に使われた色に相当するもの)｡次に､これが矩形領域の外側縁の丁度内側に縁を描く為に Tk_Draw3DRectangle を呼出す｡引数 relief は望まれている効果を指し示す(TK_RELIEF_FLAT は縁は描かれないことを意味する; 全ては､背景色により矩形を満たす為に生じる)｡ Tk_Fill3DRectangle is somewhat like Tk_Draw3DRectangle except that it first fills the rectangular area with the background color (one corresponding to the color used to create border). Then it calls Tk_Draw3DRectangle to draw a border just inside the outer edge of the rectangular area. The argument relief indicates the desired effect (TK_RELIEF_FLAT means no border should be drawn; all that happens is to fill the rectangle with the background color).

手続函数 Tk_Draw3DPolygon は更に複雑な立体的外観の形状を描く為に使われ得る｡ pointPtr と numPoints 引数は軌跡を定義し､ polyBorderWidth は縁がどの様に太いかを指し示し(又､軌跡のどちら側にそれを描くか)､ leftRelief は軌跡のどちら側が突出して見えるかを指し示す｡ Tk_Draw3DPolygon は与えられた軌跡の周りに border から与えられた色を使い､立体的外観を生成する為に縁を描く｡もし軌跡が非自己交差である場合､外観は突出か窪んだかの多角形形状になる｡軌跡は自己交差するかもしれないが､それが如何に便利であるかは明確ではなくなる｡ The procedure Tk_Draw3DPolygon may be used to draw more complex shapes with a three-dimensional appearance. The pointPtr and numPoints arguments define a trajectory, polyBorderWidth indicates how wide the border should be (and on which side of the trajectory to draw it), and leftRelief indicates which side of the trajectory should appear raised. Tk_Draw3DPolygon draws a border around the given trajectory using the colors from border to produce a three-dimensional appearance. If the trajectory is non-self-intersecting, the appearance will be a raised or sunken polygon shape. The trajectory may be self-intersecting, although it's not clear how useful this is.

Tk_Fill3DPolygon が Tk_Draw3DPolygon に対することは､Tk_Fill3DRectangle が Tk_Draw3DRectangle に対することである: それは border の背景色により多角形領域を満たす､次いで､領域を取巻く縁を描く為に Tk_Draw3DPolygon を呼ぶ(leftRelief が TK_RELIEF_FLAT でない限り; この場合は縁は描かれない)｡ Tk_Fill3DPolygon is to Tk_Draw3DPolygon what Tk_Fill3DRectangle is to Tk_Draw3DRectangle: it fills the polygonal area with the background color from border, then calls Tk_Draw3DPolygon to draw a border around the area (unless leftRelief is TK_RELIEF_FLAT; in this case no border is drawn).

手続函数 Tk_3DVerticalBevel と Tk_3DHorizontalBevel は Tk_Draw3DRectangle の様な手続函数に使われる低水準描画要素を提供する｡これ等の手続函数はそれ自身の権限内で直線で囲まれた縁形状の描画に便利である｡ Tk_3DVerticalBevel は矩形の左や右の側面の様な面取りされた端の垂線を描く､又､ Tk_3DHorizontalBevel は矩形の上辺や底辺の様な端が面取りされた水平線を描く｡それぞれの手続函数は x, y, width, height 引数をとり､それは端が面取りされた矩形領域を記述する(譬えば､ width は Tk_3DVerticalBevel の縁の幅である)｡ leftBorder と topBorder 引数は対象の “内側” に相対的な位置を指し示し､ relief は対象の内側領域が外側領域に対する相対的立体感の値を指し示す｡ Tk_3DVerticalBevel は丁度､矩形領域を描く｡Tk_3DHorizontalBevel は尖った端を作る為に台形の領域を描く; それは Tk_3DVerticalBevel の後に呼ばれるべきである(そうしない場合､ Tk_3DVerticalBevel は隅の尖りを上書きする)｡ Tk_3DHorizontalBevel の leftIn と rightIn 引数は隅の尖りを記述する; 値 1 は台形の底辺が上辺より短くなることを意味し､ 0 は底辺が長くなることを意味する｡譬えば､矩形の縁を描く為に上辺の斜面は leftIn と rightIn の両方を 1 にして描かれるべきであり､底辺の斜面は両方の引数を 0 にして描かれるべきである｡ The procedures Tk_3DVerticalBevel and Tk_3DHorizontalBevel provide lower-level drawing primitives that are used by procedures such as Tk_Draw3DRectangle. These procedures are also useful in their own right for drawing rectilinear border shapes. Tk_3DVerticalBevel draws a vertical beveled edge, such as the left or right side of a rectangle, and Tk_3DHorizontalBevel draws a horizontal beveled edge, such as the top or bottom of a rectangle. Each procedure takes x, y, width, and height arguments that describe the rectangular area of the beveled edge (e.g., width is the border width for Tk_3DVerticalBevel). The leftBorder and topBorder arguments indicate the position of the border relative to the “inside” of the value, and relief indicates the relief of the inside of the value relative to the outside. Tk_3DVerticalBevel just draws a rectangular region. Tk_3DHorizontalBevel draws a trapezoidal region to generate mitered corners; it should be called after Tk_3DVerticalBevel (otherwise Tk_3DVerticalBevel will overwrite the mitering in the corner). The leftIn and rightIn arguments to Tk_3DHorizontalBevel describe the mitering at the corners; a value of 1 means that the bottom edge of the trapezoid will be shorter than the top, 0 means it will be longer. For example, to draw a rectangular border the top bevel should be drawn with 1 for both leftIn and rightIn, and the bottom bevel should be drawn with 0 for both arguments.

手続 Tk_SetBackgroundFromBorder は border と両立するために､背景の画素 及び/又は tkwin の画素地図を修正する｡天然色表示に就いては､結果の背景は縁が作成された時に指定された色になる; 白黒表示については､結果の背景色は輝く縁の部位と区別する為に明るい点描になる｡ The procedure Tk_SetBackgroundFromBorder will modify the background pixel and/or pixmap of tkwin to produce a result compatible with border. For color displays, the resulting background will just be the color specified when border was created; for monochrome displays, the resulting background will be a light stipple pattern, in order to distinguish the background from the illuminated portion of the border.

Tk_NameOf3DBorder 手続函数は､字句解析結果が与えられ､縁を作成する為に使われる色の名前を返す｡ Given a token for a border, the procedure Tk_NameOf3DBorder will return the color name that was used to create the border.

手続函数 Tk_3DBorderColor は Tk_Fill3DRectangle.の様な手続函数によってその border 引数の為に描かれる平らな表面に使われる XColor 構造を返す｡返る値は､縁を作るために使われる色の名前に相当する｡ XColor とそれに結合した画素値は border が存在する限り､割りあてられ残る事になる｡ The procedure Tk_3DBorderColor returns the XColor structure that will be used for flat surfaces drawn for its border argument by procedures like Tk_Fill3DRectangle. The return value corresponds to the color name that was used to create the border. The XColor, and its associated pixel value, will remain allocated as long as border exists.

手続函数 Tk_3DBorderGC は X 図形文脈のどれか一つを返し､それは縁を描く為に使われる｡引数 which は三つの可能な GC のどれかを選択する: TK_3D_FLAT_GC は平坦な表面の為に使われる文脈を返す､ TK_3D_LIGHT_GC は明るい陰のための文脈を返す､ TK_3D_DARK_GC は暗い陰のための文脈を返す｡ The procedure Tk_3DBorderGC returns one of the X graphics contexts that are used to draw the border. The argument which selects which one of the three possible GC's: TK_3D_FLAT_GC returns the context used for flat surfaces, TK_3D_LIGHT_GC returns the context for light shadows, and TK_3D_DARK_GC returns the context for dark shadows.

最早､縁が不要になった時は､それに結合した原資を解除する為にTk_Free3DBorderFromObj か Tk_Free3DBorder が呼ばれるべきである｡ Tk_Free3DBorderFromObj に就いては､解除される縁が窓と縁の作成の為の色の名前によって指定される; Tk_Free3DBorder について､解除される縁は縁のためのTk_3DBorder 字句結果によって指定される｡それぞれの Tk_Alloc3DBorderFromObj か Tk_Get3DBorder への呼び出しの為に厳密に Tk_Free3DBorderFromObj か Tk_Free3DBorder への呼出があるべきである｡ When a border is no longer needed, Tk_Free3DBorderFromObj or Tk_Free3DBorder should be called to release the resources associated with it. For Tk_Free3DBorderFromObj the border to release is specified with the window and color name used to create the border; for Tk_Free3DBorder the border to release is specified with the Tk_3DBorder token for the border. There should be exactly one call to Tk_Free3DBorderFromObj or Tk_Free3DBorder for each call to Tk_Alloc3DBorderFromObj or Tk_Get3DBorder.

### KEYWORDS

3D, background, border, color, depressed, illumination, value, polygon, raised, shadow, three-dimensional effect
Copyright © 1990-1993 The Regents of the University of California.
Copyright © 1994-1998 Sun Microsystems, Inc.