Hecl Builder

Easy Mobile Applications

mk
Download: .jad .jar
no rating Average rating:

MIDP Version: 2.0
Description: mkl
Last updated: Mon May 24 14:24:14 +0000 2010 by maarko57

#-- start 
set canvas [lcdui.canvas -title "2D Transformation" -autoflush 1 -fullscreen 1];

set p 0
set x 0
set y 0
set px 0
set py 0
set rot 0
set p_rot 0
set Xmax [$canvas cget -width]
set Ymax [$canvas cget -height]

#-- define the logo lable HECL
set logo [list]
#-- H
set sx [list [list 35 10] [list 35 -10] [list 35 0] [list 20 0] [list 20 10] [list 20 -10]]
set rx [list [list 35 10] [list 35 -10] [list 35 0] [list 20 0] [list 20 10] [list 20 -10]]
set index [llen $sx]
lappend $logo [list $sx $rx $index]

#-- E
set sx [list [list 5 10] [list 15 10] [list 15 0] [list 5 0] [list 15 0] [list 15 -10] [list 5 -10]]
set rx [list [list 5 10] [list 15 10] [list 15 0] [list 5 0] [list 15 0] [list 15 -10] [list 5 -10]]
set index [llen $sx]
lappend $logo [list $sx $rx $index]

#-- C
set sx [list [list -15 10] [list -5 10] [list -5 -10] [list -15 -10]]
set rx [list [list -15 10] [list -5 10] [list -5 -10] [list -15 -10]]
set index [llen $sx]
lappend $logo [list $sx $rx $index]

#-- L
set sx [list [list -25 -10] [list -25 10] [list -35 10]]
set rx [list [list -25 -10] [list -25 10] [list -35 10]]
set index [llen $sx]
lappend $logo [list $sx $rx $index]


proc rotate_dot {tr winkel sx rx} {
    global x y
    set r0 0
    set r1 0
    set beta [toRadians $winkel]
    set r0 [- [- $x [* [- [lindex [lindex $sx $tr] 0] $x] [cos $beta]]] [* [- [lindex [lindex $sx $tr] 1] $y] [sin $beta] ]]
    set r1 [+ [- $y [* [- [lindex [lindex $sx $tr] 1] $y] [cos $beta]]] [* [- [lindex [lindex $sx $tr] 0] $x] [sin $beta] ]]
    lset $rx $tr [lset [lindex $rx $tr] 0 $r0]
    lset $rx $tr [lset [lindex $rx $tr] 1 $r1]
}


Note: If you have trouble with the applets on this site, you might try upgrading your Jave Runtime Environment, in order to get the "Next-Generation Java Plug-In", available for download here: http://download.java.net/jdk6/