examples update
This commit is contained in:
@@ -217,7 +217,7 @@
|
||||
}, draw:function (state) {
|
||||
{
|
||||
var context = state.get_context();
|
||||
context.drawImage(getJBLogo(), 0, 0, this.get_imageSize().get_x(), this.get_imageSize().get_y(), this.get_pos().get_x(), this.get_pos().get_y(), this.get_canvasSize().get_x(), this.get_canvasSize().get_y());
|
||||
context.drawImage(getKotlinLogo(), 0, 0, this.get_imageSize().get_x(), this.get_imageSize().get_y(), this.get_pos().get_x(), this.get_pos().get_y(), this.get_canvasSize().get_x(), this.get_canvasSize().get_y());
|
||||
}
|
||||
}, contains:function (mousePos) {
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import js.*;
|
||||
import js.Math;
|
||||
import js.setInterval
|
||||
import html5.getCanvas
|
||||
import html5.getJBLogo
|
||||
import html5.getKotlinLogo
|
||||
import jquery.jq
|
||||
import js.setTimeout
|
||||
|
||||
@@ -68,7 +68,7 @@ class JB(override var pos : Vector,
|
||||
|
||||
override fun draw(state : CanvasState) {
|
||||
val context = state.context;
|
||||
context.drawImage(getJBLogo(), 0.0, 0.0, imageSize.x, imageSize.y, pos.x, pos.y, canvasSize.x, canvasSize.y)
|
||||
context.drawImage(getKotlinLogo(), 0.0, 0.0, imageSize.x, imageSize.y, pos.x, pos.y, canvasSize.x, canvasSize.y)
|
||||
}
|
||||
|
||||
override fun contains(mousePos: Vector): Boolean = mousePos.isInRect(pos, canvasSize)
|
||||
|
||||
@@ -7,7 +7,7 @@ import js.*;
|
||||
import js.Math;
|
||||
import js.setInterval
|
||||
import html5.getCanvas
|
||||
import html5.getJBLogo
|
||||
import html5.getKotlinLogo
|
||||
import jquery.jq
|
||||
import js.setTimeout
|
||||
|
||||
@@ -34,7 +34,7 @@ class Logo(override var pos : Vector,
|
||||
|
||||
override fun draw(state : CanvasState) {
|
||||
val context = state.context;
|
||||
context.drawImage(getJBLogo(), 0.0, 0.0, imageSize.x, imageSize.y, pos.x, pos.y, canvasSize.x, canvasSize.y)
|
||||
context.drawImage(getKotlinLogo(), 0.0, 0.0, imageSize.x, imageSize.y, pos.x, pos.y, canvasSize.x, canvasSize.y)
|
||||
}
|
||||
|
||||
override fun contains(mousePos: Vector): Boolean = mousePos.isInRect(pos, canvasSize)
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
}, drawLogo:function (state) {
|
||||
{
|
||||
this.set_size(this.get_imageSize().times(state.get_size().get_x() / this.get_imageSize().get_x()).times(this.get_relSize()));
|
||||
state.get_context().drawImage(getJBLogo(), 0, 0, this.get_imageSize().get_x(), this.get_imageSize().get_y(), this.get_position().get_x(), this.get_position().get_y(), this.get_size().get_x(), this.get_size().get_y());
|
||||
state.get_context().drawImage(getKotlinLogo(), 0, 0, this.get_imageSize().get_x(), this.get_imageSize().get_y(), this.get_position().get_x(), this.get_position().get_y(), this.get_size().get_x(), this.get_size().get_y());
|
||||
}
|
||||
}, draw:function (state) {
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import js.*
|
||||
import js.Math
|
||||
import js.setInterval
|
||||
import html5.getCanvas
|
||||
import html5.getJBLogo
|
||||
import html5.getKotlinLogo
|
||||
import jquery.jq
|
||||
import js.setTimeout
|
||||
import java.util.List
|
||||
@@ -53,7 +53,7 @@ var relSize : Double = 0.25)
|
||||
|
||||
fun drawLogo(state : CanvasState) {
|
||||
size = imageSize * (state.size.x / imageSize.x) * relSize
|
||||
state.context.drawImage(getJBLogo(), 0.0, 0.0, imageSize.x, imageSize.y, position.x, position.y, size.x, size.y)
|
||||
state.context.drawImage(getKotlinLogo(), 0.0, 0.0, imageSize.x, imageSize.y, position.x, position.y, size.x, size.y)
|
||||
}
|
||||
|
||||
override fun draw(state : CanvasState) {
|
||||
|
||||
Reference in New Issue
Block a user