?? canvas.n
字號:
irrelevant..TP\fB\-smooth \fIboolean\fR\fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fR.It indicates whether or not the line should be drawn as a curve.If so, the line is rendered as a set of parabolic splines: one splineis drawn for the first and second line segments, one for the secondand third, and so on. Straight-line segments can be generated withina curve by duplicating the end-points of the desired line segment..TP\fB\-splinesteps \fInumber\fRSpecifies the degree of smoothness desired for curves: each splinewill be approximated with \fInumber\fR line segments. Thisoption is ignored unless the \fB\-smooth\fR option is true..TP\fB\-stipple \fIbitmap\fRIndicates that the line should be filled in a stipple pattern;\fIbitmap\fR specifies the stipple pattern to use, in any of theforms accepted by \fBTk_GetBitmap\fR.If \fIbitmap\fR is an empty string (the default), then filling isdone in a solid fashion..TP\fB\-tags \fItagList\fRSpecifies a set of tags to apply to the item.\fITagList\fR consists of a list of tag names, which replace anyexisting tags for the item.\fITagList\fR may be an empty list..TP\fB\-width \fIlineWidth\fR\fILineWidth\fR specifies the width of the line, in any of the formsdescribed in the COORDINATES section above.Wide lines will be drawn centered on the path specified by thepoints.If this option isn't specified then it defaults to 1.0..SH "OVAL ITEMS".PPItems of type \fBoval\fR appear as circular or oval regions onthe display. Each oval may have an outline, a fill, orboth. Ovals are created with widget commands of thefollowing form:.CS\fIpathName \fBcreate oval \fIx1 y1 x2 y2 \fR?\fIoption value option value ...\fR?.CEThe arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR givethe coordinates of two diagonally opposite corners of arectangular region enclosing the oval.The oval will include the top and left edges of the rectanglenot the lower or right edges.If the region is square then the resulting oval is circular;otherwise it is elongated in shape.After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fRpairs, each of which sets one of the configuration optionsfor the item. These same \fIoption\fR\-\fIvalue\fR pairs may beused in \fBitemconfigure\fR widget commands to change the item'sconfiguration.The following options are supported for ovals:.TP\fB\-fill \fIcolor\fRFill the area of the oval with \fIcolor\fR.\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.If \fIcolor\fR is an empty string (the default), thenthen the oval will not be filled..TP\fB\-outline \fIcolor\fR\fIColor\fR specifies a color to use for drawing the oval'soutline; it may have any of the forms accepted by \fBTk_GetColor\fR.This option defaults to \fBblack\fR.If \fIcolor\fR is an empty string then no outline will bedrawn for the oval..TP\fB\-stipple \fIbitmap\fRIndicates that the oval should be filled in a stipple pattern;\fIbitmap\fR specifies the stipple pattern to use, in any of theforms accepted by \fBTk_GetBitmap\fR.If the \fB\-fill\fR option hasn't been specified then this optionhas no effect.If \fIbitmap\fR is an empty string (the default), then filling is donein a solid fashion..TP\fB\-tags \fItagList\fRSpecifies a set of tags to apply to the item.\fITagList\fR consists of a list of tag names, which replace anyexisting tags for the item.\fITagList\fR may be an empty list..TP\fB\-width \fIoutlineWidth\fR\fIoutlineWidth\fR specifies the width of the outline to be drawn aroundthe oval, in any of the forms described in the COORDINATES section above.If the \fB\-outline\fR option hasn't been specified then this optionhas no effect.Wide outlines are drawn centered on the oval path defined by\fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.This option defaults to 1.0..SH "POLYGON ITEMS".PPItems of type \fBpolygon\fR appear as polygonal or curved filled regionson the display.Polygons are created with widget commands of the following form:.CS\fIpathName \fBcreate polygon \fIx1 y1 ... xn yn \fR?\fIoption value option value ...\fR?.CEThe arguments \fIx1\fR through \fIyn\fR specify the coordinates forthree or more points that define a closed polygon.The first and last points may be the same; whether they are or not,Tk will draw the polygon as a closed polygon.After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fRpairs, each of which sets one of the configuration optionsfor the item. These same \fIoption\fR\-\fIvalue\fR pairs may beused in \fBitemconfigure\fR widget commands to change the item'sconfiguration.The following options are supported for polygons:.TP\fB\-fill \fIcolor\fR\fIColor\fR specifies a color to use for filling the area of thepolygon; it may have any of the forms acceptable to \fBTk_GetColor\fR.If \fIcolor\fR is an empty string then the polygon will betransparent.This option defaults to \fBblack\fR..TP\fB\-outline \fIcolor\fR\fIColor\fR specifies a color to use for drawing the polygon'soutline; it may have any of the forms accepted by \fBTk_GetColor\fR.If \fIcolor\fR is an empty string then no outline will bedrawn for the polygon.This option defaults to empty (no outline)..TP\fB\-smooth \fIboolean\fR\fIBoolean\fR must have one of the forms accepted by \fBTk_GetBoolean\fRIt indicates whether or not the polygon should be drawn with acurved perimeter.If so, the outline of the polygon becomes a set of parabolic splines,one spline for the first and second line segments, one for the secondand third, and so on. Straight-line segments can be generated in asmoothed polygon by duplicating the end-points of the desired line segment..TP\fB\-splinesteps \fInumber\fRSpecifies the degree of smoothness desired for curves: each splinewill be approximated with \fInumber\fR line segments. Thisoption is ignored unless the \fB\-smooth\fR option is true..TP\fB\-stipple \fIbitmap\fRIndicates that the polygon should be filled in a stipple pattern;\fIbitmap\fR specifies the stipple pattern to use, in any of theforms accepted by \fBTk_GetBitmap\fR.If \fIbitmap\fR is an empty string (the default), then filling isdone in a solid fashion..TP\fB\-tags \fItagList\fRSpecifies a set of tags to apply to the item.\fITagList\fR consists of a list of tag names, which replace anyexisting tags for the item.\fITagList\fR may be an empty list..TP\fB\-width \fIoutlineWidth\fR\fIOutlineWidth\fR specifies the width of the outline to be drawn aroundthe polygon, in any of the forms described in the COORDINATES section above.If the \fB\-outline\fR option hasn't been specified then this optionhas no effect. This option defaults to 1.0..PPPolygon items are different from other items such as rectangles, ovalsand arcs in that interior points are considered to be ``inside'' apolygon (e.g. for purposes of the \fBfind closest\fR and\fBfind overlapping\fR widget commands) even if it is not filled.For most other item types, aninterior point is considered to be inside the item only if the itemis filled or if it has neither a fill nor an outline. If you wouldlike an unfilled polygon whose interior points are not consideredto be inside the polygon, use a line item instead..SH "RECTANGLE ITEMS".PPItems of type \fBrectangle\fR appear as rectangular regions onthe display. Each rectangle may have an outline, a fill, orboth. Rectangles are created with widget commands of thefollowing form:.CS\fIpathName \fBcreate rectangle \fIx1 y1 x2 y2 \fR?\fIoption value option value ...\fR?.CEThe arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR givethe coordinates of two diagonally opposite corners of the rectangle(the rectangle will include its upper and left edges but notits lower or right edges).After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fRpairs, each of which sets one of the configuration optionsfor the item. These same \fIoption\fR\-\fIvalue\fR pairs may beused in \fBitemconfigure\fR widget commands to change the item'sconfiguration.The following options are supported for rectangles:.TP\fB\-fill \fIcolor\fRFill the area of the rectangle with \fIcolor\fR, which may bespecified in any of the forms accepted by \fBTk_GetColor\fR.If \fIcolor\fR is an empty string (the default),then the rectangle will not be filled..TP\fB\-outline \fIcolor\fRDraw an outline around the edge of the rectangle in \fIcolor\fR.\fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR.This option defaults to \fBblack\fR.If \fIcolor\fR is an empty string then no outline will bedrawn for the rectangle..TP\fB\-stipple \fIbitmap\fRIndicates that the rectangle should be filled in a stipple pattern;\fIbitmap\fR specifies the stipple pattern to use, in any of theforms accepted by \fBTk_GetBitmap\fR.If the \fB\-fill\fR option hasn't been specified then this optionhas no effect.If \fIbitmap\fR is an empty string (the default), then fillingis done in a solid fashion..TP\fB\-tags \fItagList\fRSpecifies a set of tags to apply to the item.\fITagList\fR consists of a list of tag names, which replace anyexisting tags for the item.\fITagList\fR may be an empty list..TP\fB\-width \fIoutlineWidth\fR\fIOutlineWidth\fR specifies the width of the outline to be drawn aroundthe rectangle, in any of the forms described in the COORDINATES section above.If the \fB\-outline\fR option hasn't been specified then this optionhas no effect.Wide outlines are drawn centered on the rectangular pathdefined by \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.This option defaults to 1.0..SH "TEXT ITEMS".PPA text item displays a string of characters on the screen in oneor more lines.Text items support indexing and selection, along with thefollowing text-related canvas widget commands: \fBdchars\fR,\fBfocus\fR, \fBicursor\fR, \fBindex\fR, \fBinsert\fR,\fBselect\fR.Text items are created with widget commands of the followingform:.CS\fIpathName \fBcreate text \fIx y \fR?\fIoption value option value ...\fR?.CEThe arguments \fIx\fR and \fIy\fR specify the coordinates of apoint used to position the text on the display (see the optionsbelow for more information on how text is displayed).After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fRpairs, each of which sets one of the configuration optionsfor the item. These same \fIoption\fR\-\fIvalue\fR pairs may beused in \fBitemconfigure\fR widget commands to change the item'sconfiguration.The following options are supported for text items:.TP\fB\-anchor \fIanchorPos\fR\fIAnchorPos\fR tells how to position the text relative to thepositioning point for the text; it may have any of the formsaccepted by \fBTk_GetAnchor\fR. For example, if \fIanchorPos\fRis \fBcenter\fR then the text is centered on the point; if\fIanchorPos\fR is \fBn\fR then the text will be drawn such thatthe top center point of the rectangular region occupied by thetext will be at the positioning point.This option defaults to \fBcenter\fR..TP\fB\-fill \fIcolor\fR\fIColor\fR specifies a color to use for filling the text characters;it may have any of the forms accepted by \fBTk_GetColor\fR.If this option isn't specified then it defaults to \fBblack\fR..TP\fB\-font \fIfontName\fRSpecifies the font to use for the text item.\fIFontName\fR may be any string acceptable to \fBTk_GetFontStruct\fR.If this option isn't specified, it defaults to a system-dependentfont..TP\fB\-justify \fIhow\fRSpecifies how to justify the text within its bounding region.\fIHow\fR must be one of the values \fBleft\fR, \fBright\fR,or \fBcenter\fR.This option will only matter if the text is displayed as multiplelines.If the option is omitted, it defaults to \fBleft\fR..TP\fB\-stipple \fIbitmap\fRIndicates that the text should be drawn in a stippled patternrather than solid;\fIbitmap\fR specifies the stipple pattern to use, in any of theforms accepted by \fBTk_GetBitmap\fR.If \fIbitmap\fR is an empty string (the default) then the textis drawn in a solid fashion..TP\fB\-tags \fItagList\fRSpecifies a set of tags to apply to the item.\fITagList\fR consists of a list of tag names, which replace anyexisting tags for the item.\fITagList\fR may be an empty list..TP\fB\-text \fIstring\fR\fIString\fR specifies the characters to
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -