Some tweaks in canvas api.

This commit is contained in:
Pavel V. Talanov
2012-03-30 20:02:27 +04:00
parent 8ed9a89d9e
commit fc843eca8f
5 changed files with 86 additions and 79 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ class Logo(override var pos : Vector) : Shape()
fun drawLogo(state : CanvasState) {
size = imageSize * (state.size.x / imageSize.x) * relSize
// getKotlinLogo() is a 'magic' function here defined only for purposes of demonstration but in fact it just find an element containing the logo
state.context.drawImage(getKotlinLogo(), 0.0, 0.0, imageSize.x, imageSize.y, position.x, position.y, size.x, size.y)
state.context.drawImage(getKotlinLogo(), 0, 0, imageSize.x.toInt(), imageSize.y.toInt(), position.x.toInt(), position.y.toInt(), size.x.toInt(), size.y.toInt())
}
override fun draw(state : CanvasState) {