日期:2014-05-16 浏览次数:20459 次
setColor( "#HexColor" ); Specifies the color of the drawing "pen". Once set, this color will be used by the subsequently called drawing methods until it will be overridden through another call of setColor(). The value must be enclosed in quotation marks, and should be hexadecimal following the pattern "#rrggbb" (as usual with HTML). Color names available in HTML (for instance "maroon") may be used as well.指定绘图颜色的“笔”。一旦设置,将使用此颜色由所谓的绘图方法,直到后来便)重写通过另一个调用setColor(。值必须用引号,应该十六进制下面的模式“#rrggbb”(通常为HTML的)。颜色名称在HTML中可用(例如为“栗色”)可作为良好。 |
jg.setColor("#ff0000"); or with identical result或具有相同的结果 jg.setColor("red"); |
|
setStroke( Number ); Specifies the thickness of the drawing "pen" for lines and bounding lines of shapes. Once set, this thickness will be used by the subsequently called drawing methods until it will be overridden through another call of setStroke(). Default line thickness is 1?px, as long as .setStroke() has not yet been invoked.指定绘图厚度的“笔”形状的线条和边界线。一旦设置,这个厚度将在其后所使用的方法称为图纸,直到将覆盖厚度通过另一个电话setStroke()。默认是1像素线,只要。setStroke()尚未被调用。 To create dotted lines, setStroke() requires the constant Stroke.DOTTED as argument. Width of dotted lines is always 1 pixel.要创建虚线,setStroke()需要不断的争论Stroke.DOTTED作为。线条宽度的点永远是1像素。 |
jg.setStroke(3); or或 jg.setStroke(Stroke.DOTTED); |
|
drawLine( X1, Y1, X2, Y2 ); <script type="text/javascript"></script>
|
jg.drawLine(20,50,453,40); |
|
drawPolyline( Xpoints, Ypoints ); <script type="text/javascript"></script>
var Xpoints = new Array(x1,x2,x3,x4,x5);
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
|