Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
0fb7032f
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0fb7032f
编写于
5月 31, 2012
作者:
P
pTalanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove old image element and canvas APIs
上级
7e07414a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
148 deletion
+0
-148
js/js.libraries/src/html5/canvas.kt
js/js.libraries/src/html5/canvas.kt
+0
-123
js/js.libraries/src/html5/image.kt
js/js.libraries/src/html5/image.kt
+0
-25
未找到文件。
js/js.libraries/src/html5/canvas.kt
已删除
100644 → 0
浏览文件 @
7e07414a
package
html5
import
js.native
import
js.DomElement
native
class
Context
()
{
fun
save
()
:
Unit
=
js
.
noImpl
fun
restore
()
:
Unit
=
js
.
noImpl
fun
scale
(
x
:
Double
,
y
:
Double
)
:
Unit
=
js
.
noImpl
fun
rotate
(
angle
:
Double
)
:
Unit
=
js
.
noImpl
fun
translate
(
x
:
Int
,
y
:
Int
)
:
Unit
=
js
.
noImpl
fun
clearRect
(
x
:
Int
,
y
:
Int
,
w
:
Int
,
h
:
Int
)
:
Unit
=
js
.
noImpl
fun
fillRect
(
x
:
Int
,
y
:
Int
,
w
:
Int
,
h
:
Int
)
:
Unit
=
js
.
noImpl
fun
strokeRect
(
x
:
Int
,
y
:
Int
,
w
:
Int
,
h
:
Int
)
:
Unit
=
js
.
noImpl
var
globalAlpha
:
Double
=
1.0
;
var
strokeStyle
:
Any
=
""
var
fillStyle
:
Any
=
""
var
lineWidth
:
Double
=
1.0
var
shadowOffsetX
:
Double
=
0.0
var
shadowOffsetY
:
Double
=
0.0
var
shadowBlur
:
Double
=
0.0
var
shadowColor
:
String
=
""
var
font
:
String
=
""
fun
beginPath
()
:
Unit
=
js
.
noImpl
fun
closePath
()
:
Unit
=
js
.
noImpl
fun
moveTo
(
x
:
Int
,
y
:
Int
)
:
Unit
=
js
.
noImpl
fun
lineTo
(
x
:
Int
,
y
:
Int
)
:
Unit
=
js
.
noImpl
fun
quadraticCurveTo
(
cpx
:
Double
,
cpy
:
Double
,
x
:
Double
,
y
:
Double
)
:
Unit
=
js
.
noImpl
fun
bezierCurveTo
(
cp1x
:
Double
,
cp1y
:
Double
,
cp2x
:
Double
,
cp2y
:
Double
,
x
:
Double
,
y
:
Double
)
:
Unit
=
js
.
noImpl
fun
arcTo
(
x1
:
Double
,
y1
:
Double
,
x2
:
Double
,
y2
:
Double
,
radius
:
Double
)
:
Unit
=
js
.
noImpl
fun
arc
(
x
:
Double
,
y
:
Double
,
radius
:
Double
,
startAngle
:
Double
,
endAngle
:
Double
,
anticlockwise
:
Boolean
)
:
Unit
=
js
.
noImpl
fun
rect
(
x
:
Int
,
y
:
Int
,
w
:
Int
,
h
:
Int
)
:
Unit
=
js
.
noImpl
fun
fill
()
:
Unit
=
js
.
noImpl
fun
stroke
()
:
Unit
=
js
.
noImpl
fun
fillText
(
text
:
String
,
x
:
Int
,
y
:
Int
)
:
Unit
=
js
.
noImpl
fun
fillText
(
text
:
String
,
x
:
Int
,
y
:
Int
,
maxWidth
:
Int
)
:
Unit
=
js
.
noImpl
fun
strokeText
(
text
:
String
,
x
:
Int
,
y
:
Int
)
:
Unit
=
js
.
noImpl
fun
strokeText
(
text
:
String
,
x
:
Int
,
y
:
Int
,
maxWidth
:
Int
)
:
Unit
=
js
.
noImpl
fun
measureText
(
text
:
String
)
:
TextMetrics
=
TextMetrics
();
fun
drawImage
(
image
:
HTMLImageElement
,
dx
:
Int
,
dy
:
Int
)
:
Unit
=
js
.
noImpl
fun
drawImage
(
image
:
HTMLImageElement
,
dx
:
Int
,
dy
:
Int
,
dw
:
Int
,
dh
:
Int
)
:
Unit
=
js
.
noImpl
fun
drawImage
(
image
:
HTMLImageElement
,
sx
:
Int
,
sy
:
Int
,
sw
:
Int
,
sh
:
Int
,
dx
:
Int
,
dy
:
Int
,
dw
:
Int
,
dh
:
Int
)
:
Unit
=
js
.
noImpl
fun
createLinearGradient
(
x0
:
Double
,
y0
:
Double
,
x1
:
Double
,
y1
:
Double
)
:
CanvasGradient
=
CanvasGradient
()
fun
createRadialGradient
(
x0
:
Double
,
y0
:
Double
,
r0
:
Double
,
x1
:
Double
,
y1
:
Double
,
r1
:
Double
)
:
CanvasGradient
=
CanvasGradient
();
fun
getImageData
(
sx
:
Int
,
sy
:
Int
,
sw
:
Int
,
sh
:
Int
)
:
ImageData
=
js
.
noImpl
fun
putImageData
(
data
:
ImageData
,
dx
:
Int
,
dy
:
Int
)
:
Unit
=
js
.
noImpl
}
native
open
class
HTMLImageElement
()
:
DomElement
()
{
}
native
class
CanvasGradient
()
{
fun
addColorStop
(
offset
:
Double
,
color
:
String
)
:
Unit
=
js
.
noImpl
}
native
class
ImageData
()
{
// readonly attribute unsigned long width;
// readonly attribute unsigned long height;
// readonly attribute Uint8ClampedArray data;
val
width
:
Int
=
js
.
noImpl
val
height
:
Int
=
js
.
noImpl
val
data
:
Array
<
Int
>
=
js
.
noImpl
}
native
class
Canvas
()
:
DomElement
()
{
var
width
:
Int
=
js
.
noImpl
;
var
height
:
Int
=
js
.
noImpl
;
//DOMString toDataURL(in optional DOMString type, in any... args);
fun
toDataURL
()
:
String
=
js
.
noImpl
fun
toDataURL
(
typ
:
String
)
:
String
=
js
.
noImpl
}
native
class
TextMetrics
()
{
val
width
:
Int
=
js
.
noImpl
}
/*custom helpers*/
native
fun
getContext
()
:
Context
=
js
.
noImpl
native
fun
getCanvas
()
:
Canvas
=
js
.
noImpl
native
fun
getKotlinLogo
()
:
HTMLImageElement
=
js
.
noImpl
native
fun
getImage
(
src
:
String
)
:
HTMLImageElement
=
js
.
noImpl
\ No newline at end of file
js/js.libraries/src/html5/image.kt
已删除
100644 → 0
浏览文件 @
7e07414a
package
html5
import
js.Exception
import
js.native
import
js.DomElement
import
html5.files.FileList
native
class
HTMLInputElement
()
:
DomElement
()
{
val
files
:
FileList
=
js
.
noImpl
var
onchange
:
(
HTMLInputElementEvent
)->
Unit
=
js
.
noImpl
}
native
class
HTMLInputElementEvent
()
{
val
target
:
HTMLInputElement
=
js
.
noImpl
}
native
class
Image
()
:
HTMLImageElement
()
{
var
height
:
Int
=
js
.
noImpl
var
width
:
Int
=
js
.
noImpl
var
src
:
String
=
js
.
noImpl
var
onload
:
()->
Unit
=
js
.
noImpl
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录