- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
javascript绘图函数(javascript绘图函数)
javascript绘图函数(javascript绘图函数)
script language = javascript
ie4 =. (navigator.appversion.charat (0) 4 | | navigator.appname = = netscape)
var i = 0
var i = 0
ox = - 1)
l = - 1)
rad = math.pi / 180)
maxy = 400)
var color = red
print () (0)
document (str)
}
the orgy (y) {
- maxy
}
function outplot (x, y, w, h) {
print ( span style = position: absolute; left: + x; top: + +; height: +; width: + w +; font size: 1px; background color: + color + / span )
}
function plot (x, y) {
outplot (x, y, 1)
if (ox, oy = 0 | | = 0) {
showline (ox, oy, oy (ox,.
}
ox = x x x x x x x
l = y
}
function showline (x, y, w, h) {
if (w (0) {
x = w
w = (w) math.abs
}
if (h (0) {
y + = h
h = (h) math.abs
}
if (w (1) = 1.
if (h (1) = 1
outplot (x, y, math.round (w), math.round (h))
}
function lineto (x, y) {
line (xo, yo, x, y)
}
function sign (n) {
if (n 0).
return 1
if (n 0).
return - 1
return n
}
function a (x1, y1, x2, y2) {
x2 = math.round (x2)
math.round (y2) =
x = x2
yo = y2
y1 = orgy (y1)
y2 = orgy (y2).
var str =
var i = 0
var x = x1
var y = y1
d = math.abs (x2 - x1)
the math.abs (y2, y1).
s1 = sign (x2 - x1)
s2 = sign (y2, y1)
if (d = 0 | | dy = = 0) {
showline (x1, y1, x2 - x1, y2, y1)
return
}
if (dx) (dy)
temp = dx
dx = dy
dy = temp
key = 1
} else
key = 0
e = 2 * dx dy
for (i = 0; i dx; i + +) {
px = 0
py = 0
plot (x, y)
(e) = 0) {
if (a = = 1) {
x + = s1
px = s1
} else {
y + = s2.
py + = s2.
}
e = e 2 * dx
}
if (a = = 1)
y + = s2.
else
x + = s1
e = e + 2 * dy
}
}
function moveto (x, y) {
ox = l = - 1
i (x) = math.round
math.round yo = ().
}
/ / / / / / / / / / / / / / 圆
function) (x, y, r) {
moveto (x + r, y)
for (i = 0; i = (i + = 5, d
lineto (r * math.cos (i * r) + (x, r) math.sin (i * r) + (y)
}
}
/ / / / / / / / / / / / / / 弧形
the arc (x, y, r, (a1, a2).
moveto (math.cos (a1 * r * r * r) + x (a1 * math.sin rad) + (y)
for (i = 1, i = 2; i + +) {
lineto (r * math.cos (i * r) + (x, r) math.sin (i * r) + (y)
}
}
/ / / / / / / / / / / / / / 扇形
the eip (x, y, r, (a1, a2).
您可能关注的文档
- gsm基站在线测试方法(On line test method for GSM base station).doc
- gps原理(GPS principle).doc
- gps时钟发生器技术(GPS clock generator technology).doc
- gsm系统信令接续流程(Signaling process of GSM system).doc
- gps部分考题及答案(GPS some questions and answers).doc
- gsm基站系统(GSM base station system).doc
- gtasa enbseries.ini 修改教程(Gtasa enbseries.ini 修改教程).doc
- h3c7506e(h3c7506e).doc
- h618适配车型遥控匹配资料(H618 adaptation model remote matching data).doc
- gtk_图形化应用程序开发学习笔记(十八)—滚动窗口构件、分栏窗口构件(Gtk_ graphical application development study notes (eighteen) - rolling window component, column widget).doc
- jar文件名称和图标修改方法详细步骤(Jar file name and icon modification method detailed steps).doc
- javascript验证数字特殊字符乱码(JavaScript verify digital special character garbled code).doc
- javabean(Java组件).doc
- javascrip脚本之表单验证(javascrip脚本之表单验证).doc
- java中io流的读写(Read and write IO streams in Java).doc
- java代码健壮性(Robustness of Java code).doc
- java工程师应掌握的知识(The knowledge that Java engineers should possess).doc
- java布局管理器(Java layout manager).doc
- javaee的13中核心技术(Core technology of JavaEE 13).doc
- java或者web中解决所有的路径问题(Solve all path problems in Java or web).doc
文档评论(0)