commit 20f48bca7738d31313d38f39d59592c7300e19a5 Author: jack Date: Mon Aug 17 23:57:04 2020 +0800 init comment diff --git a/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-11 23.52.zip b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-11 23.52.zip new file mode 100644 index 0000000..62d2f82 Binary files /dev/null and b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-11 23.52.zip differ diff --git a/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-12 00.46.zip b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-12 00.46.zip new file mode 100644 index 0000000..a9f3420 Binary files /dev/null and b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-12 00.46.zip differ diff --git a/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-17 23.30.zip b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-17 23.30.zip new file mode 100644 index 0000000..4d310ea Binary files /dev/null and b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-17 23.30.zip differ diff --git a/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-17 23.41.zip b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-17 23.41.zip new file mode 100644 index 0000000..2eb2582 Binary files /dev/null and b/migrationbitmapb4a/AutoBackups/Backup jacksbitmapdrawerb4amigration 2020-08-17 23.41.zip differ diff --git a/migrationbitmapb4a/Files/bitmapdrawer.bal b/migrationbitmapb4a/Files/bitmapdrawer.bal new file mode 100644 index 0000000..8dd7835 Binary files /dev/null and b/migrationbitmapb4a/Files/bitmapdrawer.bal differ diff --git a/migrationbitmapb4a/Objects/AndroidManifest.xml b/migrationbitmapb4a/Objects/AndroidManifest.xml new file mode 100644 index 0000000..218c07e --- /dev/null +++ b/migrationbitmapb4a/Objects/AndroidManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$anim.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$anim.class new file mode 100644 index 0000000..bf91d23 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$anim.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$attr.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$attr.class new file mode 100644 index 0000000..f5af6bd Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$attr.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$color.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$color.class new file mode 100644 index 0000000..f332d43 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$color.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$dimen.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$dimen.class new file mode 100644 index 0000000..1e62ae1 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$dimen.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$drawable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$drawable.class new file mode 100644 index 0000000..33e5f9c Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$drawable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$id.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$id.class new file mode 100644 index 0000000..c5cf9fb Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$id.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$integer.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$integer.class new file mode 100644 index 0000000..1a1e96b Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$integer.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$layout.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$layout.class new file mode 100644 index 0000000..c041277 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$layout.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$string.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$string.class new file mode 100644 index 0000000..e4253c1 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$string.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$style.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$style.class new file mode 100644 index 0000000..456cf2f Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$style.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$styleable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$styleable.class new file mode 100644 index 0000000..29a0b54 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R$styleable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R.class b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R.class new file mode 100644 index 0000000..d58789f Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/coordinatorlayout/R.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$anim.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$anim.class new file mode 100644 index 0000000..82fdb40 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$anim.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$attr.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$attr.class new file mode 100644 index 0000000..f726512 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$attr.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$color.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$color.class new file mode 100644 index 0000000..9425811 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$color.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$dimen.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$dimen.class new file mode 100644 index 0000000..8d45760 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$dimen.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$drawable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$drawable.class new file mode 100644 index 0000000..58818c4 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$drawable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$id.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$id.class new file mode 100644 index 0000000..8fb33eb Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$id.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$integer.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$integer.class new file mode 100644 index 0000000..8272978 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$integer.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$layout.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$layout.class new file mode 100644 index 0000000..10da8e4 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$layout.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$string.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$string.class new file mode 100644 index 0000000..ffda360 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$string.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$style.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$style.class new file mode 100644 index 0000000..51b1d87 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$style.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$styleable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$styleable.class new file mode 100644 index 0000000..5ca7696 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R$styleable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/core/R.class b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R.class new file mode 100644 index 0000000..4a402c2 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/core/R.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$anim.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$anim.class new file mode 100644 index 0000000..84a948a Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$anim.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$attr.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$attr.class new file mode 100644 index 0000000..b1836f6 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$attr.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$color.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$color.class new file mode 100644 index 0000000..b1dd3fb Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$color.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$dimen.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$dimen.class new file mode 100644 index 0000000..5b014d8 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$dimen.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$drawable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$drawable.class new file mode 100644 index 0000000..9268d05 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$drawable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$id.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$id.class new file mode 100644 index 0000000..b196a44 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$id.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$integer.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$integer.class new file mode 100644 index 0000000..b8cb1d8 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$integer.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$layout.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$layout.class new file mode 100644 index 0000000..cb3734b Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$layout.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$string.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$string.class new file mode 100644 index 0000000..d14f034 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$string.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$style.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$style.class new file mode 100644 index 0000000..f4e868b Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$style.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$styleable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$styleable.class new file mode 100644 index 0000000..4229f32 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R$styleable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R.class b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R.class new file mode 100644 index 0000000..88dbc12 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/fragment/R.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$anim.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$anim.class new file mode 100644 index 0000000..c54e23c Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$anim.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$attr.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$attr.class new file mode 100644 index 0000000..5356760 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$attr.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$color.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$color.class new file mode 100644 index 0000000..c059744 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$color.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$dimen.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$dimen.class new file mode 100644 index 0000000..5245d1f Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$dimen.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$drawable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$drawable.class new file mode 100644 index 0000000..7fa23ac Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$drawable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$id.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$id.class new file mode 100644 index 0000000..8644be2 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$id.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$integer.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$integer.class new file mode 100644 index 0000000..a6fade5 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$integer.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$layout.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$layout.class new file mode 100644 index 0000000..7b795cd Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$layout.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$string.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$string.class new file mode 100644 index 0000000..e023c86 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$string.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$style.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$style.class new file mode 100644 index 0000000..091611f Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$style.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$styleable.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$styleable.class new file mode 100644 index 0000000..2ad2a7a Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R$styleable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/androidx/media/R.class b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R.class new file mode 100644 index 0000000..159c407 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/androidx/media/R.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$anim.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$anim.class new file mode 100644 index 0000000..12b5eb0 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$anim.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$attr.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$attr.class new file mode 100644 index 0000000..2053bc0 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$attr.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$color.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$color.class new file mode 100644 index 0000000..225284a Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$color.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$dimen.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$dimen.class new file mode 100644 index 0000000..d978802 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$dimen.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$drawable.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$drawable.class new file mode 100644 index 0000000..cdfcd03 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$drawable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$id.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$id.class new file mode 100644 index 0000000..2067f6a Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$id.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$integer.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$integer.class new file mode 100644 index 0000000..a6f6fd6 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$integer.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$layout.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$layout.class new file mode 100644 index 0000000..0dde2d6 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$layout.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$string.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$string.class new file mode 100644 index 0000000..7c4012c Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$string.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$style.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$style.class new file mode 100644 index 0000000..f1e0f4a Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$style.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$styleable.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$styleable.class new file mode 100644 index 0000000..c70dda4 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R$styleable.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R.class new file mode 100644 index 0000000..28864dd Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/R.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/designerscripts/LS_bitmapdrawer.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/designerscripts/LS_bitmapdrawer.class new file mode 100644 index 0000000..a8229e7 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/designerscripts/LS_bitmapdrawer.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$1.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$1.class new file mode 100644 index 0000000..5b4c0ea Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$1.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$B4AMenuItemsClickListener.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$B4AMenuItemsClickListener.class new file mode 100644 index 0000000..0700765 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$B4AMenuItemsClickListener.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$HandleKeyDelayed.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$HandleKeyDelayed.class new file mode 100644 index 0000000..d85db71 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$HandleKeyDelayed.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_Activity_Resume.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_Activity_Resume.class new file mode 100644 index 0000000..0ae91c4 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_Activity_Resume.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_LocationChanged.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_LocationChanged.class new file mode 100644 index 0000000..a1edec9 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_LocationChanged.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_activity_create.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_activity_create.class new file mode 100644 index 0000000..da03434 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_activity_create.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_calcline.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_calcline.class new file mode 100644 index 0000000..4263b5e Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_calcline.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_lineintersect.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_lineintersect.class new file mode 100644 index 0000000..696f5dd Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_lineintersect.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_rectanglechecker.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_rectanglechecker.class new file mode 100644 index 0000000..27bd3d5 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_rectanglechecker.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_rectanglefiller.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_rectanglefiller.class new file mode 100644 index 0000000..0102e3d Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_rectanglefiller.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_trianglechecker.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_trianglechecker.class new file mode 100644 index 0000000..a7d89a2 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_trianglechecker.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_trianglefiller.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_trianglefiller.class new file mode 100644 index 0000000..8c78f4a Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumableSub_trianglefiller.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumeMessage.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumeMessage.class new file mode 100644 index 0000000..f423037 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$ResumeMessage.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$WaitForLayout.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$WaitForLayout.class new file mode 100644 index 0000000..171e7b4 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$WaitForLayout.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coord.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coord.class new file mode 100644 index 0000000..57e046d Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coord.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coordx.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coordx.class new file mode 100644 index 0000000..1f7bf30 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coordx.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coordxx.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coordxx.class new file mode 100644 index 0000000..c925761 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main$_coordxx.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main.class new file mode 100644 index 0000000..2cc29da Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/main.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$1.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$1.class new file mode 100644 index 0000000..b8623d8 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$1.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$2.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$2.class new file mode 100644 index 0000000..aab9d57 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$2.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$starter_BR.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$starter_BR.class new file mode 100644 index 0000000..407b225 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter$starter_BR.class differ diff --git a/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter.class b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter.class new file mode 100644 index 0000000..07b4a38 Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/classes/b4a/bitmapdrawer2/starter.class differ diff --git a/migrationbitmapb4a/Objects/bin/temp.ap_ b/migrationbitmapb4a/Objects/bin/temp.ap_ new file mode 100644 index 0000000..3ff272f Binary files /dev/null and b/migrationbitmapb4a/Objects/bin/temp.ap_ differ diff --git a/migrationbitmapb4a/Objects/classes.dex b/migrationbitmapb4a/Objects/classes.dex new file mode 100644 index 0000000..2eaa682 Binary files /dev/null and b/migrationbitmapb4a/Objects/classes.dex differ diff --git a/migrationbitmapb4a/Objects/jacksbitmapdrawerb4amigration.apk b/migrationbitmapb4a/Objects/jacksbitmapdrawerb4amigration.apk new file mode 100644 index 0000000..9ef6155 Binary files /dev/null and b/migrationbitmapb4a/Objects/jacksbitmapdrawerb4amigration.apk differ diff --git a/migrationbitmapb4a/Objects/res/drawable/icon.png b/migrationbitmapb4a/Objects/res/drawable/icon.png new file mode 100644 index 0000000..8fb72b4 Binary files /dev/null and b/migrationbitmapb4a/Objects/res/drawable/icon.png differ diff --git a/migrationbitmapb4a/Objects/res/values-v14/theme.xml b/migrationbitmapb4a/Objects/res/values-v14/theme.xml new file mode 100644 index 0000000..d89807d --- /dev/null +++ b/migrationbitmapb4a/Objects/res/values-v14/theme.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/migrationbitmapb4a/Objects/res/values-v20/theme.xml b/migrationbitmapb4a/Objects/res/values-v20/theme.xml new file mode 100644 index 0000000..cf34a99 --- /dev/null +++ b/migrationbitmapb4a/Objects/res/values-v20/theme.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main.class new file mode 100644 index 0000000..653db76 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_Activity_Resume.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_Activity_Resume.class new file mode 100644 index 0000000..e3d46af Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_Activity_Resume.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_LocationChanged.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_LocationChanged.class new file mode 100644 index 0000000..b8ab07d Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_LocationChanged.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_activity_create.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_activity_create.class new file mode 100644 index 0000000..4de140c Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_activity_create.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_calcline.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_calcline.class new file mode 100644 index 0000000..ab95537 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_calcline.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_lineintersect.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_lineintersect.class new file mode 100644 index 0000000..6a7290d Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_lineintersect.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_rectanglechecker.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_rectanglechecker.class new file mode 100644 index 0000000..e1a6ee7 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_rectanglechecker.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_rectanglefiller.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_rectanglefiller.class new file mode 100644 index 0000000..15f148b Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_rectanglefiller.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_trianglechecker.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_trianglechecker.class new file mode 100644 index 0000000..83a5c07 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_trianglechecker.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_trianglefiller.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_trianglefiller.class new file mode 100644 index 0000000..c1c9894 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0$ResumableSub_trianglefiller.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0.class new file mode 100644 index 0000000..df1a8ef Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/main_subs_0.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/starter.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/starter.class new file mode 100644 index 0000000..62ba750 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/starter.class differ diff --git a/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/starter_subs_0.class b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/starter_subs_0.class new file mode 100644 index 0000000..9cfe7c8 Binary files /dev/null and b/migrationbitmapb4a/Objects/shell/bin/classes/b4a/bitmapdrawer2/starter_subs_0.class differ diff --git a/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/designerscripts/LS_bitmapdrawer.java b/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/designerscripts/LS_bitmapdrawer.java new file mode 100644 index 0000000..6d1a4f1 --- /dev/null +++ b/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/designerscripts/LS_bitmapdrawer.java @@ -0,0 +1,15 @@ +package b4a.bitmapdrawer2.designerscripts; +import anywheresoftware.b4a.objects.TextViewWrapper; +import anywheresoftware.b4a.objects.ImageViewWrapper; +import anywheresoftware.b4a.BA; + + +public class LS_bitmapdrawer{ + +public static void LS_general(java.util.LinkedHashMap views, int width, int height, float scale) { +anywheresoftware.b4a.keywords.LayoutBuilder.setScaleRate(0.3); +//BA.debugLineNum = 2;BA.debugLine="AutoScaleAll"[bitmapdrawer/General script] +anywheresoftware.b4a.keywords.LayoutBuilder.scaleAll(views); + +} +} \ No newline at end of file diff --git a/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/main.java b/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/main.java new file mode 100644 index 0000000..68a6329 --- /dev/null +++ b/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/main.java @@ -0,0 +1,3031 @@ +package b4a.bitmapdrawer2; + + +import anywheresoftware.b4a.B4AMenuItem; +import android.app.Activity; +import android.os.Bundle; +import anywheresoftware.b4a.BA; +import anywheresoftware.b4a.BALayout; +import anywheresoftware.b4a.B4AActivity; +import anywheresoftware.b4a.ObjectWrapper; +import anywheresoftware.b4a.objects.ActivityWrapper; +import java.lang.reflect.InvocationTargetException; +import anywheresoftware.b4a.B4AUncaughtException; +import anywheresoftware.b4a.debug.*; +import java.lang.ref.WeakReference; + +public class main extends Activity implements B4AActivity{ + public static main mostCurrent; + static boolean afterFirstLayout; + static boolean isFirst = true; + private static boolean processGlobalsRun = false; + BALayout layout; + public static BA processBA; + BA activityBA; + ActivityWrapper _activity; + java.util.ArrayList menuItems; + public static final boolean fullScreen = false; + public static final boolean includeTitle = true; + public static WeakReference previousOne; + public static boolean dontPause; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mostCurrent = this; + if (processBA == null) { + processBA = new BA(this.getApplicationContext(), null, null, "b4a.bitmapdrawer2", "b4a.bitmapdrawer2.main"); + processBA.loadHtSubs(this.getClass()); + float deviceScale = getApplicationContext().getResources().getDisplayMetrics().density; + BALayout.setDeviceScale(deviceScale); + + } + else if (previousOne != null) { + Activity p = previousOne.get(); + if (p != null && p != this) { + BA.LogInfo("Killing previous instance (main)."); + p.finish(); + } + } + processBA.setActivityPaused(true); + processBA.runHook("oncreate", this, null); + if (!includeTitle) { + this.getWindow().requestFeature(android.view.Window.FEATURE_NO_TITLE); + } + if (fullScreen) { + getWindow().setFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN, + android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN); + } + + processBA.sharedProcessBA.activityBA = null; + layout = new BALayout(this); + setContentView(layout); + afterFirstLayout = false; + WaitForLayout wl = new WaitForLayout(); + if (anywheresoftware.b4a.objects.ServiceHelper.StarterHelper.startFromActivity(this, processBA, wl, false)) + BA.handler.postDelayed(wl, 5); + + } + static class WaitForLayout implements Runnable { + public void run() { + if (afterFirstLayout) + return; + if (mostCurrent == null) + return; + + if (mostCurrent.layout.getWidth() == 0) { + BA.handler.postDelayed(this, 5); + return; + } + mostCurrent.layout.getLayoutParams().height = mostCurrent.layout.getHeight(); + mostCurrent.layout.getLayoutParams().width = mostCurrent.layout.getWidth(); + afterFirstLayout = true; + mostCurrent.afterFirstLayout(); + } + } + private void afterFirstLayout() { + if (this != mostCurrent) + return; + activityBA = new BA(this, layout, processBA, "b4a.bitmapdrawer2", "b4a.bitmapdrawer2.main"); + + processBA.sharedProcessBA.activityBA = new java.lang.ref.WeakReference(activityBA); + anywheresoftware.b4a.objects.ViewWrapper.lastId = 0; + _activity = new ActivityWrapper(activityBA, "activity"); + anywheresoftware.b4a.Msgbox.isDismissing = false; + if (BA.isShellModeRuntimeCheck(processBA)) { + if (isFirst) + processBA.raiseEvent2(null, true, "SHELL", false); + processBA.raiseEvent2(null, true, "CREATE", true, "b4a.bitmapdrawer2.main", processBA, activityBA, _activity, anywheresoftware.b4a.keywords.Common.Density, mostCurrent); + _activity.reinitializeForShell(activityBA, "activity"); + } + initializeProcessGlobals(); + initializeGlobals(); + + BA.LogInfo("** Activity (main) Create, isFirst = " + isFirst + " **"); + processBA.raiseEvent2(null, true, "activity_create", false, isFirst); + isFirst = false; + if (this != mostCurrent) + return; + processBA.setActivityPaused(false); + BA.LogInfo("** Activity (main) Resume **"); + processBA.raiseEvent(null, "activity_resume"); + if (android.os.Build.VERSION.SDK_INT >= 11) { + try { + android.app.Activity.class.getMethod("invalidateOptionsMenu").invoke(this,(Object[]) null); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + public void addMenuItem(B4AMenuItem item) { + if (menuItems == null) + menuItems = new java.util.ArrayList(); + menuItems.add(item); + } + @Override + public boolean onCreateOptionsMenu(android.view.Menu menu) { + super.onCreateOptionsMenu(menu); + try { + if (processBA.subExists("activity_actionbarhomeclick")) { + Class.forName("android.app.ActionBar").getMethod("setHomeButtonEnabled", boolean.class).invoke( + getClass().getMethod("getActionBar").invoke(this), true); + } + } catch (Exception e) { + e.printStackTrace(); + } + if (processBA.runHook("oncreateoptionsmenu", this, new Object[] {menu})) + return true; + if (menuItems == null) + return false; + for (B4AMenuItem bmi : menuItems) { + android.view.MenuItem mi = menu.add(bmi.title); + if (bmi.drawable != null) + mi.setIcon(bmi.drawable); + if (android.os.Build.VERSION.SDK_INT >= 11) { + try { + if (bmi.addToBar) { + android.view.MenuItem.class.getMethod("setShowAsAction", int.class).invoke(mi, 1); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + mi.setOnMenuItemClickListener(new B4AMenuItemsClickListener(bmi.eventName.toLowerCase(BA.cul))); + } + + return true; + } + @Override + public boolean onOptionsItemSelected(android.view.MenuItem item) { + if (item.getItemId() == 16908332) { + processBA.raiseEvent(null, "activity_actionbarhomeclick"); + return true; + } + else + return super.onOptionsItemSelected(item); +} +@Override + public boolean onPrepareOptionsMenu(android.view.Menu menu) { + super.onPrepareOptionsMenu(menu); + processBA.runHook("onprepareoptionsmenu", this, new Object[] {menu}); + return true; + + } + protected void onStart() { + super.onStart(); + processBA.runHook("onstart", this, null); +} + protected void onStop() { + super.onStop(); + processBA.runHook("onstop", this, null); +} + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + if (processBA.subExists("activity_windowfocuschanged")) + processBA.raiseEvent2(null, true, "activity_windowfocuschanged", false, hasFocus); + } + private class B4AMenuItemsClickListener implements android.view.MenuItem.OnMenuItemClickListener { + private final String eventName; + public B4AMenuItemsClickListener(String eventName) { + this.eventName = eventName; + } + public boolean onMenuItemClick(android.view.MenuItem item) { + processBA.raiseEventFromUI(item.getTitle(), eventName + "_click"); + return true; + } + } + public static Class getObject() { + return main.class; + } + private Boolean onKeySubExist = null; + private Boolean onKeyUpSubExist = null; + @Override + public boolean onKeyDown(int keyCode, android.view.KeyEvent event) { + if (processBA.runHook("onkeydown", this, new Object[] {keyCode, event})) + return true; + if (onKeySubExist == null) + onKeySubExist = processBA.subExists("activity_keypress"); + if (onKeySubExist) { + if (keyCode == anywheresoftware.b4a.keywords.constants.KeyCodes.KEYCODE_BACK && + android.os.Build.VERSION.SDK_INT >= 18) { + HandleKeyDelayed hk = new HandleKeyDelayed(); + hk.kc = keyCode; + BA.handler.post(hk); + return true; + } + else { + boolean res = new HandleKeyDelayed().runDirectly(keyCode); + if (res) + return true; + } + } + return super.onKeyDown(keyCode, event); + } + private class HandleKeyDelayed implements Runnable { + int kc; + public void run() { + runDirectly(kc); + } + public boolean runDirectly(int keyCode) { + Boolean res = (Boolean)processBA.raiseEvent2(_activity, false, "activity_keypress", false, keyCode); + if (res == null || res == true) { + return true; + } + else if (keyCode == anywheresoftware.b4a.keywords.constants.KeyCodes.KEYCODE_BACK) { + finish(); + return true; + } + return false; + } + + } + @Override + public boolean onKeyUp(int keyCode, android.view.KeyEvent event) { + if (processBA.runHook("onkeyup", this, new Object[] {keyCode, event})) + return true; + if (onKeyUpSubExist == null) + onKeyUpSubExist = processBA.subExists("activity_keyup"); + if (onKeyUpSubExist) { + Boolean res = (Boolean)processBA.raiseEvent2(_activity, false, "activity_keyup", false, keyCode); + if (res == null || res == true) + return true; + } + return super.onKeyUp(keyCode, event); + } + @Override + public void onNewIntent(android.content.Intent intent) { + super.onNewIntent(intent); + this.setIntent(intent); + processBA.runHook("onnewintent", this, new Object[] {intent}); + } + @Override + public void onPause() { + super.onPause(); + if (_activity == null) + return; + if (this != mostCurrent) + return; + anywheresoftware.b4a.Msgbox.dismiss(true); + if (!dontPause) + BA.LogInfo("** Activity (main) Pause, UserClosed = " + activityBA.activity.isFinishing() + " **"); + else + BA.LogInfo("** Activity (main) Pause event (activity is not paused). **"); + if (mostCurrent != null) + processBA.raiseEvent2(_activity, true, "activity_pause", false, activityBA.activity.isFinishing()); + if (!dontPause) { + processBA.setActivityPaused(true); + mostCurrent = null; + } + + if (!activityBA.activity.isFinishing()) + previousOne = new WeakReference(this); + anywheresoftware.b4a.Msgbox.isDismissing = false; + processBA.runHook("onpause", this, null); + } + + @Override + public void onDestroy() { + super.onDestroy(); + previousOne = null; + processBA.runHook("ondestroy", this, null); + } + @Override + public void onResume() { + super.onResume(); + mostCurrent = this; + anywheresoftware.b4a.Msgbox.isDismissing = false; + if (activityBA != null) { //will be null during activity create (which waits for AfterLayout). + ResumeMessage rm = new ResumeMessage(mostCurrent); + BA.handler.post(rm); + } + processBA.runHook("onresume", this, null); + } + private static class ResumeMessage implements Runnable { + private final WeakReference activity; + public ResumeMessage(Activity activity) { + this.activity = new WeakReference(activity); + } + public void run() { + main mc = mostCurrent; + if (mc == null || mc != activity.get()) + return; + processBA.setActivityPaused(false); + BA.LogInfo("** Activity (main) Resume **"); + if (mc != mostCurrent) + return; + processBA.raiseEvent(mc._activity, "activity_resume", (Object[])null); + } + } + @Override + protected void onActivityResult(int requestCode, int resultCode, + android.content.Intent data) { + processBA.onActivityResult(requestCode, resultCode, data); + processBA.runHook("onactivityresult", this, new Object[] {requestCode, resultCode}); + } + private static void initializeGlobals() { + processBA.raiseEvent2(null, true, "globals", false, (Object[])null); + } + public void onRequestPermissionsResult(int requestCode, + String permissions[], int[] grantResults) { + for (int i = 0;i < permissions.length;i++) { + Object[] o = new Object[] {permissions[i], grantResults[i] == 0}; + processBA.raiseEventFromDifferentThread(null,null, 0, "activity_permissionresult", true, o); + } + + } + +public anywheresoftware.b4a.keywords.Common __c = null; +public b4a.bitmapdrawer2.main._coordx _mapsize = null; +public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null; +public static int _timerx = 0; +public anywheresoftware.b4a.objects.B4XCanvas.B4XRect _rectanglewholeb4x = null; +public anywheresoftware.b4a.objects.PanelWrapper _pnlgraph = null; +public anywheresoftware.b4a.objects.B4XCanvas _cvsgraph = null; +public anywheresoftware.b4a.objects.ImageViewWrapper _imvgraph = null; +public b4a.example.bcpath _pthgraph = null; +public b4a.example.bitmapcreator _bmcgraph = null; +public b4a.example.bitmapcreator _bmc2ndgraph = null; +public static double[] _pointx = null; +public static double[] _pointy = null; +public anywheresoftware.b4a.objects.Timer _timeriterate = null; +public static float _xpos = 0f; +public static float _ypos = 0f; +public static float _xposnew = 0f; +public static float _yposnew = 0f; +public static float _xposleft = 0f; +public static float _yposleft = 0f; +public static float _xposright = 0f; +public static float _yposright = 0f; +public static float _widthsection = 0f; +public static float _velocity = 0f; +public static float _heading = 0f; +public static float _headingrate = 0f; +public b4a.bitmapdrawer2.main._coordx _tractor1 = null; +public b4a.bitmapdrawer2.main._coordx _trailer1 = null; +public b4a.bitmapdrawer2.main._coordx _tractor0 = null; +public b4a.bitmapdrawer2.main._coordx _trailer0 = null; +public b4a.bitmapdrawer2.main._coordx _hitch1 = null; +public static float _offset_hitch = 0f; +public static float _offset_trailertoboom = 0f; +public static float _offset_trailerlength = 0f; +public static float[] _boomsectionwidth = null; +public b4a.bitmapdrawer2.main._coordx _vector1 = null; +public static float _vectorlength1 = 0f; +public b4a.bitmapdrawer2.main._coordx _boompoint0 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint00 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint01 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint1 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint10 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint11 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint2 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint20 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint21 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint3 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint30 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint31 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint4 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint40 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint41 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint5 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint50 = null; +public b4a.bitmapdrawer2.main._coordx _boompoint51 = null; +public b4a.bitmapdrawer2.main._coordx _boomcenter1 = null; +public b4a.bitmapdrawer2.main._coordx _unitvector1 = null; +public static int[] _boomcolor = null; +public static int _x1 = 0; +public static int _x2 = 0; +public static int _y1 = 0; +public static int _y2 = 0; +public b4a.bitmapdrawer2.main._coordx _p1 = null; +public b4a.bitmapdrawer2.main._coordx _p2 = null; +public b4a.bitmapdrawer2.main._coordx _p3 = null; +public b4a.bitmapdrawer2.main._coordx _p4 = null; +public b4a.bitmapdrawer2.main._coordx _a0 = null; +public b4a.bitmapdrawer2.main._coordx _a1 = null; +public b4a.bitmapdrawer2.main._coordx _b0 = null; +public b4a.bitmapdrawer2.main._coordx _b1 = null; +public anywheresoftware.b4a.objects.drawable.CanvasWrapper.RectWrapper _rectanglewhole = null; +public anywheresoftware.b4a.objects.drawable.CanvasWrapper _canvas1 = null; +public anywheresoftware.b4a.objects.RuntimePermissions _rp = null; +public static boolean _displayoutlines = false; +public static boolean _displayfill = false; +public static boolean _boomon = false; +public anywheresoftware.b4a.objects.B4XViewWrapper _panel1 = null; +public b4a.bitmapdrawer2.main._coordxx _origin = null; +public static float _deltalat = 0f; +public static float _deltalong = 0f; +public static int _xposorigin = 0; +public static int _yposorigin = 0; +public anywheresoftware.b4a.objects.B4XCanvas.B4XRect _b4arect1 = null; +public anywheresoftware.b4a.objects.PanelWrapper _section1colour = null; +public anywheresoftware.b4a.objects.PanelWrapper _section2colour = null; +public anywheresoftware.b4a.objects.PanelWrapper _section3colour = null; +public anywheresoftware.b4a.objects.PanelWrapper _section4colour = null; +public anywheresoftware.b4a.objects.PanelWrapper _section5colour = null; +public b4a.bitmapdrawer2.starter _starter = null; +public static class _coordx{ +public boolean IsInitialized; +public float y; +public float x; +public void Initialize() { +IsInitialized = true; +y = 0f; +x = 0f; +} +@Override + public String toString() { + return BA.TypeToString(this, false); + }} +public static class _coordxx{ +public boolean IsInitialized; +public float lat; +public float lng; +public void Initialize() { +IsInitialized = true; +lat = 0f; +lng = 0f; +} +@Override + public String toString() { + return BA.TypeToString(this, false); + }} +public static class _coord{ +public boolean IsInitialized; +public long lat; +public long lng; +public void Initialize() { +IsInitialized = true; +lat = 0L; +lng = 0L; +} +@Override + public String toString() { + return BA.TypeToString(this, false); + }} + +public static boolean isAnyActivityVisible() { + boolean vis = false; +vis = vis | (main.mostCurrent != null); +return vis;} +public static void _activity_create(boolean _firsttime) throws Exception{ +ResumableSub_activity_create rsub = new ResumableSub_activity_create(null,_firsttime); +rsub.resume(processBA, null); +} +public static class ResumableSub_activity_create extends BA.ResumableSub { +public ResumableSub_activity_create(b4a.bitmapdrawer2.main parent,boolean _firsttime) { +this.parent = parent; +this._firsttime = _firsttime; +} +b4a.bitmapdrawer2.main parent; +boolean _firsttime; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +return; + +case 0: +//C +this.state = 1; + //BA.debugLineNum = 148;BA.debugLine="Activity.LoadLayout(\"bitmapdrawer.bal\")"; +parent.mostCurrent._activity.LoadLayout("bitmapdrawer.bal",mostCurrent.activityBA); + //BA.debugLineNum = 151;BA.debugLine="b4arect1.Initialize(0,0,imvGraph.Width,imvGraph.H"; +parent.mostCurrent._b4arect1.Initialize((float) (0),(float) (0),(float) (parent.mostCurrent._imvgraph.getWidth()),(float) (parent.mostCurrent._imvgraph.getHeight())); + //BA.debugLineNum = 152;BA.debugLine="mapsize.Initialize"; +parent.mostCurrent._mapsize.Initialize(); + //BA.debugLineNum = 153;BA.debugLine="mapsize.x=1200"; +parent.mostCurrent._mapsize.x /*float*/ = (float) (1200); + //BA.debugLineNum = 154;BA.debugLine="mapsize.y=1200"; +parent.mostCurrent._mapsize.y /*float*/ = (float) (1200); + //BA.debugLineNum = 155;BA.debugLine="xposorigin=mapsize.x/2"; +parent._xposorigin = (int) (parent.mostCurrent._mapsize.x /*float*/ /(double)2); + //BA.debugLineNum = 156;BA.debugLine="yposorigin=mapsize.y/2"; +parent._yposorigin = (int) (parent.mostCurrent._mapsize.y /*float*/ /(double)2); + //BA.debugLineNum = 158;BA.debugLine="xpos = xposorigin"; +parent._xpos = (float) (parent._xposorigin); + //BA.debugLineNum = 159;BA.debugLine="ypos = yposorigin"; +parent._ypos = (float) (parent._yposorigin); + //BA.debugLineNum = 162;BA.debugLine="unitvector1.Initialize"; +parent.mostCurrent._unitvector1.Initialize(); + //BA.debugLineNum = 163;BA.debugLine="Offset_hitch = 0"; +parent._offset_hitch = (float) (0); + //BA.debugLineNum = 164;BA.debugLine="offset_trailerlength = 1"; +parent._offset_trailerlength = (float) (1); + //BA.debugLineNum = 165;BA.debugLine="offset_trailertoboom = 1"; +parent._offset_trailertoboom = (float) (1); + //BA.debugLineNum = 166;BA.debugLine="boomsectionwidth(1) = 8"; +parent._boomsectionwidth[(int) (1)] = (float) (8); + //BA.debugLineNum = 167;BA.debugLine="boomsectionwidth(2) = 8"; +parent._boomsectionwidth[(int) (2)] = (float) (8); + //BA.debugLineNum = 168;BA.debugLine="boomsectionwidth(3) = 8"; +parent._boomsectionwidth[(int) (3)] = (float) (8); + //BA.debugLineNum = 170;BA.debugLine="rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCAT"; +parent.mostCurrent._rp.CheckAndRequest(processBA,parent.mostCurrent._rp.PERMISSION_ACCESS_FINE_LOCATION); + //BA.debugLineNum = 171;BA.debugLine="a0.Initialize"; +parent.mostCurrent._a0.Initialize(); + //BA.debugLineNum = 172;BA.debugLine="a1.Initialize"; +parent.mostCurrent._a1.Initialize(); + //BA.debugLineNum = 173;BA.debugLine="b0.Initialize"; +parent.mostCurrent._b0.Initialize(); + //BA.debugLineNum = 174;BA.debugLine="b1.Initialize"; +parent.mostCurrent._b1.Initialize(); + //BA.debugLineNum = 175;BA.debugLine="trailer0.x=xpos"; +parent.mostCurrent._trailer0.x /*float*/ = parent._xpos; + //BA.debugLineNum = 176;BA.debugLine="trailer0.y=ypos-Offset_hitch-offset_trailerlength"; +parent.mostCurrent._trailer0.y /*float*/ = (float) (parent._ypos-parent._offset_hitch-parent._offset_trailerlength); + //BA.debugLineNum = 177;BA.debugLine="velocity = 10"; +parent._velocity = (float) (10); + //BA.debugLineNum = 178;BA.debugLine="heading = 180"; +parent._heading = (float) (180); + //BA.debugLineNum = 180;BA.debugLine="boompoint50.Initialize"; +parent.mostCurrent._boompoint50.Initialize(); + //BA.debugLineNum = 181;BA.debugLine="boompoint5.Initialize"; +parent.mostCurrent._boompoint5.Initialize(); + //BA.debugLineNum = 182;BA.debugLine="boompoint0.Initialize"; +parent.mostCurrent._boompoint0.Initialize(); + //BA.debugLineNum = 183;BA.debugLine="boompoint00.Initialize"; +parent.mostCurrent._boompoint00.Initialize(); + //BA.debugLineNum = 184;BA.debugLine="boompoint51.Initialize"; +parent.mostCurrent._boompoint51.Initialize(); + //BA.debugLineNum = 185;BA.debugLine="boompoint01.Initialize"; +parent.mostCurrent._boompoint01.Initialize(); + //BA.debugLineNum = 186;BA.debugLine="boompoint1.Initialize"; +parent.mostCurrent._boompoint1.Initialize(); + //BA.debugLineNum = 187;BA.debugLine="boompoint10.Initialize"; +parent.mostCurrent._boompoint10.Initialize(); + //BA.debugLineNum = 188;BA.debugLine="boompoint11.Initialize"; +parent.mostCurrent._boompoint11.Initialize(); + //BA.debugLineNum = 189;BA.debugLine="boompoint2.Initialize"; +parent.mostCurrent._boompoint2.Initialize(); + //BA.debugLineNum = 190;BA.debugLine="boompoint20.Initialize"; +parent.mostCurrent._boompoint20.Initialize(); + //BA.debugLineNum = 191;BA.debugLine="boompoint21.Initialize"; +parent.mostCurrent._boompoint21.Initialize(); + //BA.debugLineNum = 192;BA.debugLine="boompoint3.Initialize"; +parent.mostCurrent._boompoint3.Initialize(); + //BA.debugLineNum = 193;BA.debugLine="boompoint30.Initialize"; +parent.mostCurrent._boompoint30.Initialize(); + //BA.debugLineNum = 194;BA.debugLine="boompoint31.Initialize"; +parent.mostCurrent._boompoint31.Initialize(); + //BA.debugLineNum = 195;BA.debugLine="boompoint4.Initialize"; +parent.mostCurrent._boompoint4.Initialize(); + //BA.debugLineNum = 196;BA.debugLine="boompoint40.Initialize"; +parent.mostCurrent._boompoint40.Initialize(); + //BA.debugLineNum = 197;BA.debugLine="boompoint41.Initialize"; +parent.mostCurrent._boompoint41.Initialize(); + //BA.debugLineNum = 198;BA.debugLine="boompoint00.x=0"; +parent.mostCurrent._boompoint00.x /*float*/ = (float) (0); + //BA.debugLineNum = 199;BA.debugLine="boompoint50.x=0"; +parent.mostCurrent._boompoint50.x /*float*/ = (float) (0); + //BA.debugLineNum = 200;BA.debugLine="boompoint10.x=0"; +parent.mostCurrent._boompoint10.x /*float*/ = (float) (0); + //BA.debugLineNum = 201;BA.debugLine="boompoint20.x=0"; +parent.mostCurrent._boompoint20.x /*float*/ = (float) (0); + //BA.debugLineNum = 202;BA.debugLine="boompoint30.x=0"; +parent.mostCurrent._boompoint30.x /*float*/ = (float) (0); + //BA.debugLineNum = 203;BA.debugLine="boompoint40.x=0"; +parent.mostCurrent._boompoint40.x /*float*/ = (float) (0); + //BA.debugLineNum = 204;BA.debugLine="headingrate = 0"; +parent._headingrate = (float) (0); + //BA.debugLineNum = 205;BA.debugLine="widthsection = 100"; +parent._widthsection = (float) (100); + //BA.debugLineNum = 206;BA.debugLine="cvsGraph.Initialize(imvGraph)"; +parent.mostCurrent._cvsgraph.Initialize((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(parent.mostCurrent._imvgraph.getObject()))); + //BA.debugLineNum = 207;BA.debugLine="boomon=True"; +parent._boomon = anywheresoftware.b4a.keywords.Common.True; + //BA.debugLineNum = 208;BA.debugLine="boomcolor(0)=xui.Color_Green"; +parent._boomcolor[(int) (0)] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 209;BA.debugLine="boomcolor(1)=xui.Color_Green"; +parent._boomcolor[(int) (1)] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 210;BA.debugLine="boomcolor(2)=xui.Color_Green"; +parent._boomcolor[(int) (2)] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 211;BA.debugLine="boomcolor(3)=xui.Color_Green"; +parent._boomcolor[(int) (3)] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 212;BA.debugLine="boomcolor(4)=xui.Color_Green"; +parent._boomcolor[(int) (4)] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 213;BA.debugLine="Initialize(1)"; +_initialize((int) (1)); + //BA.debugLineNum = 215;BA.debugLine="Do While Starter.ValidGPS = False"; +if (true) break; + +case 1: +//do while +this.state = 4; +while (parent.mostCurrent._starter._validgps /*boolean*/ ==anywheresoftware.b4a.keywords.Common.False) { +this.state = 3; +if (true) break; +} +if (true) break; + +case 3: +//C +this.state = 1; + //BA.debugLineNum = 216;BA.debugLine="Sleep (100)"; +anywheresoftware.b4a.keywords.Common.Sleep(mostCurrent.activityBA,this,(int) (100)); +this.state = 5; +return; +case 5: +//C +this.state = 1; +; + if (true) break; + +case 4: +//C +this.state = -1; +; + //BA.debugLineNum = 220;BA.debugLine="location_center"; +_location_center(); + //BA.debugLineNum = 222;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static String _activity_pause(boolean _userclosed) throws Exception{ + //BA.debugLineNum = 922;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)"; + //BA.debugLineNum = 923;BA.debugLine="CallSubDelayed(Starter, \"StopGPS\")"; +anywheresoftware.b4a.keywords.Common.CallSubDelayed(processBA,(Object)(mostCurrent._starter.getObject()),"StopGPS"); + //BA.debugLineNum = 924;BA.debugLine="End Sub"; +return ""; +} +public static void _activity_resume() throws Exception{ +ResumableSub_Activity_Resume rsub = new ResumableSub_Activity_Resume(null); +rsub.resume(processBA, null); +} +public static class ResumableSub_Activity_Resume extends BA.ResumableSub { +public ResumableSub_Activity_Resume(b4a.bitmapdrawer2.main parent) { +this.parent = parent; +} +b4a.bitmapdrawer2.main parent; +String _permission = ""; +boolean _result = false; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +return; + +case 0: +//C +this.state = 1; + //BA.debugLineNum = 912;BA.debugLine="If Starter.GPS1.GPSEnabled = False Then"; +if (true) break; + +case 1: +//if +this.state = 12; +if (parent.mostCurrent._starter._gps1 /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled()==anywheresoftware.b4a.keywords.Common.False) { +this.state = 3; +}else { +this.state = 5; +}if (true) break; + +case 3: +//C +this.state = 12; + //BA.debugLineNum = 913;BA.debugLine="ToastMessageShow(\"Please enable the GPS device.\""; +anywheresoftware.b4a.keywords.Common.ToastMessageShow(BA.ObjectToCharSequence("Please enable the GPS device."),anywheresoftware.b4a.keywords.Common.True); + //BA.debugLineNum = 914;BA.debugLine="StartActivity(Starter.GPS1.LocationSettingsInten"; +anywheresoftware.b4a.keywords.Common.StartActivity(processBA,(Object)(parent.mostCurrent._starter._gps1 /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent())); + if (true) break; + +case 5: +//C +this.state = 6; + //BA.debugLineNum = 916;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION"; +parent.mostCurrent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(processBA,parent.mostCurrent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_ACCESS_FINE_LOCATION); + //BA.debugLineNum = 917;BA.debugLine="Wait For Activity_PermissionResult (Permission A"; +anywheresoftware.b4a.keywords.Common.WaitFor("activity_permissionresult", processBA, this, null); +this.state = 13; +return; +case 13: +//C +this.state = 6; +_permission = (String) result[0]; +_result = (Boolean) result[1]; +; + //BA.debugLineNum = 918;BA.debugLine="If Result Then CallSubDelayed(Starter, \"StartGPS"; +if (true) break; + +case 6: +//if +this.state = 11; +if (_result) { +this.state = 8; +;}if (true) break; + +case 8: +//C +this.state = 11; +anywheresoftware.b4a.keywords.Common.CallSubDelayed(processBA,(Object)(parent.mostCurrent._starter.getObject()),"StartGPS"); +if (true) break; + +case 11: +//C +this.state = 12; +; + if (true) break; + +case 12: +//C +this.state = -1; +; + //BA.debugLineNum = 920;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static void _activity_permissionresult(String _permission,boolean _result) throws Exception{ +} +public static boolean _application_error(anywheresoftware.b4a.objects.B4AException _error,String _stacktrace) throws Exception{ + //BA.debugLineNum = 622;BA.debugLine="Sub Application_Error (Error As Exception, StackTr"; + //BA.debugLineNum = 623;BA.debugLine="Return True"; +if (true) return anywheresoftware.b4a.keywords.Common.True; + //BA.debugLineNum = 624;BA.debugLine="End Sub"; +return false; +} +public static String _btnclear_click() throws Exception{ + //BA.debugLineNum = 459;BA.debugLine="Sub BtnClear_Click"; + //BA.debugLineNum = 462;BA.debugLine="bmcGraph.Initialize(pnlGraph.Width*10, pnlGraph.H"; +mostCurrent._bmcgraph._initialize(processBA,(int) (mostCurrent._pnlgraph.getWidth()*10),(int) (mostCurrent._pnlgraph.getHeight()*10)); + //BA.debugLineNum = 463;BA.debugLine="imvGraph.Bitmap=(bmcGraph.Bitmap)"; +mostCurrent._imvgraph.setBitmap((android.graphics.Bitmap)((mostCurrent._bmcgraph._getbitmap()).getObject())); + //BA.debugLineNum = 465;BA.debugLine="End Sub"; +return ""; +} +public static String _btndraw_click() throws Exception{ +int _intcolour = 0; +int _i = 0; +int _j = 0; +anywheresoftware.b4a.objects.B4XCanvas.B4XRect _r = null; +b4a.example.bitmapcreator._drawtask _dt = null; + //BA.debugLineNum = 472;BA.debugLine="Sub BtnDraw_Click"; + //BA.debugLineNum = 473;BA.debugLine="Dim intcolour As Int"; +_intcolour = 0; + //BA.debugLineNum = 474;BA.debugLine="For i=0 To pnlGraph.Width-1"; +{ +final int step2 = 1; +final int limit2 = (int) (mostCurrent._pnlgraph.getWidth()-1); +_i = (int) (0) ; +for (;_i <= limit2 ;_i = _i + step2 ) { + //BA.debugLineNum = 475;BA.debugLine="For j=0 To pnlGraph.Height-1"; +{ +final int step3 = 1; +final int limit3 = (int) (mostCurrent._pnlgraph.getHeight()-1); +_j = (int) (0) ; +for (;_j <= limit3 ;_j = _j + step3 ) { + //BA.debugLineNum = 476;BA.debugLine="intcolour = bmcGraph.GetColor(i,j)"; +_intcolour = mostCurrent._bmcgraph._getcolor(_i,_j); + //BA.debugLineNum = 478;BA.debugLine="If bmcGraph.GetColor(i,j) <> 0 Then 'fx.Colors."; +if (mostCurrent._bmcgraph._getcolor(_i,_j)!=0) { + }; + } +}; + } +}; + //BA.debugLineNum = 484;BA.debugLine="bmcGraph.DrawLine(0,0,pnlGraph.Width, 0,xui.Color"; +mostCurrent._bmcgraph._drawline((float) (0),(float) (0),(float) (mostCurrent._pnlgraph.getWidth()),(float) (0),mostCurrent._xui.Color_Magenta,(int) (100)); + //BA.debugLineNum = 485;BA.debugLine="Dim r As B4XRect"; +_r = new anywheresoftware.b4a.objects.B4XCanvas.B4XRect(); + //BA.debugLineNum = 487;BA.debugLine="r.Initialize(bmcGraph.mWidth/4, bmcGraph.mHeight/"; +_r.Initialize((float) (mostCurrent._bmcgraph._mwidth/(double)4),(float) (mostCurrent._bmcgraph._mheight/(double)4),(float) (mostCurrent._bmcgraph._mwidth*0.75),(float) (mostCurrent._bmcgraph._mheight*0.75)); + //BA.debugLineNum = 488;BA.debugLine="Dim dt As DrawTask = bmcGraph.CreateDrawTask(bmcG"; +_dt = mostCurrent._bmcgraph._createdrawtask((Object)(mostCurrent._bmcgraph),_r,(int) (mostCurrent._pnlgraph.getWidth()/(double)2),(int) (mostCurrent._pnlgraph.getHeight()/(double)2),anywheresoftware.b4a.keywords.Common.True); + //BA.debugLineNum = 489;BA.debugLine="dt.SrcScaleX = 1"; +_dt.SrcScaleX = (float) (1); + //BA.debugLineNum = 490;BA.debugLine="dt.SrcScaleY = 1"; +_dt.SrcScaleY = (float) (1); + //BA.debugLineNum = 491;BA.debugLine="dt.Degrees = 15"; +_dt.Degrees = (int) (15); + //BA.debugLineNum = 494;BA.debugLine="bmc2ndgraph.DrawBitmapCreatorTransformed(dt)"; +mostCurrent._bmc2ndgraph._drawbitmapcreatortransformed(_dt); + //BA.debugLineNum = 496;BA.debugLine="imvGraph.Bitmap=(bmc2ndgraph.Bitmap)"; +mostCurrent._imvgraph.setBitmap((android.graphics.Bitmap)((mostCurrent._bmc2ndgraph._getbitmap()).getObject())); + //BA.debugLineNum = 499;BA.debugLine="End Sub"; +return ""; +} +public static String _btnfast_click() throws Exception{ + //BA.debugLineNum = 434;BA.debugLine="Sub BtnFast_Click"; + //BA.debugLineNum = 435;BA.debugLine="velocity = velocity + 1"; +_velocity = (float) (_velocity+1); + //BA.debugLineNum = 437;BA.debugLine="End Sub"; +return ""; +} +public static String _btnleft_click() throws Exception{ + //BA.debugLineNum = 448;BA.debugLine="Sub BtnLeft_Click"; + //BA.debugLineNum = 450;BA.debugLine="headingrate = headingrate -1"; +_headingrate = (float) (_headingrate-1); + //BA.debugLineNum = 452;BA.debugLine="End Sub"; +return ""; +} +public static String _btnright_click() throws Exception{ + //BA.debugLineNum = 454;BA.debugLine="Sub BtnRight_Click"; + //BA.debugLineNum = 455;BA.debugLine="headingrate = headingrate +1"; +_headingrate = (float) (_headingrate+1); + //BA.debugLineNum = 457;BA.debugLine="End Sub"; +return ""; +} +public static String _btnslow_click() throws Exception{ + //BA.debugLineNum = 444;BA.debugLine="Sub BtnSlow_Click"; + //BA.debugLineNum = 445;BA.debugLine="velocity = velocity - 1"; +_velocity = (float) (_velocity-1); + //BA.debugLineNum = 446;BA.debugLine="End Sub"; +return ""; +} +public static String _btnstop_click() throws Exception{ + //BA.debugLineNum = 439;BA.debugLine="Sub BtnStop_Click"; + //BA.debugLineNum = 440;BA.debugLine="velocity = 0"; +_velocity = (float) (0); + //BA.debugLineNum = 442;BA.debugLine="End Sub"; +return ""; +} +public static anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _calcline(int _tx1,int _ty1,int _tx2,int _ty2,anywheresoftware.b4a.objects.collections.List _linenumber,anywheresoftware.b4a.objects.collections.List _lineynumber) throws Exception{ +ResumableSub_calcline rsub = new ResumableSub_calcline(null,_tx1,_ty1,_tx2,_ty2,_linenumber,_lineynumber); +rsub.resume(processBA, null); +return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); +} +public static class ResumableSub_calcline extends BA.ResumableSub { +public ResumableSub_calcline(b4a.bitmapdrawer2.main parent,int _tx1,int _ty1,int _tx2,int _ty2,anywheresoftware.b4a.objects.collections.List _linenumber,anywheresoftware.b4a.objects.collections.List _lineynumber) { +this.parent = parent; +this._tx1 = _tx1; +this._ty1 = _ty1; +this._tx2 = _tx2; +this._ty2 = _ty2; +this._linenumber = _linenumber; +this._lineynumber = _lineynumber; +} +b4a.bitmapdrawer2.main parent; +int _tx1; +int _ty1; +int _tx2; +int _ty2; +anywheresoftware.b4a.objects.collections.List _linenumber; +anywheresoftware.b4a.objects.collections.List _lineynumber; +int _x = 0; +int _y = 0; +int _dx = 0; +int _dy = 0; +int _signx = 0; +int _signy = 0; +boolean _changed = false; +float _e = 0f; +int _i = 0; +int step15; +int limit15; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +{ +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;} +case 0: +//C +this.state = 1; + //BA.debugLineNum = 800;BA.debugLine="Dim x As Int = tx1"; +_x = _tx1; + //BA.debugLineNum = 801;BA.debugLine="Dim y As Int = ty1"; +_y = _ty1; + //BA.debugLineNum = 803;BA.debugLine="Dim dx As Int = Abs(tx2 - tx1)"; +_dx = (int) (anywheresoftware.b4a.keywords.Common.Abs(_tx2-_tx1)); + //BA.debugLineNum = 804;BA.debugLine="Dim dy As Int = Abs(ty2 - ty1)"; +_dy = (int) (anywheresoftware.b4a.keywords.Common.Abs(_ty2-_ty1)); + //BA.debugLineNum = 806;BA.debugLine="Dim signx As Int = (tx2-tx1)/dx"; +_signx = (int) ((_tx2-_tx1)/(double)_dx); + //BA.debugLineNum = 807;BA.debugLine="Dim signy As Int = (ty2-ty1)/dy"; +_signy = (int) ((_ty2-_ty1)/(double)_dy); + //BA.debugLineNum = 809;BA.debugLine="Dim changed As Boolean = False"; +_changed = anywheresoftware.b4a.keywords.Common.False; + //BA.debugLineNum = 812;BA.debugLine="If (dy>=dx) Then"; +if (true) break; + +case 1: +//if +this.state = 6; +if ((_dy>=_dx)) { +this.state = 3; +}else { +this.state = 5; +}if (true) break; + +case 3: +//C +this.state = 6; + //BA.debugLineNum = 813;BA.debugLine="Dim dy As Int = Abs(tx2 - tx1) 'swap"; +_dy = (int) (anywheresoftware.b4a.keywords.Common.Abs(_tx2-_tx1)); + //BA.debugLineNum = 814;BA.debugLine="Dim dx As Int = Abs(ty2 - ty1)"; +_dx = (int) (anywheresoftware.b4a.keywords.Common.Abs(_ty2-_ty1)); + //BA.debugLineNum = 815;BA.debugLine="changed = True"; +_changed = anywheresoftware.b4a.keywords.Common.True; + if (true) break; + +case 5: +//C +this.state = 6; + if (true) break; + +case 6: +//C +this.state = 7; +; + //BA.debugLineNum = 826;BA.debugLine="Dim e As Float = (2*dy)-dx"; +_e = (float) ((2*_dy)-_dx); + //BA.debugLineNum = 827;BA.debugLine="For i=1 To dx"; +if (true) break; + +case 7: +//for +this.state = 28; +step15 = 1; +limit15 = _dx; +_i = (int) (1) ; +this.state = 29; +if (true) break; + +case 29: +//C +this.state = 28; +if ((step15 > 0 && _i <= limit15) || (step15 < 0 && _i >= limit15)) this.state = 9; +if (true) break; + +case 30: +//C +this.state = 29; +_i = ((int)(0 + _i + step15)) ; +if (true) break; + +case 9: +//C +this.state = 10; + //BA.debugLineNum = 829;BA.debugLine="If lineynumber.Get(lineynumber.size-1)<>y Then"; +if (true) break; + +case 10: +//if +this.state = 13; +if ((_lineynumber.Get((int) (_lineynumber.getSize()-1))).equals((Object)(_y)) == false) { +this.state = 12; +}if (true) break; + +case 12: +//C +this.state = 13; + //BA.debugLineNum = 830;BA.debugLine="linenumber.add(x)"; +_linenumber.Add((Object)(_x)); + //BA.debugLineNum = 831;BA.debugLine="lineynumber.add(y)"; +_lineynumber.Add((Object)(_y)); + if (true) break; +; + //BA.debugLineNum = 833;BA.debugLine="Do While e>=0"; + +case 13: +//do while +this.state = 22; +while (_e>=0) { +this.state = 15; +if (true) break; +} +if (true) break; + +case 15: +//C +this.state = 16; + //BA.debugLineNum = 834;BA.debugLine="If changed=True Then"; +if (true) break; + +case 16: +//if +this.state = 21; +if (_changed==anywheresoftware.b4a.keywords.Common.True) { +this.state = 18; +}else { +this.state = 20; +}if (true) break; + +case 18: +//C +this.state = 21; + //BA.debugLineNum = 836;BA.debugLine="x=x+signx"; +_x = (int) (_x+_signx); + if (true) break; + +case 20: +//C +this.state = 21; + //BA.debugLineNum = 842;BA.debugLine="y=y+signy"; +_y = (int) (_y+_signy); + if (true) break; + +case 21: +//C +this.state = 13; +; + //BA.debugLineNum = 847;BA.debugLine="e=e-2*dx"; +_e = (float) (_e-2*_dx); + if (true) break; +; + //BA.debugLineNum = 849;BA.debugLine="If changed=True Then"; + +case 22: +//if +this.state = 27; +if (_changed==anywheresoftware.b4a.keywords.Common.True) { +this.state = 24; +}else { +this.state = 26; +}if (true) break; + +case 24: +//C +this.state = 27; + //BA.debugLineNum = 850;BA.debugLine="y =y+signy"; +_y = (int) (_y+_signy); + if (true) break; + +case 26: +//C +this.state = 27; + //BA.debugLineNum = 852;BA.debugLine="x =x+signx"; +_x = (int) (_x+_signx); + if (true) break; + +case 27: +//C +this.state = 30; +; + //BA.debugLineNum = 854;BA.debugLine="e=e+(2*dy)"; +_e = (float) (_e+(2*_dy)); + if (true) break; +if (true) break; + +case 28: +//C +this.state = -1; +; + //BA.debugLineNum = 860;BA.debugLine="Return Null"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,anywheresoftware.b4a.keywords.Common.Null);return;}; + //BA.debugLineNum = 862;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static String _globals() throws Exception{ + //BA.debugLineNum = 28;BA.debugLine="Sub Globals"; + //BA.debugLineNum = 29;BA.debugLine="Type coordX (y As Float,x As Float)"; +; + //BA.debugLineNum = 30;BA.debugLine="Type coordxx (lat As Float,lng As Float)"; +; + //BA.debugLineNum = 31;BA.debugLine="Private mapsize As coordX"; +mostCurrent._mapsize = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 34;BA.debugLine="Private xui As XUI"; +mostCurrent._xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI(); + //BA.debugLineNum = 35;BA.debugLine="Private timerx As Int"; +_timerx = 0; + //BA.debugLineNum = 36;BA.debugLine="Private rectanglewholeb4x As B4XRect"; +mostCurrent._rectanglewholeb4x = new anywheresoftware.b4a.objects.B4XCanvas.B4XRect(); + //BA.debugLineNum = 38;BA.debugLine="Private pnlGraph As Panel"; +mostCurrent._pnlgraph = new anywheresoftware.b4a.objects.PanelWrapper(); + //BA.debugLineNum = 39;BA.debugLine="Private cvsGraph As B4XCanvas"; +mostCurrent._cvsgraph = new anywheresoftware.b4a.objects.B4XCanvas(); + //BA.debugLineNum = 40;BA.debugLine="Private imvGraph As ImageView"; +mostCurrent._imvgraph = new anywheresoftware.b4a.objects.ImageViewWrapper(); + //BA.debugLineNum = 41;BA.debugLine="Private pthGraph As BCPath"; +mostCurrent._pthgraph = new b4a.example.bcpath(); + //BA.debugLineNum = 42;BA.debugLine="Private bmcGraph As BitmapCreator"; +mostCurrent._bmcgraph = new b4a.example.bitmapcreator(); + //BA.debugLineNum = 43;BA.debugLine="Private bmc2ndgraph As BitmapCreator"; +mostCurrent._bmc2ndgraph = new b4a.example.bitmapcreator(); + //BA.debugLineNum = 45;BA.debugLine="Private PointX(6), PointY(6) As Double"; +_pointx = new double[(int) (6)]; +; +_pointy = new double[(int) (6)]; +; + //BA.debugLineNum = 54;BA.debugLine="Private timeriterate As Timer"; +mostCurrent._timeriterate = new anywheresoftware.b4a.objects.Timer(); + //BA.debugLineNum = 55;BA.debugLine="Private xpos, ypos, xposnew, yposnew As Float"; +_xpos = 0f; +_ypos = 0f; +_xposnew = 0f; +_yposnew = 0f; + //BA.debugLineNum = 57;BA.debugLine="Private xposleft, yposleft, xposright, yposright,"; +_xposleft = 0f; +_yposleft = 0f; +_xposright = 0f; +_yposright = 0f; +_widthsection = 0f; + //BA.debugLineNum = 58;BA.debugLine="Private velocity, heading, headingrate As Float"; +_velocity = 0f; +_heading = 0f; +_headingrate = 0f; + //BA.debugLineNum = 62;BA.debugLine="Private tractor1 As coordX 'location of tractor"; +mostCurrent._tractor1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 63;BA.debugLine="Private trailer1 As coordX 'location of center of"; +mostCurrent._trailer1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 64;BA.debugLine="Private tractor0 As coordX 'location of tractor"; +mostCurrent._tractor0 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 65;BA.debugLine="Private trailer0 As coordX 'location of center of"; +mostCurrent._trailer0 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 66;BA.debugLine="Private hitch1 As coordX 'location of tractor hit"; +mostCurrent._hitch1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 67;BA.debugLine="Private Offset_hitch As Float"; +_offset_hitch = 0f; + //BA.debugLineNum = 68;BA.debugLine="Private offset_trailertoboom As Float"; +_offset_trailertoboom = 0f; + //BA.debugLineNum = 69;BA.debugLine="Private offset_trailerlength As Float"; +_offset_trailerlength = 0f; + //BA.debugLineNum = 70;BA.debugLine="Private boomsectionwidth(4) As Float 'center is 1"; +_boomsectionwidth = new float[(int) (4)]; +; + //BA.debugLineNum = 71;BA.debugLine="Private vector1 As coordX"; +mostCurrent._vector1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 72;BA.debugLine="Private vectorlength1 As Float"; +_vectorlength1 = 0f; + //BA.debugLineNum = 73;BA.debugLine="Private boompoint0 As coordX"; +mostCurrent._boompoint0 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 74;BA.debugLine="Private boompoint00 As coordX"; +mostCurrent._boompoint00 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 75;BA.debugLine="Private boompoint01 As coordX 'leading point"; +mostCurrent._boompoint01 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 76;BA.debugLine="Private boompoint1 As coordX"; +mostCurrent._boompoint1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 77;BA.debugLine="Private boompoint10 As coordX"; +mostCurrent._boompoint10 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 78;BA.debugLine="Private boompoint11 As coordX"; +mostCurrent._boompoint11 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 79;BA.debugLine="Private boompoint2 As coordX"; +mostCurrent._boompoint2 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 80;BA.debugLine="Private boompoint20 As coordX"; +mostCurrent._boompoint20 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 81;BA.debugLine="Private boompoint21 As coordX"; +mostCurrent._boompoint21 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 82;BA.debugLine="Private boompoint3 As coordX"; +mostCurrent._boompoint3 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 83;BA.debugLine="Private boompoint30 As coordX"; +mostCurrent._boompoint30 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 84;BA.debugLine="Private boompoint31 As coordX"; +mostCurrent._boompoint31 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 85;BA.debugLine="Private boompoint4 As coordX"; +mostCurrent._boompoint4 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 86;BA.debugLine="Private boompoint40 As coordX"; +mostCurrent._boompoint40 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 87;BA.debugLine="Private boompoint41 As coordX"; +mostCurrent._boompoint41 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 88;BA.debugLine="Private boompoint5 As coordX"; +mostCurrent._boompoint5 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 89;BA.debugLine="Private boompoint50 As coordX"; +mostCurrent._boompoint50 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 90;BA.debugLine="Private boompoint51 As coordX 'leading point"; +mostCurrent._boompoint51 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 91;BA.debugLine="Private boomcenter1 As coordX"; +mostCurrent._boomcenter1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 92;BA.debugLine="Private unitvector1 As coordX"; +mostCurrent._unitvector1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 93;BA.debugLine="Private boomcolor(5) As Int"; +_boomcolor = new int[(int) (5)]; +; + //BA.debugLineNum = 102;BA.debugLine="Public x1 As Int"; +_x1 = 0; + //BA.debugLineNum = 103;BA.debugLine="Public x2 As Int"; +_x2 = 0; + //BA.debugLineNum = 104;BA.debugLine="Public y1 As Int"; +_y1 = 0; + //BA.debugLineNum = 105;BA.debugLine="Public y2 As Int"; +_y2 = 0; + //BA.debugLineNum = 107;BA.debugLine="Public P1 As coordX"; +mostCurrent._p1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 108;BA.debugLine="Public P2 As coordX"; +mostCurrent._p2 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 109;BA.debugLine="Public P3 As coordX"; +mostCurrent._p3 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 110;BA.debugLine="Public P4 As coordX"; +mostCurrent._p4 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 112;BA.debugLine="Public a0 As coordX"; +mostCurrent._a0 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 113;BA.debugLine="Public a1 As coordX"; +mostCurrent._a1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 114;BA.debugLine="Public b0 As coordX"; +mostCurrent._b0 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 115;BA.debugLine="Public b1 As coordX"; +mostCurrent._b1 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 117;BA.debugLine="Public rectanglewhole As Rect"; +mostCurrent._rectanglewhole = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.RectWrapper(); + //BA.debugLineNum = 118;BA.debugLine="Public canvas1 As Canvas"; +mostCurrent._canvas1 = new anywheresoftware.b4a.objects.drawable.CanvasWrapper(); + //BA.debugLineNum = 119;BA.debugLine="Private rp As RuntimePermissions"; +mostCurrent._rp = new anywheresoftware.b4a.objects.RuntimePermissions(); + //BA.debugLineNum = 121;BA.debugLine="Dim displayoutlines As Boolean"; +_displayoutlines = false; + //BA.debugLineNum = 122;BA.debugLine="Dim displayfill As Boolean"; +_displayfill = false; + //BA.debugLineNum = 125;BA.debugLine="Public boomon As Boolean"; +_boomon = false; + //BA.debugLineNum = 126;BA.debugLine="Private Panel1 As B4XView"; +mostCurrent._panel1 = new anywheresoftware.b4a.objects.B4XViewWrapper(); + //BA.debugLineNum = 128;BA.debugLine="Type coord (lat As Long,lng As Long)"; +; + //BA.debugLineNum = 131;BA.debugLine="Public origin As coordxx"; +mostCurrent._origin = new b4a.bitmapdrawer2.main._coordxx(); + //BA.debugLineNum = 132;BA.debugLine="Private deltalat As Float"; +_deltalat = 0f; + //BA.debugLineNum = 133;BA.debugLine="Private deltalong As Float"; +_deltalong = 0f; + //BA.debugLineNum = 134;BA.debugLine="Private xposorigin As Int"; +_xposorigin = 0; + //BA.debugLineNum = 135;BA.debugLine="Private yposorigin As Int"; +_yposorigin = 0; + //BA.debugLineNum = 136;BA.debugLine="Private b4arect1 As B4XRect"; +mostCurrent._b4arect1 = new anywheresoftware.b4a.objects.B4XCanvas.B4XRect(); + //BA.debugLineNum = 137;BA.debugLine="Private section1colour As Panel"; +mostCurrent._section1colour = new anywheresoftware.b4a.objects.PanelWrapper(); + //BA.debugLineNum = 138;BA.debugLine="Private section2colour As Panel"; +mostCurrent._section2colour = new anywheresoftware.b4a.objects.PanelWrapper(); + //BA.debugLineNum = 139;BA.debugLine="Private section3colour As Panel"; +mostCurrent._section3colour = new anywheresoftware.b4a.objects.PanelWrapper(); + //BA.debugLineNum = 140;BA.debugLine="Private section4colour As Panel"; +mostCurrent._section4colour = new anywheresoftware.b4a.objects.PanelWrapper(); + //BA.debugLineNum = 141;BA.debugLine="Private section5colour As Panel"; +mostCurrent._section5colour = new anywheresoftware.b4a.objects.PanelWrapper(); + //BA.debugLineNum = 142;BA.debugLine="End Sub"; +return ""; +} +public static String _initialize(int _index) throws Exception{ + //BA.debugLineNum = 627;BA.debugLine="Private Sub Initialize(Index As Int)"; + //BA.debugLineNum = 629;BA.debugLine="bmcGraph.Initialize(1000,1000)"; +mostCurrent._bmcgraph._initialize(processBA,(int) (1000),(int) (1000)); + //BA.debugLineNum = 636;BA.debugLine="bmc2ndgraph.Initialize(mapsize.x, mapsize.y)"; +mostCurrent._bmc2ndgraph._initialize(processBA,(int) (mostCurrent._mapsize.x /*float*/ ),(int) (mostCurrent._mapsize.y /*float*/ )); + //BA.debugLineNum = 637;BA.debugLine="rectanglewhole.Initialize(0,0,mapsize.x,mapsize.y"; +mostCurrent._rectanglewhole.Initialize((int) (0),(int) (0),(int) (mostCurrent._mapsize.x /*float*/ ),(int) (mostCurrent._mapsize.y /*float*/ )); + //BA.debugLineNum = 638;BA.debugLine="rectanglewholeb4x.Initialize(0,0,1000,1000)"; +mostCurrent._rectanglewholeb4x.Initialize((float) (0),(float) (0),(float) (1000),(float) (1000)); + //BA.debugLineNum = 639;BA.debugLine="bmcGraph.DrawRect(rectanglewholeb4x,xui.Color_whi"; +mostCurrent._bmcgraph._drawrect(mostCurrent._rectanglewholeb4x,mostCurrent._xui.Color_White,anywheresoftware.b4a.keywords.Common.True,(int) (1)); + //BA.debugLineNum = 640;BA.debugLine="bmcGraph.DrawLine(5,900,900,5,xui.Color_green,60)"; +mostCurrent._bmcgraph._drawline((float) (5),(float) (900),(float) (900),(float) (5),mostCurrent._xui.Color_Green,(int) (60)); + //BA.debugLineNum = 641;BA.debugLine="bmcGraph.DrawLine(5,300,300,5,xui.Color_green,40)"; +mostCurrent._bmcgraph._drawline((float) (5),(float) (300),(float) (300),(float) (5),mostCurrent._xui.Color_Green,(int) (40)); + //BA.debugLineNum = 645;BA.debugLine="End Sub"; +return ""; +} +public static anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _lineintersect(b4a.bitmapdrawer2.main._coordx _point1p,b4a.bitmapdrawer2.main._coordx _point1c,b4a.bitmapdrawer2.main._coordx _point1f,b4a.bitmapdrawer2.main._coordx _point2p,b4a.bitmapdrawer2.main._coordx _point2c,b4a.bitmapdrawer2.main._coordx _point2f,int _k) throws Exception{ +ResumableSub_lineintersect rsub = new ResumableSub_lineintersect(null,_point1p,_point1c,_point1f,_point2p,_point2c,_point2f,_k); +rsub.resume(processBA, null); +return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); +} +public static class ResumableSub_lineintersect extends BA.ResumableSub { +public ResumableSub_lineintersect(b4a.bitmapdrawer2.main parent,b4a.bitmapdrawer2.main._coordx _point1p,b4a.bitmapdrawer2.main._coordx _point1c,b4a.bitmapdrawer2.main._coordx _point1f,b4a.bitmapdrawer2.main._coordx _point2p,b4a.bitmapdrawer2.main._coordx _point2c,b4a.bitmapdrawer2.main._coordx _point2f,int _k) { +this.parent = parent; +this._point1p = _point1p; +this._point1c = _point1c; +this._point1f = _point1f; +this._point2p = _point2p; +this._point2c = _point2c; +this._point2f = _point2f; +this._k = _k; +} +b4a.bitmapdrawer2.main parent; +b4a.bitmapdrawer2.main._coordx _point1p; +b4a.bitmapdrawer2.main._coordx _point1c; +b4a.bitmapdrawer2.main._coordx _point1f; +b4a.bitmapdrawer2.main._coordx _point2p; +b4a.bitmapdrawer2.main._coordx _point2c; +b4a.bitmapdrawer2.main._coordx _point2f; +int _k; +float _u = 0f; +float _v = 0f; +float _denominat = 0f; +b4a.bitmapdrawer2.main._coordx _intersectpoint = null; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +{ +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;} +case 0: +//C +this.state = 1; + //BA.debugLineNum = 933;BA.debugLine="Dim U As Float"; +_u = 0f; + //BA.debugLineNum = 934;BA.debugLine="Dim V As Float"; +_v = 0f; + //BA.debugLineNum = 935;BA.debugLine="Dim denominat As Float"; +_denominat = 0f; + //BA.debugLineNum = 936;BA.debugLine="Dim intersectpoint As coordX"; +_intersectpoint = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 937;BA.debugLine="intersectpoint.Initialize"; +_intersectpoint.Initialize(); + //BA.debugLineNum = 940;BA.debugLine="denominat=(point2c.x-point1c.x)*(point2f.y-point1"; +_denominat = (float) ((_point2c.x /*float*/ -_point1c.x /*float*/ )*(_point2f.y /*float*/ -_point1f.y /*float*/ )-(_point2c.y /*float*/ -_point1c.y /*float*/ )*(_point2f.x /*float*/ -_point1f.x /*float*/ )); + //BA.debugLineNum = 941;BA.debugLine="If denominat=0 Then"; +if (true) break; + +case 1: +//if +this.state = 4; +if (_denominat==0) { +this.state = 3; +}if (true) break; + +case 3: +//C +this.state = 4; + //BA.debugLineNum = 943;BA.debugLine="rectanglefiller(point1c,point1p,point2p,point2c,"; +_rectanglefiller(_point1c,_point1p,_point2p,_point2c,_k); + //BA.debugLineNum = 944;BA.debugLine="rectanglechecker(point1f,point1c,point2c,point2f"; +_rectanglechecker(_point1f,_point1c,_point2c,_point2f,_k); + //BA.debugLineNum = 945;BA.debugLine="Return"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;}; + if (true) break; + +case 4: +//C +this.state = 5; +; + //BA.debugLineNum = 947;BA.debugLine="U=((point1c.y-point1f.y)*(point2f.x-point1f.x)-(p"; +_u = (float) (((_point1c.y /*float*/ -_point1f.y /*float*/ )*(_point2f.x /*float*/ -_point1f.x /*float*/ )-(_point2f.y /*float*/ -_point1f.y /*float*/ )*(_point1c.x /*float*/ -_point1f.x /*float*/ ))/(double)_denominat); + //BA.debugLineNum = 948;BA.debugLine="v=((point1c.y-point1f.y)*(point2c.x-point1c.x)-(p"; +_v = (float) (((_point1c.y /*float*/ -_point1f.y /*float*/ )*(_point2c.x /*float*/ -_point1c.x /*float*/ )-(_point2c.y /*float*/ -_point1c.y /*float*/ )*(_point1c.x /*float*/ -_point1f.x /*float*/ ))/(double)_denominat); + //BA.debugLineNum = 949;BA.debugLine="If (U>0 And U<1 And v<1 And v>0) Then"; +if (true) break; + +case 5: +//if +this.state = 14; +if ((_u>0 && _u<1 && _v<1 && _v>0)) { +this.state = 7; +}else { +this.state = 13; +}if (true) break; + +case 7: +//C +this.state = 8; + //BA.debugLineNum = 951;BA.debugLine="intersectpoint.x=point1c.x+(point2c.x-point1c.x)"; +_intersectpoint.x /*float*/ = (float) (_point1c.x /*float*/ +(_point2c.x /*float*/ -_point1c.x /*float*/ )*_u); + //BA.debugLineNum = 952;BA.debugLine="intersectpoint.y=point1c.y+(point2c.y-point1c.x)"; +_intersectpoint.y /*float*/ = (float) (_point1c.y /*float*/ +(_point2c.y /*float*/ -_point1c.x /*float*/ )*_v); + //BA.debugLineNum = 953;BA.debugLine="trianglefiller(point1c,point1p,intersectpoint,k)"; +_trianglefiller(_point1c,_point1p,_intersectpoint,_k); + //BA.debugLineNum = 954;BA.debugLine="trianglefiller(point2c,point2p,intersectpoint,k)"; +_trianglefiller(_point2c,_point2p,_intersectpoint,_k); + //BA.debugLineNum = 956;BA.debugLine="boomcolor(k)=Colors.yellow"; +parent._boomcolor[_k] = anywheresoftware.b4a.keywords.Common.Colors.Yellow; + //BA.debugLineNum = 957;BA.debugLine="wait for (trianglechecker(point1f,point1p,inters"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _trianglechecker(_point1f,_point1p,_intersectpoint,_k)); +this.state = 15; +return; +case 15: +//C +this.state = 8; +; + //BA.debugLineNum = 958;BA.debugLine="If boomcolor(k)=Colors.Yellow Then"; +if (true) break; + +case 8: +//if +this.state = 11; +if (parent._boomcolor[_k]==anywheresoftware.b4a.keywords.Common.Colors.Yellow) { +this.state = 10; +}if (true) break; + +case 10: +//C +this.state = 11; + //BA.debugLineNum = 959;BA.debugLine="wait for (trianglechecker(point2f,point2p,inters"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _trianglechecker(_point2f,_point2p,_intersectpoint,_k)); +this.state = 16; +return; +case 16: +//C +this.state = 11; +; + if (true) break; + +case 11: +//C +this.state = 14; +; + //BA.debugLineNum = 961;BA.debugLine="Return"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;}; + if (true) break; + +case 13: +//C +this.state = 14; + //BA.debugLineNum = 964;BA.debugLine="wait for (rectanglefiller(point1c,point1p,point2"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _rectanglefiller(_point1c,_point1p,_point2p,_point2c,_k)); +this.state = 17; +return; +case 17: +//C +this.state = 14; +; + //BA.debugLineNum = 965;BA.debugLine="wait for (rectanglechecker(point1f,point1c,point"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _rectanglechecker(_point1f,_point1c,_point2c,_point2f,_k)); +this.state = 18; +return; +case 18: +//C +this.state = 14; +; + //BA.debugLineNum = 966;BA.debugLine="Return"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;}; + if (true) break; + +case 14: +//C +this.state = -1; +; + //BA.debugLineNum = 968;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static void _complete() throws Exception{ +} +public static String _location_center() throws Exception{ +float _distance = 0f; +float _radius = 0f; +float _h1 = 0f; +float _o1 = 0f; +float _h2 = 0f; +float _o2 = 0f; +anywheresoftware.b4a.gps.LocationWrapper _location6 = null; +anywheresoftware.b4a.gps.LocationWrapper _location7 = null; + //BA.debugLineNum = 864;BA.debugLine="Sub location_center 'to convert lat and long into"; + //BA.debugLineNum = 867;BA.debugLine="Private distance As Float"; +_distance = 0f; + //BA.debugLineNum = 868;BA.debugLine="Private radius As Float"; +_radius = 0f; + //BA.debugLineNum = 869;BA.debugLine="Private H1 As Float 'long"; +_h1 = 0f; + //BA.debugLineNum = 870;BA.debugLine="Private O1 As Float 'lat"; +_o1 = 0f; + //BA.debugLineNum = 871;BA.debugLine="Private H2 As Float 'long"; +_h2 = 0f; + //BA.debugLineNum = 872;BA.debugLine="Private O2 As Float 'lat"; +_o2 = 0f; + //BA.debugLineNum = 873;BA.debugLine="Dim location6 As Location"; +_location6 = new anywheresoftware.b4a.gps.LocationWrapper(); + //BA.debugLineNum = 875;BA.debugLine="location6.Initialize"; +_location6.Initialize(); + //BA.debugLineNum = 878;BA.debugLine="Dim location7 As Location"; +_location7 = new anywheresoftware.b4a.gps.LocationWrapper(); + //BA.debugLineNum = 879;BA.debugLine="location7.Initialize"; +_location7.Initialize(); + //BA.debugLineNum = 882;BA.debugLine="origin.Initialize"; +mostCurrent._origin.Initialize(); + //BA.debugLineNum = 883;BA.debugLine="radius =6372300"; +_radius = (float) (6372300); + //BA.debugLineNum = 884;BA.debugLine="origin.lat =Starter.location2.Latitude"; +mostCurrent._origin.lat /*float*/ = (float) (mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getLatitude()); + //BA.debugLineNum = 886;BA.debugLine="origin.lng =Starter.location2.Longitude"; +mostCurrent._origin.lng /*float*/ = (float) (mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getLongitude()); + //BA.debugLineNum = 888;BA.debugLine="H1=(origin.lng)/360*2*cPI"; +_h1 = (float) ((mostCurrent._origin.lng /*float*/ )/(double)360*2*anywheresoftware.b4a.keywords.Common.cPI); + //BA.debugLineNum = 889;BA.debugLine="H2=(origin.lng+.01)/360*2*cPI"; +_h2 = (float) ((mostCurrent._origin.lng /*float*/ +.01)/(double)360*2*anywheresoftware.b4a.keywords.Common.cPI); + //BA.debugLineNum = 891;BA.debugLine="O1=(origin.lat)/360*2*cPI"; +_o1 = (float) ((mostCurrent._origin.lat /*float*/ )/(double)360*2*anywheresoftware.b4a.keywords.Common.cPI); + //BA.debugLineNum = 892;BA.debugLine="O2=(origin.lat+.01)/360*2*cPI"; +_o2 = (float) ((mostCurrent._origin.lat /*float*/ +.01)/(double)360*2*anywheresoftware.b4a.keywords.Common.cPI); + //BA.debugLineNum = 894;BA.debugLine="location6.Latitude=O1"; +_location6.setLatitude(_o1); + //BA.debugLineNum = 895;BA.debugLine="location6.Longitude=H1"; +_location6.setLongitude(_h1); + //BA.debugLineNum = 896;BA.debugLine="location7.Latitude=O1"; +_location7.setLatitude(_o1); + //BA.debugLineNum = 897;BA.debugLine="location7.Longitude=H2"; +_location7.setLongitude(_h2); + //BA.debugLineNum = 898;BA.debugLine="deltalat=-2*radius*ASin(Power(Power(Sin((O2-O1)/2"; +_deltalat = (float) (-2*_radius*anywheresoftware.b4a.keywords.Common.ASin(anywheresoftware.b4a.keywords.Common.Power(anywheresoftware.b4a.keywords.Common.Power(anywheresoftware.b4a.keywords.Common.Sin((_o2-_o1)/(double)2),2)+anywheresoftware.b4a.keywords.Common.Cos(_o1)*anywheresoftware.b4a.keywords.Common.Cos(_o2)*anywheresoftware.b4a.keywords.Common.Power(anywheresoftware.b4a.keywords.Common.Sin((0)/(double)2),2),.5))/(double).01*30); + //BA.debugLineNum = 899;BA.debugLine="deltalong=2*radius*ASin(Power(Cos(O1)*Cos(O1)*Pow"; +_deltalong = (float) (2*_radius*anywheresoftware.b4a.keywords.Common.ASin(anywheresoftware.b4a.keywords.Common.Power(anywheresoftware.b4a.keywords.Common.Cos(_o1)*anywheresoftware.b4a.keywords.Common.Cos(_o1)*anywheresoftware.b4a.keywords.Common.Power(anywheresoftware.b4a.keywords.Common.Sin((_h2-_h1)/(double)2),2),.5))/(double).01*30); + //BA.debugLineNum = 909;BA.debugLine="End Sub"; +return ""; +} +public static void _locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{ +ResumableSub_LocationChanged rsub = new ResumableSub_LocationChanged(null,_location1); +rsub.resume(processBA, null); +} +public static class ResumableSub_LocationChanged extends BA.ResumableSub { +public ResumableSub_LocationChanged(b4a.bitmapdrawer2.main parent,anywheresoftware.b4a.gps.LocationWrapper _location1) { +this.parent = parent; +this._location1 = _location1; +} +b4a.bitmapdrawer2.main parent; +anywheresoftware.b4a.gps.LocationWrapper _location1; +anywheresoftware.b4a.objects.B4XCanvas.B4XRect _r = null; +b4a.example.bitmapcreator._drawtask _dt = null; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +return; + +case 0: +//C +this.state = 1; + //BA.debugLineNum = 225;BA.debugLine="If Starter.Location2.BearingValid = True Then"; +if (true) break; + +case 1: +//if +this.state = 4; +if (parent.mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getBearingValid()==anywheresoftware.b4a.keywords.Common.True) { +this.state = 3; +}if (true) break; + +case 3: +//C +this.state = 4; + //BA.debugLineNum = 226;BA.debugLine="heading=Starter.Location2.Bearing"; +parent._heading = parent.mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getBearing(); + if (true) break; + +case 4: +//C +this.state = 5; +; + //BA.debugLineNum = 235;BA.debugLine="timerx=DateTime.now"; +parent._timerx = (int) (anywheresoftware.b4a.keywords.Common.DateTime.getNow()); + //BA.debugLineNum = 237;BA.debugLine="xposnew=xposorigin+deltalong*(Starter.Location2.Lo"; +parent._xposnew = (float) (parent._xposorigin+parent._deltalong*(parent.mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getLongitude()-parent.mostCurrent._origin.lng /*float*/ )/(double)2); + //BA.debugLineNum = 238;BA.debugLine="yposnew=yposorigin+deltalat*(Starter.Location2.la"; +parent._yposnew = (float) (parent._yposorigin+parent._deltalat*(parent.mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getLatitude()-parent.mostCurrent._origin.lat /*float*/ )/(double)2); + //BA.debugLineNum = 241;BA.debugLine="Log(\"xposnew: \" & NumberFormat(xposnew,0,0) & \" y"; +anywheresoftware.b4a.keywords.Common.LogImpl("7196625","xposnew: "+anywheresoftware.b4a.keywords.Common.NumberFormat(parent._xposnew,(int) (0),(int) (0))+" yposnew: "+anywheresoftware.b4a.keywords.Common.NumberFormat(parent._yposnew,(int) (0),(int) (0))+" heading: "+anywheresoftware.b4a.keywords.Common.NumberFormat(parent._heading,(int) (0),(int) (0)),0); + //BA.debugLineNum = 248;BA.debugLine="bmcGraph.DrawCircle(xposnew,yposnew,4,xui.Color_r"; +parent.mostCurrent._bmcgraph._drawcircle(parent._xposnew,parent._yposnew,(float) (4),parent.mostCurrent._xui.Color_Red,anywheresoftware.b4a.keywords.Common.True,(int) (1)); + //BA.debugLineNum = 256;BA.debugLine="tractor0.x=xpos"; +parent.mostCurrent._tractor0.x /*float*/ = parent._xpos; + //BA.debugLineNum = 257;BA.debugLine="tractor0.y=ypos"; +parent.mostCurrent._tractor0.y /*float*/ = parent._ypos; + //BA.debugLineNum = 259;BA.debugLine="tractor1.x=xposnew"; +parent.mostCurrent._tractor1.x /*float*/ = parent._xposnew; + //BA.debugLineNum = 260;BA.debugLine="tractor1.y=yposnew"; +parent.mostCurrent._tractor1.y /*float*/ = parent._yposnew; + //BA.debugLineNum = 262;BA.debugLine="hitch1.x=tractor1.x-Offset_hitch*CosD(heading+90)"; +parent.mostCurrent._hitch1.x /*float*/ = (float) (parent.mostCurrent._tractor1.x /*float*/ -parent._offset_hitch*anywheresoftware.b4a.keywords.Common.CosD(parent._heading+90)); + //BA.debugLineNum = 263;BA.debugLine="hitch1.y=tractor1.y-Offset_hitch*SinD(heading+90)"; +parent.mostCurrent._hitch1.y /*float*/ = (float) (parent.mostCurrent._tractor1.y /*float*/ -parent._offset_hitch*anywheresoftware.b4a.keywords.Common.SinD(parent._heading+90)); + //BA.debugLineNum = 267;BA.debugLine="vector1.x = hitch1.x-trailer0.x"; +parent.mostCurrent._vector1.x /*float*/ = (float) (parent.mostCurrent._hitch1.x /*float*/ -parent.mostCurrent._trailer0.x /*float*/ ); + //BA.debugLineNum = 268;BA.debugLine="vector1.y = hitch1.y-trailer0.y"; +parent.mostCurrent._vector1.y /*float*/ = (float) (parent.mostCurrent._hitch1.y /*float*/ -parent.mostCurrent._trailer0.y /*float*/ ); + //BA.debugLineNum = 269;BA.debugLine="vectorlength1=Power(Power(vector1.x,2)+Power(vect"; +parent._vectorlength1 = (float) (anywheresoftware.b4a.keywords.Common.Power(anywheresoftware.b4a.keywords.Common.Power(parent.mostCurrent._vector1.x /*float*/ ,2)+anywheresoftware.b4a.keywords.Common.Power(parent.mostCurrent._vector1.y /*float*/ ,2),.5)); + //BA.debugLineNum = 270;BA.debugLine="unitvector1.x=vector1.x/vectorlength1"; +parent.mostCurrent._unitvector1.x /*float*/ = (float) (parent.mostCurrent._vector1.x /*float*/ /(double)parent._vectorlength1); + //BA.debugLineNum = 271;BA.debugLine="unitvector1.y=vector1.y/vectorlength1"; +parent.mostCurrent._unitvector1.y /*float*/ = (float) (parent.mostCurrent._vector1.y /*float*/ /(double)parent._vectorlength1); + //BA.debugLineNum = 272;BA.debugLine="trailer1.x=hitch1.x-vector1.x*offset_trailerlengt"; +parent.mostCurrent._trailer1.x /*float*/ = (float) (parent.mostCurrent._hitch1.x /*float*/ -parent.mostCurrent._vector1.x /*float*/ *parent._offset_trailerlength/(double)parent._vectorlength1); + //BA.debugLineNum = 273;BA.debugLine="trailer1.y=hitch1.y-vector1.y*offset_trailerlengt"; +parent.mostCurrent._trailer1.y /*float*/ = (float) (parent.mostCurrent._hitch1.y /*float*/ -parent.mostCurrent._vector1.y /*float*/ *parent._offset_trailerlength/(double)parent._vectorlength1); + //BA.debugLineNum = 274;BA.debugLine="boomcenter1.x=-unitvector1.x*offset_trailertoboom"; +parent.mostCurrent._boomcenter1.x /*float*/ = (float) (-parent.mostCurrent._unitvector1.x /*float*/ *parent._offset_trailertoboom+parent.mostCurrent._trailer1.x /*float*/ ); + //BA.debugLineNum = 275;BA.debugLine="boomcenter1.y=-unitvector1.y*offset_trailertoboom"; +parent.mostCurrent._boomcenter1.y /*float*/ = (float) (-parent.mostCurrent._unitvector1.y /*float*/ *parent._offset_trailertoboom+parent.mostCurrent._trailer1.y /*float*/ ); + //BA.debugLineNum = 280;BA.debugLine="boompoint0.x=-(boomsectionwidth(1)/2+boomsectionw"; +parent.mostCurrent._boompoint0.x /*float*/ = (float) (-(parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)]+parent._boomsectionwidth[(int) (3)])*parent.mostCurrent._unitvector1.y /*float*/ +parent.mostCurrent._boomcenter1.x /*float*/ ); + //BA.debugLineNum = 281;BA.debugLine="boompoint0.y=-(boomsectionwidth(1)/2+boomsectionw"; +parent.mostCurrent._boompoint0.y /*float*/ = (float) (-(parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)]+parent._boomsectionwidth[(int) (3)])*-parent.mostCurrent._unitvector1.x /*float*/ +parent.mostCurrent._boomcenter1.y /*float*/ ); + //BA.debugLineNum = 282;BA.debugLine="boompoint01.x=boompoint0.x+ boompoint0.x-boompoin"; +parent.mostCurrent._boompoint01.x /*float*/ = (float) (parent.mostCurrent._boompoint0.x /*float*/ +parent.mostCurrent._boompoint0.x /*float*/ -parent.mostCurrent._boompoint00.x /*float*/ ); + //BA.debugLineNum = 283;BA.debugLine="boompoint01.y=boompoint0.y+ boompoint0.y-boompoin"; +parent.mostCurrent._boompoint01.y /*float*/ = (float) (parent.mostCurrent._boompoint0.y /*float*/ +parent.mostCurrent._boompoint0.y /*float*/ -parent.mostCurrent._boompoint00.y /*float*/ ); + //BA.debugLineNum = 284;BA.debugLine="boompoint1.x=-(boomsectionwidth(1)/2+boomsectionw"; +parent.mostCurrent._boompoint1.x /*float*/ = (float) (-(parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)])*parent.mostCurrent._unitvector1.y /*float*/ +parent.mostCurrent._boomcenter1.x /*float*/ ); + //BA.debugLineNum = 285;BA.debugLine="boompoint1.y=-(boomsectionwidth(1)/2+boomsectionw"; +parent.mostCurrent._boompoint1.y /*float*/ = (float) (-(parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)])*-parent.mostCurrent._unitvector1.x /*float*/ +parent.mostCurrent._boomcenter1.y /*float*/ ); + //BA.debugLineNum = 286;BA.debugLine="boompoint11.x=boompoint1.x+ boompoint1.x-boompoin"; +parent.mostCurrent._boompoint11.x /*float*/ = (float) (parent.mostCurrent._boompoint1.x /*float*/ +parent.mostCurrent._boompoint1.x /*float*/ -parent.mostCurrent._boompoint10.x /*float*/ ); + //BA.debugLineNum = 287;BA.debugLine="boompoint11.y=boompoint1.y+ boompoint1.y-boompoin"; +parent.mostCurrent._boompoint11.y /*float*/ = (float) (parent.mostCurrent._boompoint1.y /*float*/ +parent.mostCurrent._boompoint1.y /*float*/ -parent.mostCurrent._boompoint10.y /*float*/ ); + //BA.debugLineNum = 288;BA.debugLine="boompoint2.x=-(boomsectionwidth(1)/2)*unitvector1"; +parent.mostCurrent._boompoint2.x /*float*/ = (float) (-(parent._boomsectionwidth[(int) (1)]/(double)2)*parent.mostCurrent._unitvector1.y /*float*/ +parent.mostCurrent._boomcenter1.x /*float*/ ); + //BA.debugLineNum = 289;BA.debugLine="boompoint2.y=-(boomsectionwidth(1)/2)*-unitvector"; +parent.mostCurrent._boompoint2.y /*float*/ = (float) (-(parent._boomsectionwidth[(int) (1)]/(double)2)*-parent.mostCurrent._unitvector1.x /*float*/ +parent.mostCurrent._boomcenter1.y /*float*/ ); + //BA.debugLineNum = 290;BA.debugLine="boompoint21.x=boompoint2.x+ boompoint2.x-boompoin"; +parent.mostCurrent._boompoint21.x /*float*/ = (float) (parent.mostCurrent._boompoint2.x /*float*/ +parent.mostCurrent._boompoint2.x /*float*/ -parent.mostCurrent._boompoint20.x /*float*/ ); + //BA.debugLineNum = 291;BA.debugLine="boompoint21.y=boompoint2.y+ boompoint2.y-boompoin"; +parent.mostCurrent._boompoint21.y /*float*/ = (float) (parent.mostCurrent._boompoint2.y /*float*/ +parent.mostCurrent._boompoint2.y /*float*/ -parent.mostCurrent._boompoint20.y /*float*/ ); + //BA.debugLineNum = 292;BA.debugLine="boompoint3.x=(boomsectionwidth(1)/2)*unitvector1."; +parent.mostCurrent._boompoint3.x /*float*/ = (float) ((parent._boomsectionwidth[(int) (1)]/(double)2)*parent.mostCurrent._unitvector1.y /*float*/ +parent.mostCurrent._boomcenter1.x /*float*/ ); + //BA.debugLineNum = 293;BA.debugLine="boompoint3.y=(boomsectionwidth(1)/2)*-unitvector1"; +parent.mostCurrent._boompoint3.y /*float*/ = (float) ((parent._boomsectionwidth[(int) (1)]/(double)2)*-parent.mostCurrent._unitvector1.x /*float*/ +parent.mostCurrent._boomcenter1.y /*float*/ ); + //BA.debugLineNum = 294;BA.debugLine="boompoint31.x=boompoint3.x+ boompoint3.x-boompoin"; +parent.mostCurrent._boompoint31.x /*float*/ = (float) (parent.mostCurrent._boompoint3.x /*float*/ +parent.mostCurrent._boompoint3.x /*float*/ -parent.mostCurrent._boompoint30.x /*float*/ ); + //BA.debugLineNum = 295;BA.debugLine="boompoint31.y=boompoint3.y+ boompoint3.y-boompoin"; +parent.mostCurrent._boompoint31.y /*float*/ = (float) (parent.mostCurrent._boompoint3.y /*float*/ +parent.mostCurrent._boompoint3.y /*float*/ -parent.mostCurrent._boompoint30.y /*float*/ ); + //BA.debugLineNum = 296;BA.debugLine="boompoint4.x=(boomsectionwidth(1)/2+boomsectionwi"; +parent.mostCurrent._boompoint4.x /*float*/ = (float) ((parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)])*parent.mostCurrent._unitvector1.y /*float*/ +parent.mostCurrent._boomcenter1.x /*float*/ ); + //BA.debugLineNum = 297;BA.debugLine="boompoint4.y=(boomsectionwidth(1)/2+boomsectionwi"; +parent.mostCurrent._boompoint4.y /*float*/ = (float) ((parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)])*-parent.mostCurrent._unitvector1.x /*float*/ +parent.mostCurrent._boomcenter1.y /*float*/ ); + //BA.debugLineNum = 298;BA.debugLine="boompoint41.x=boompoint4.x+ boompoint4.x-boompoin"; +parent.mostCurrent._boompoint41.x /*float*/ = (float) (parent.mostCurrent._boompoint4.x /*float*/ +parent.mostCurrent._boompoint4.x /*float*/ -parent.mostCurrent._boompoint40.x /*float*/ ); + //BA.debugLineNum = 299;BA.debugLine="boompoint41.y=boompoint4.y+ boompoint4.y-boompoin"; +parent.mostCurrent._boompoint41.y /*float*/ = (float) (parent.mostCurrent._boompoint4.y /*float*/ +parent.mostCurrent._boompoint4.y /*float*/ -parent.mostCurrent._boompoint40.y /*float*/ ); + //BA.debugLineNum = 300;BA.debugLine="boompoint5.x=(boomsectionwidth(1)/2+boomsectionwi"; +parent.mostCurrent._boompoint5.x /*float*/ = (float) ((parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)]+parent._boomsectionwidth[(int) (3)])*parent.mostCurrent._unitvector1.y /*float*/ +parent.mostCurrent._boomcenter1.x /*float*/ ); + //BA.debugLineNum = 301;BA.debugLine="boompoint5.y=(boomsectionwidth(1)/2+boomsectionwi"; +parent.mostCurrent._boompoint5.y /*float*/ = (float) ((parent._boomsectionwidth[(int) (1)]/(double)2+parent._boomsectionwidth[(int) (2)]+parent._boomsectionwidth[(int) (3)])*-parent.mostCurrent._unitvector1.x /*float*/ +parent.mostCurrent._boomcenter1.y /*float*/ ); + //BA.debugLineNum = 302;BA.debugLine="boompoint51.x=boompoint5.x+ boompoint5.x-boompoin"; +parent.mostCurrent._boompoint51.x /*float*/ = (float) (parent.mostCurrent._boompoint5.x /*float*/ +parent.mostCurrent._boompoint5.x /*float*/ -parent.mostCurrent._boompoint50.x /*float*/ ); + //BA.debugLineNum = 303;BA.debugLine="boompoint51.y=boompoint5.y+ boompoint5.y-boompoin"; +parent.mostCurrent._boompoint51.y /*float*/ = (float) (parent.mostCurrent._boompoint5.y /*float*/ +parent.mostCurrent._boompoint5.y /*float*/ -parent.mostCurrent._boompoint50.y /*float*/ ); + //BA.debugLineNum = 310;BA.debugLine="bmcGraph.DrawLine(boompoint0.x,boompoint0.y,boomp"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint0.x /*float*/ ,parent.mostCurrent._boompoint0.y /*float*/ ,parent.mostCurrent._boompoint1.x /*float*/ ,parent.mostCurrent._boompoint1.y /*float*/ ,parent.mostCurrent._xui.Color_Gray,(int) (1)); + //BA.debugLineNum = 311;BA.debugLine="bmcGraph.DrawLine(boompoint1.x,boompoint1.y,boomp"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint1.x /*float*/ ,parent.mostCurrent._boompoint1.y /*float*/ ,parent.mostCurrent._boompoint2.x /*float*/ ,parent.mostCurrent._boompoint2.y /*float*/ ,parent.mostCurrent._xui.Color_Cyan,(int) (1)); + //BA.debugLineNum = 312;BA.debugLine="bmcGraph.DrawLine(boompoint2.x,boompoint2.y,boomp"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint2.x /*float*/ ,parent.mostCurrent._boompoint2.y /*float*/ ,parent.mostCurrent._boompoint3.x /*float*/ ,parent.mostCurrent._boompoint3.y /*float*/ ,parent.mostCurrent._xui.Color_Green,(int) (1)); + //BA.debugLineNum = 313;BA.debugLine="bmcGraph.DrawLine(boompoint3.x,boompoint3.y,boomp"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint3.x /*float*/ ,parent.mostCurrent._boompoint3.y /*float*/ ,parent.mostCurrent._boompoint4.x /*float*/ ,parent.mostCurrent._boompoint4.y /*float*/ ,parent.mostCurrent._xui.Color_Magenta,(int) (1)); + //BA.debugLineNum = 314;BA.debugLine="bmcGraph.DrawLine(boompoint4.x,boompoint4.y,boomp"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint4.x /*float*/ ,parent.mostCurrent._boompoint4.y /*float*/ ,parent.mostCurrent._boompoint5.x /*float*/ ,parent.mostCurrent._boompoint5.y /*float*/ ,parent.mostCurrent._xui.Color_Black,(int) (1)); + //BA.debugLineNum = 316;BA.debugLine="bmcGraph.DrawCircle(hitch1.x,hitch1.y,2,xui.Color"; +parent.mostCurrent._bmcgraph._drawcircle(parent.mostCurrent._hitch1.x /*float*/ ,parent.mostCurrent._hitch1.y /*float*/ ,(float) (2),parent.mostCurrent._xui.Color_Black,anywheresoftware.b4a.keywords.Common.True,(int) (1)); + //BA.debugLineNum = 317;BA.debugLine="trailer0.x=trailer1.x"; +parent.mostCurrent._trailer0.x /*float*/ = parent.mostCurrent._trailer1.x /*float*/ ; + //BA.debugLineNum = 318;BA.debugLine="trailer0.y=trailer1.y"; +parent.mostCurrent._trailer0.y /*float*/ = parent.mostCurrent._trailer1.y /*float*/ ; + //BA.debugLineNum = 319;BA.debugLine="If boompoint00.x <>0 Then"; +if (true) break; + +case 5: +//if +this.state = 8; +if (parent.mostCurrent._boompoint00.x /*float*/ !=0) { +this.state = 7; +}if (true) break; + +case 7: +//C +this.state = 8; + //BA.debugLineNum = 337;BA.debugLine="Wait For (lineintersect(boompoint00,boompoint0,b"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _lineintersect(parent.mostCurrent._boompoint00,parent.mostCurrent._boompoint0,parent.mostCurrent._boompoint01,parent.mostCurrent._boompoint10,parent.mostCurrent._boompoint1,parent.mostCurrent._boompoint11,(int) (0))); +this.state = 9; +return; +case 9: +//C +this.state = 8; +; + //BA.debugLineNum = 338;BA.debugLine="Wait For (lineintersect(boompoint10,boompoint1,b"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _lineintersect(parent.mostCurrent._boompoint10,parent.mostCurrent._boompoint1,parent.mostCurrent._boompoint11,parent.mostCurrent._boompoint20,parent.mostCurrent._boompoint2,parent.mostCurrent._boompoint21,(int) (1))); +this.state = 10; +return; +case 10: +//C +this.state = 8; +; + //BA.debugLineNum = 339;BA.debugLine="Wait For (lineintersect(boompoint20,boompoint2,b"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _lineintersect(parent.mostCurrent._boompoint20,parent.mostCurrent._boompoint2,parent.mostCurrent._boompoint21,parent.mostCurrent._boompoint30,parent.mostCurrent._boompoint3,parent.mostCurrent._boompoint31,(int) (2))); +this.state = 11; +return; +case 11: +//C +this.state = 8; +; + //BA.debugLineNum = 340;BA.debugLine="Wait For (lineintersect(boompoint30,boompoint3,b"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _lineintersect(parent.mostCurrent._boompoint30,parent.mostCurrent._boompoint3,parent.mostCurrent._boompoint31,parent.mostCurrent._boompoint40,parent.mostCurrent._boompoint4,parent.mostCurrent._boompoint41,(int) (3))); +this.state = 12; +return; +case 12: +//C +this.state = 8; +; + //BA.debugLineNum = 341;BA.debugLine="Wait For (lineintersect(boompoint40,boompoint4,b"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _lineintersect(parent.mostCurrent._boompoint40,parent.mostCurrent._boompoint4,parent.mostCurrent._boompoint41,parent.mostCurrent._boompoint50,parent.mostCurrent._boompoint5,parent.mostCurrent._boompoint51,(int) (4))); +this.state = 13; +return; +case 13: +//C +this.state = 8; +; + //BA.debugLineNum = 342;BA.debugLine="timerx=DateTime.Now-timerx"; +parent._timerx = (int) (anywheresoftware.b4a.keywords.Common.DateTime.getNow()-parent._timerx); + //BA.debugLineNum = 343;BA.debugLine="Log(\"timerx\"&timerx)"; +anywheresoftware.b4a.keywords.Common.LogImpl("7196727","timerx"+BA.NumberToString(parent._timerx),0); + //BA.debugLineNum = 344;BA.debugLine="bmcGraph.DrawLine(boompoint01.x,boompoint01.y,bo"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint01.x /*float*/ ,parent.mostCurrent._boompoint01.y /*float*/ ,parent.mostCurrent._boompoint51.x /*float*/ ,parent.mostCurrent._boompoint51.y /*float*/ ,parent.mostCurrent._xui.Color_Red,(int) (1)); + //BA.debugLineNum = 345;BA.debugLine="bmcGraph.DrawLine(boompoint01.x,boompoint01.y,bo"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint01.x /*float*/ ,parent.mostCurrent._boompoint01.y /*float*/ ,parent.mostCurrent._boompoint0.x /*float*/ ,parent.mostCurrent._boompoint0.y /*float*/ ,parent.mostCurrent._xui.Color_Magenta,(int) (1)); + //BA.debugLineNum = 347;BA.debugLine="bmcGraph.DrawLine(boompoint51.x,boompoint51.y,bo"; +parent.mostCurrent._bmcgraph._drawline(parent.mostCurrent._boompoint51.x /*float*/ ,parent.mostCurrent._boompoint51.y /*float*/ ,parent.mostCurrent._boompoint5.x /*float*/ ,parent.mostCurrent._boompoint5.y /*float*/ ,parent.mostCurrent._xui.Color_Blue,(int) (1)); + if (true) break; + +case 8: +//C +this.state = -1; +; + //BA.debugLineNum = 354;BA.debugLine="boompoint00.x=boompoint0.x'custom type issue, equ"; +parent.mostCurrent._boompoint00.x /*float*/ = parent.mostCurrent._boompoint0.x /*float*/ ; + //BA.debugLineNum = 355;BA.debugLine="boompoint00.y=boompoint0.y"; +parent.mostCurrent._boompoint00.y /*float*/ = parent.mostCurrent._boompoint0.y /*float*/ ; + //BA.debugLineNum = 356;BA.debugLine="boompoint10.x=boompoint1.x"; +parent.mostCurrent._boompoint10.x /*float*/ = parent.mostCurrent._boompoint1.x /*float*/ ; + //BA.debugLineNum = 357;BA.debugLine="boompoint10.y=boompoint1.y"; +parent.mostCurrent._boompoint10.y /*float*/ = parent.mostCurrent._boompoint1.y /*float*/ ; + //BA.debugLineNum = 358;BA.debugLine="boompoint20.x=boompoint2.x"; +parent.mostCurrent._boompoint20.x /*float*/ = parent.mostCurrent._boompoint2.x /*float*/ ; + //BA.debugLineNum = 359;BA.debugLine="boompoint20.y=boompoint2.y"; +parent.mostCurrent._boompoint20.y /*float*/ = parent.mostCurrent._boompoint2.y /*float*/ ; + //BA.debugLineNum = 360;BA.debugLine="boompoint30.x=boompoint3.x"; +parent.mostCurrent._boompoint30.x /*float*/ = parent.mostCurrent._boompoint3.x /*float*/ ; + //BA.debugLineNum = 361;BA.debugLine="boompoint30.y=boompoint3.y"; +parent.mostCurrent._boompoint30.y /*float*/ = parent.mostCurrent._boompoint3.y /*float*/ ; + //BA.debugLineNum = 362;BA.debugLine="boompoint40.x=boompoint4.x"; +parent.mostCurrent._boompoint40.x /*float*/ = parent.mostCurrent._boompoint4.x /*float*/ ; + //BA.debugLineNum = 363;BA.debugLine="boompoint40.y=boompoint4.y"; +parent.mostCurrent._boompoint40.y /*float*/ = parent.mostCurrent._boompoint4.y /*float*/ ; + //BA.debugLineNum = 365;BA.debugLine="boompoint50.x=boompoint5.x"; +parent.mostCurrent._boompoint50.x /*float*/ = parent.mostCurrent._boompoint5.x /*float*/ ; + //BA.debugLineNum = 366;BA.debugLine="boompoint50.y=boompoint5.y"; +parent.mostCurrent._boompoint50.y /*float*/ = parent.mostCurrent._boompoint5.y /*float*/ ; + //BA.debugLineNum = 372;BA.debugLine="Dim r As B4XRect"; +_r = new anywheresoftware.b4a.objects.B4XCanvas.B4XRect(); + //BA.debugLineNum = 373;BA.debugLine="r.Initialize(xposnew-400,yposnew-400,xposnew+400,"; +_r.Initialize((float) (parent._xposnew-400),(float) (parent._yposnew-400),(float) (parent._xposnew+400),(float) (parent._yposnew+400)); + //BA.debugLineNum = 374;BA.debugLine="bmc2ndgraph.Initialize(imvGraph.Width, imvGraph.H"; +parent.mostCurrent._bmc2ndgraph._initialize(processBA,parent.mostCurrent._imvgraph.getWidth(),parent.mostCurrent._imvgraph.getHeight()); + //BA.debugLineNum = 375;BA.debugLine="Dim dt As DrawTask = bmcGraph.CreateDrawTask(bmcG"; +_dt = parent.mostCurrent._bmcgraph._createdrawtask((Object)(parent.mostCurrent._bmcgraph),_r,(int) (parent.mostCurrent._imvgraph.getWidth()/(double)2),(int) (parent.mostCurrent._imvgraph.getHeight()/(double)2),anywheresoftware.b4a.keywords.Common.True); + //BA.debugLineNum = 376;BA.debugLine="dt.SrcScaleX=4"; +_dt.SrcScaleX = (float) (4); + //BA.debugLineNum = 377;BA.debugLine="dt.SrcScaleY=4"; +_dt.SrcScaleY = (float) (4); + //BA.debugLineNum = 378;BA.debugLine="dt.Degrees=-Starter.Location2.Bearing"; +_dt.Degrees = (int) (-parent.mostCurrent._starter._location2 /*anywheresoftware.b4a.gps.LocationWrapper*/ .getBearing()); + //BA.debugLineNum = 382;BA.debugLine="bmc2ndgraph.DrawBitmapCreatorTransformed(dt)"; +parent.mostCurrent._bmc2ndgraph._drawbitmapcreatortransformed(_dt); + //BA.debugLineNum = 383;BA.debugLine="cvsGraph.DrawBitmap(bmc2ndgraph.Bitmap,b4arect1)"; +parent.mostCurrent._cvsgraph.DrawBitmap((android.graphics.Bitmap)(parent.mostCurrent._bmc2ndgraph._getbitmap().getObject()),parent.mostCurrent._b4arect1); + //BA.debugLineNum = 384;BA.debugLine="imvGraph.Invalidate"; +parent.mostCurrent._imvgraph.Invalidate(); + //BA.debugLineNum = 385;BA.debugLine="section1colour.Color=boomcolor(0)"; +parent.mostCurrent._section1colour.setColor(parent._boomcolor[(int) (0)]); + //BA.debugLineNum = 386;BA.debugLine="section2colour.Color=boomcolor(1)"; +parent.mostCurrent._section2colour.setColor(parent._boomcolor[(int) (1)]); + //BA.debugLineNum = 387;BA.debugLine="section3colour.Color=boomcolor(2)"; +parent.mostCurrent._section3colour.setColor(parent._boomcolor[(int) (2)]); + //BA.debugLineNum = 388;BA.debugLine="section4colour.Color=boomcolor(3)"; +parent.mostCurrent._section4colour.setColor(parent._boomcolor[(int) (3)]); + //BA.debugLineNum = 389;BA.debugLine="section5colour.Color=boomcolor(4)"; +parent.mostCurrent._section5colour.setColor(parent._boomcolor[(int) (4)]); + //BA.debugLineNum = 430;BA.debugLine="xpos = xposnew"; +parent._xpos = parent._xposnew; + //BA.debugLineNum = 431;BA.debugLine="ypos = yposnew"; +parent._ypos = parent._yposnew; + //BA.debugLineNum = 432;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} + +public static void initializeProcessGlobals() { + + if (main.processGlobalsRun == false) { + main.processGlobalsRun = true; + try { + main._process_globals(); +starter._process_globals(); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } +}public static String _process_globals() throws Exception{ + //BA.debugLineNum = 24;BA.debugLine="Sub Process_globals"; + //BA.debugLineNum = 26;BA.debugLine="End Sub"; +return ""; +} +public static anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _rectanglechecker(b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,b4a.bitmapdrawer2.main._coordx _point4,int _k) throws Exception{ +ResumableSub_rectanglechecker rsub = new ResumableSub_rectanglechecker(null,_point1,_point2,_point3,_point4,_k); +rsub.resume(processBA, null); +return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); +} +public static class ResumableSub_rectanglechecker extends BA.ResumableSub { +public ResumableSub_rectanglechecker(b4a.bitmapdrawer2.main parent,b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,b4a.bitmapdrawer2.main._coordx _point4,int _k) { +this.parent = parent; +this._point1 = _point1; +this._point2 = _point2; +this._point3 = _point3; +this._point4 = _point4; +this._k = _k; +} +b4a.bitmapdrawer2.main parent; +b4a.bitmapdrawer2.main._coordx _point1; +b4a.bitmapdrawer2.main._coordx _point2; +b4a.bitmapdrawer2.main._coordx _point3; +b4a.bitmapdrawer2.main._coordx _point4; +int _k; +anywheresoftware.b4a.objects.collections.Map _rc_acwmap = null; +anywheresoftware.b4a.objects.collections.Map _rc_cwmap = null; +anywheresoftware.b4a.objects.collections.List _rc_line1xvalues = null; +anywheresoftware.b4a.objects.collections.List _rc_line2xvalues = null; +anywheresoftware.b4a.objects.collections.List _rc_line2yvalues = null; +anywheresoftware.b4a.objects.collections.List _rc_line1yvalues = null; +b4a.bitmapdrawer2.main._coordx _pmax = null; +b4a.bitmapdrawer2.main._coordx _pmin = null; +b4a.bitmapdrawer2.main._coordx _temp = null; +anywheresoftware.b4a.objects.collections.Map _pmap = null; +float _temp3 = 0f; +float _temp4 = 0f; +b4a.bitmapdrawer2.main._coordx _temp2 = null; +int _ytemp = 0; +int _pixelchecked = 0; +int _i = 0; +int _j = 0; +int step63; +int limit63; +int step64; +int limit64; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +{ +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;} +case 0: +//C +this.state = 1; + //BA.debugLineNum = 503;BA.debugLine="Dim RC_ACWmap As Map"; +_rc_acwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 504;BA.debugLine="Dim RC_CWmap As Map"; +_rc_cwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 505;BA.debugLine="Dim RC_line1xvalues As List"; +_rc_line1xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 506;BA.debugLine="Dim RC_line2xvalues As List"; +_rc_line2xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 507;BA.debugLine="Dim RC_line2yvalues As List"; +_rc_line2yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 508;BA.debugLine="Dim RC_line1yvalues As List"; +_rc_line1yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 511;BA.debugLine="RC_ACWmap.Initialize 'used to progress clockwise"; +_rc_acwmap.Initialize(); + //BA.debugLineNum = 512;BA.debugLine="RC_ACWmap.Put(point1,point2)"; +_rc_acwmap.Put((Object)(_point1),(Object)(_point2)); + //BA.debugLineNum = 513;BA.debugLine="RC_ACWmap.Put(point2,point3)"; +_rc_acwmap.Put((Object)(_point2),(Object)(_point3)); + //BA.debugLineNum = 514;BA.debugLine="RC_ACWmap.Put(point4,point1)"; +_rc_acwmap.Put((Object)(_point4),(Object)(_point1)); + //BA.debugLineNum = 515;BA.debugLine="RC_ACWmap.Put(point3,point4)"; +_rc_acwmap.Put((Object)(_point3),(Object)(_point4)); + //BA.debugLineNum = 517;BA.debugLine="RC_CWmap.Initialize"; +_rc_cwmap.Initialize(); + //BA.debugLineNum = 518;BA.debugLine="RC_CWmap.Put(point1,point4)"; +_rc_cwmap.Put((Object)(_point1),(Object)(_point4)); + //BA.debugLineNum = 519;BA.debugLine="RC_CWmap.Put(point2,point1)"; +_rc_cwmap.Put((Object)(_point2),(Object)(_point1)); + //BA.debugLineNum = 520;BA.debugLine="RC_CWmap.Put(point4,point3)"; +_rc_cwmap.Put((Object)(_point4),(Object)(_point3)); + //BA.debugLineNum = 521;BA.debugLine="RC_CWmap.Put(point3,point2)"; +_rc_cwmap.Put((Object)(_point3),(Object)(_point2)); + //BA.debugLineNum = 523;BA.debugLine="RC_line1xvalues.Initialize"; +_rc_line1xvalues.Initialize(); + //BA.debugLineNum = 524;BA.debugLine="RC_line2xvalues.Initialize"; +_rc_line2xvalues.Initialize(); + //BA.debugLineNum = 525;BA.debugLine="RC_line1yvalues.initialize"; +_rc_line1yvalues.Initialize(); + //BA.debugLineNum = 526;BA.debugLine="RC_line2yvalues.Initialize"; +_rc_line2yvalues.Initialize(); + //BA.debugLineNum = 529;BA.debugLine="Dim pmax As coordX"; +_pmax = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 530;BA.debugLine="Dim pmin As coordX"; +_pmin = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 531;BA.debugLine="Dim temp As coordX"; +_temp = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 532;BA.debugLine="Dim Pmap As Map 'lets us grab the maxY and minY"; +_pmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 533;BA.debugLine="Pmap.Initialize"; +_pmap.Initialize(); + //BA.debugLineNum = 534;BA.debugLine="Pmap.Put(point1.y,point1)"; +_pmap.Put((Object)(_point1.y /*float*/ ),(Object)(_point1)); + //BA.debugLineNum = 535;BA.debugLine="Pmap.Put(point2.y,point2)"; +_pmap.Put((Object)(_point2.y /*float*/ ),(Object)(_point2)); + //BA.debugLineNum = 536;BA.debugLine="Pmap.Put(point4.y,point4)"; +_pmap.Put((Object)(_point4.y /*float*/ ),(Object)(_point4)); + //BA.debugLineNum = 537;BA.debugLine="Pmap.Put(point3.y,point3)"; +_pmap.Put((Object)(_point3.y /*float*/ ),(Object)(_point3)); + //BA.debugLineNum = 539;BA.debugLine="pmax.Initialize"; +_pmax.Initialize(); + //BA.debugLineNum = 540;BA.debugLine="pmin.Initialize"; +_pmin.Initialize(); + //BA.debugLineNum = 542;BA.debugLine="Dim temp3 As Float"; +_temp3 = 0f; + //BA.debugLineNum = 543;BA.debugLine="temp3 = Max(point1.y,Max(point2.y,Max(point4.y,po"; +_temp3 = (float) (anywheresoftware.b4a.keywords.Common.Max(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Max(_point2.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Max(_point4.y /*float*/ ,_point3.y /*float*/ )))); + //BA.debugLineNum = 544;BA.debugLine="Dim temp4 As Float"; +_temp4 = 0f; + //BA.debugLineNum = 545;BA.debugLine="temp4 = Min(point1.y,Min(point2.y,Min(point4.y,po"; +_temp4 = (float) (anywheresoftware.b4a.keywords.Common.Min(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Min(_point2.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Min(_point4.y /*float*/ ,_point3.y /*float*/ )))); + //BA.debugLineNum = 546;BA.debugLine="pmax=Pmap.Get(temp3) 'temp variable required, oth"; +_pmax = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp3))); + //BA.debugLineNum = 547;BA.debugLine="pmin=Pmap.Get(temp4)"; +_pmin = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp4))); + //BA.debugLineNum = 548;BA.debugLine="Dim temp2 As coordX"; +_temp2 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 549;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 550;BA.debugLine="RC_line1xvalues.add(pmax.x)'initial point to both"; +_rc_line1xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 551;BA.debugLine="RC_line1yvalues.add(pmax.y)"; +_rc_line1yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 552;BA.debugLine="RC_line2xvalues.add(pmax.x)"; +_rc_line2xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 553;BA.debugLine="RC_line2yvalues.add(pmax.y)"; +_rc_line2yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 555;BA.debugLine="Do While temp <> pmin 'cwloop"; +if (true) break; + +case 1: +//do while +this.state = 4; +while ((_temp).equals(_pmin) == false) { +this.state = 3; +if (true) break; +} +if (true) break; + +case 3: +//C +this.state = 1; + //BA.debugLineNum = 556;BA.debugLine="temp2=RC_CWmap.Get(temp)'gets second point for l"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_rc_cwmap.Get((Object)(_temp))); + //BA.debugLineNum = 557;BA.debugLine="Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_rc_line1xvalues,_rc_line1yvalues)); +this.state = 21; +return; +case 21: +//C +this.state = 1; +; + //BA.debugLineNum = 558;BA.debugLine="temp = RC_CWmap.Get(temp) 'changes the first lin"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_rc_cwmap.Get((Object)(_temp))); + if (true) break; + +case 4: +//C +this.state = 5; +; + //BA.debugLineNum = 560;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 564;BA.debugLine="Do While temp <> pmin 'acwloop"; +if (true) break; + +case 5: +//do while +this.state = 8; +while ((_temp).equals(_pmin) == false) { +this.state = 7; +if (true) break; +} +if (true) break; + +case 7: +//C +this.state = 5; + //BA.debugLineNum = 565;BA.debugLine="temp2=RC_ACWmap.Get(temp)'gets second point for"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_rc_acwmap.Get((Object)(_temp))); + //BA.debugLineNum = 566;BA.debugLine="wait for (calcline(temp.x,temp.y, temp2.x,temp2."; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_rc_line2xvalues,_rc_line2yvalues)); +this.state = 22; +return; +case 22: +//C +this.state = 5; +; + //BA.debugLineNum = 567;BA.debugLine="temp = RC_ACWmap.Get(temp) 'changes the first li"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_rc_acwmap.Get((Object)(_temp))); + if (true) break; + +case 8: +//C +this.state = 9; +; + //BA.debugLineNum = 569;BA.debugLine="RC_line1xvalues.add(pmin.x)'adds final point to b"; +_rc_line1xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 570;BA.debugLine="RC_line1yvalues.add(pmin.y)"; +_rc_line1yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 571;BA.debugLine="RC_line2xvalues.add(pmin.x)"; +_rc_line2xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 572;BA.debugLine="RC_line2yvalues.add(pmin.y)"; +_rc_line2yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 573;BA.debugLine="Dim ytemp As Int"; +_ytemp = 0; + //BA.debugLineNum = 574;BA.debugLine="Dim pixelchecked As Int"; +_pixelchecked = 0; + //BA.debugLineNum = 575;BA.debugLine="pixelchecked=0"; +_pixelchecked = (int) (0); + //BA.debugLineNum = 583;BA.debugLine="ytemp=pmax.y 'could choose to save both x and y"; +_ytemp = (int) (_pmax.y /*float*/ ); + //BA.debugLineNum = 584;BA.debugLine="For i=0 To (Min(RC_line1xvalues.Size,RC_line2xval"; +if (true) break; + +case 9: +//for +this.state = 20; +step63 = 1; +limit63 = (int) ((anywheresoftware.b4a.keywords.Common.Min(_rc_line1xvalues.getSize(),_rc_line2xvalues.getSize())-1)); +_i = (int) (0) ; +this.state = 23; +if (true) break; + +case 23: +//C +this.state = 20; +if ((step63 > 0 && _i <= limit63) || (step63 < 0 && _i >= limit63)) this.state = 11; +if (true) break; + +case 24: +//C +this.state = 23; +_i = ((int)(0 + _i + step63)) ; +if (true) break; + +case 11: +//C +this.state = 12; + //BA.debugLineNum = 585;BA.debugLine="For j=RC_line2xvalues.Get(i) To RC_line1xvalues."; +if (true) break; + +case 12: +//for +this.state = 19; +step64 = 1; +limit64 = (int)(BA.ObjectToNumber(_rc_line1xvalues.Get(_i))); +_j = (int)(BA.ObjectToNumber(_rc_line2xvalues.Get(_i))) ; +this.state = 25; +if (true) break; + +case 25: +//C +this.state = 19; +if ((step64 > 0 && _j <= limit64) || (step64 < 0 && _j >= limit64)) this.state = 14; +if (true) break; + +case 26: +//C +this.state = 25; +_j = ((int)(0 + _j + step64)) ; +if (true) break; + +case 14: +//C +this.state = 15; + //BA.debugLineNum = 587;BA.debugLine="pixelchecked=pixelchecked+1"; +_pixelchecked = (int) (_pixelchecked+1); + //BA.debugLineNum = 594;BA.debugLine="If bmcGraph.GetColor(j,ytemp)=-1 Then"; +if (true) break; + +case 15: +//if +this.state = 18; +if (parent.mostCurrent._bmcgraph._getcolor(_j,_ytemp)==-1) { +this.state = 17; +}if (true) break; + +case 17: +//C +this.state = 18; + //BA.debugLineNum = 595;BA.debugLine="boomon=True"; +parent._boomon = anywheresoftware.b4a.keywords.Common.True; + //BA.debugLineNum = 596;BA.debugLine="boomcolor(k)=xui.Color_Green"; +parent._boomcolor[_k] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 597;BA.debugLine="Log(\"pixelchecked\"&pixelchecked)"; +anywheresoftware.b4a.keywords.Common.LogImpl("7720991","pixelchecked"+BA.NumberToString(_pixelchecked),0); + //BA.debugLineNum = 600;BA.debugLine="Return boomcolor(k)"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,(Object)(parent._boomcolor[_k]));return;}; + if (true) break; + +case 18: +//C +this.state = 26; +; + if (true) break; +if (true) break; + +case 19: +//C +this.state = 24; +; + //BA.debugLineNum = 607;BA.debugLine="ytemp=ytemp-1"; +_ytemp = (int) (_ytemp-1); + if (true) break; +if (true) break; + +case 20: +//C +this.state = -1; +; + //BA.debugLineNum = 609;BA.debugLine="Log(\"pixelchecked\"&pixelchecked)"; +anywheresoftware.b4a.keywords.Common.LogImpl("7721003","pixelchecked"+BA.NumberToString(_pixelchecked),0); + //BA.debugLineNum = 610;BA.debugLine="boomcolor(k)=xui.Color_yellow"; +parent._boomcolor[_k] = parent.mostCurrent._xui.Color_Yellow; + //BA.debugLineNum = 615;BA.debugLine="boomon=False"; +parent._boomon = anywheresoftware.b4a.keywords.Common.False; + //BA.debugLineNum = 616;BA.debugLine="Log(\"boomon\"&boomon)"; +anywheresoftware.b4a.keywords.Common.LogImpl("7721010","boomon"+BA.ObjectToString(parent._boomon),0); + //BA.debugLineNum = 618;BA.debugLine="Return boomcolor(k)"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,(Object)(parent._boomcolor[_k]));return;}; + //BA.debugLineNum = 619;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _rectanglefiller(b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,b4a.bitmapdrawer2.main._coordx _point4,int _k) throws Exception{ +ResumableSub_rectanglefiller rsub = new ResumableSub_rectanglefiller(null,_point1,_point2,_point3,_point4,_k); +rsub.resume(processBA, null); +return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); +} +public static class ResumableSub_rectanglefiller extends BA.ResumableSub { +public ResumableSub_rectanglefiller(b4a.bitmapdrawer2.main parent,b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,b4a.bitmapdrawer2.main._coordx _point4,int _k) { +this.parent = parent; +this._point1 = _point1; +this._point2 = _point2; +this._point3 = _point3; +this._point4 = _point4; +this._k = _k; +} +b4a.bitmapdrawer2.main parent; +b4a.bitmapdrawer2.main._coordx _point1; +b4a.bitmapdrawer2.main._coordx _point2; +b4a.bitmapdrawer2.main._coordx _point3; +b4a.bitmapdrawer2.main._coordx _point4; +int _k; +long _timer = 0L; +anywheresoftware.b4a.objects.collections.List _line1xvalues = null; +anywheresoftware.b4a.objects.collections.List _line2xvalues = null; +anywheresoftware.b4a.objects.collections.List _line1yvalues = null; +anywheresoftware.b4a.objects.collections.List _line2yvalues = null; +anywheresoftware.b4a.objects.collections.Map _cwmap = null; +anywheresoftware.b4a.objects.collections.Map _acwmap = null; +b4a.bitmapdrawer2.main._coordx _pmax = null; +b4a.bitmapdrawer2.main._coordx _pmin = null; +b4a.bitmapdrawer2.main._coordx _temp = null; +anywheresoftware.b4a.objects.collections.Map _pmap = null; +float _temp3 = 0f; +float _temp4 = 0f; +b4a.bitmapdrawer2.main._coordx _temp2 = null; +int _ytemp = 0; +int _i = 0; +int step63; +int limit63; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +{ +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;} +case 0: +//C +this.state = 1; + //BA.debugLineNum = 652;BA.debugLine="Dim timer As Long"; +_timer = 0L; + //BA.debugLineNum = 653;BA.debugLine="timer=DateTime.Now"; +_timer = anywheresoftware.b4a.keywords.Common.DateTime.getNow(); + //BA.debugLineNum = 662;BA.debugLine="Dim line1xvalues As List"; +_line1xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 663;BA.debugLine="Dim line2xvalues As List"; +_line2xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 664;BA.debugLine="Dim line1yvalues As List"; +_line1yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 665;BA.debugLine="Dim line2yvalues As List"; +_line2yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 666;BA.debugLine="Dim CWmap As Map"; +_cwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 667;BA.debugLine="Dim ACWmap As Map"; +_acwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 669;BA.debugLine="ACWmap.Initialize 'used to progress clockwise an"; +_acwmap.Initialize(); + //BA.debugLineNum = 670;BA.debugLine="ACWmap.Put(point1,point2)"; +_acwmap.Put((Object)(_point1),(Object)(_point2)); + //BA.debugLineNum = 671;BA.debugLine="ACWmap.Put(point2,point3)"; +_acwmap.Put((Object)(_point2),(Object)(_point3)); + //BA.debugLineNum = 672;BA.debugLine="ACWmap.Put(point4,point1)"; +_acwmap.Put((Object)(_point4),(Object)(_point1)); + //BA.debugLineNum = 673;BA.debugLine="ACWmap.Put(point3,point4)"; +_acwmap.Put((Object)(_point3),(Object)(_point4)); + //BA.debugLineNum = 675;BA.debugLine="CWmap.Initialize"; +_cwmap.Initialize(); + //BA.debugLineNum = 676;BA.debugLine="CWmap.Put(point1,point4)"; +_cwmap.Put((Object)(_point1),(Object)(_point4)); + //BA.debugLineNum = 677;BA.debugLine="CWmap.Put(point2,point1)"; +_cwmap.Put((Object)(_point2),(Object)(_point1)); + //BA.debugLineNum = 678;BA.debugLine="CWmap.Put(point4,point3)"; +_cwmap.Put((Object)(_point4),(Object)(_point3)); + //BA.debugLineNum = 679;BA.debugLine="CWmap.Put(point3,point2)"; +_cwmap.Put((Object)(_point3),(Object)(_point2)); + //BA.debugLineNum = 680;BA.debugLine="line1xvalues.Initialize"; +_line1xvalues.Initialize(); + //BA.debugLineNum = 681;BA.debugLine="line2xvalues.Initialize"; +_line2xvalues.Initialize(); + //BA.debugLineNum = 682;BA.debugLine="line1yvalues.initialize"; +_line1yvalues.Initialize(); + //BA.debugLineNum = 683;BA.debugLine="line2yvalues.Initialize"; +_line2yvalues.Initialize(); + //BA.debugLineNum = 686;BA.debugLine="Dim pmax As coordX"; +_pmax = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 687;BA.debugLine="Dim pmin As coordX"; +_pmin = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 688;BA.debugLine="Dim temp As coordX"; +_temp = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 689;BA.debugLine="Dim Pmap As Map 'lets us grab the maxY and minY"; +_pmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 690;BA.debugLine="Pmap.Initialize"; +_pmap.Initialize(); + //BA.debugLineNum = 691;BA.debugLine="Pmap.Put(point1.y,point1)"; +_pmap.Put((Object)(_point1.y /*float*/ ),(Object)(_point1)); + //BA.debugLineNum = 692;BA.debugLine="Pmap.Put(point2.y,point2)"; +_pmap.Put((Object)(_point2.y /*float*/ ),(Object)(_point2)); + //BA.debugLineNum = 693;BA.debugLine="Pmap.Put(point4.y,point4)"; +_pmap.Put((Object)(_point4.y /*float*/ ),(Object)(_point4)); + //BA.debugLineNum = 694;BA.debugLine="Pmap.Put(point3.y,point3)"; +_pmap.Put((Object)(_point3.y /*float*/ ),(Object)(_point3)); + //BA.debugLineNum = 723;BA.debugLine="pmax.Initialize"; +_pmax.Initialize(); + //BA.debugLineNum = 724;BA.debugLine="pmin.Initialize"; +_pmin.Initialize(); + //BA.debugLineNum = 726;BA.debugLine="Dim temp3 As Float"; +_temp3 = 0f; + //BA.debugLineNum = 727;BA.debugLine="temp3 = Max(point1.y,Max(point2.y,Max(point4.y,po"; +_temp3 = (float) (anywheresoftware.b4a.keywords.Common.Max(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Max(_point2.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Max(_point4.y /*float*/ ,_point3.y /*float*/ )))); + //BA.debugLineNum = 728;BA.debugLine="Dim temp4 As Float"; +_temp4 = 0f; + //BA.debugLineNum = 729;BA.debugLine="temp4 = Min(point1.y,Min(point2.y,Min(point4.y,po"; +_temp4 = (float) (anywheresoftware.b4a.keywords.Common.Min(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Min(_point2.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Min(_point4.y /*float*/ ,_point3.y /*float*/ )))); + //BA.debugLineNum = 731;BA.debugLine="pmax=Pmap.Get(temp3) 'temp variable required, oth"; +_pmax = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp3))); + //BA.debugLineNum = 732;BA.debugLine="pmin=Pmap.Get(temp4)"; +_pmin = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp4))); + //BA.debugLineNum = 733;BA.debugLine="Dim temp2 As coordX"; +_temp2 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 734;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 735;BA.debugLine="line1xvalues.add(pmax.x)'initial point to both li"; +_line1xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 736;BA.debugLine="line1yvalues.add(pmax.y)"; +_line1yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 737;BA.debugLine="line2xvalues.add(pmax.x)"; +_line2xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 738;BA.debugLine="line2yvalues.add(pmax.y)"; +_line2yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 740;BA.debugLine="Do While temp <> pmin 'cwloop"; +if (true) break; + +case 1: +//do while +this.state = 4; +while ((_temp).equals(_pmin) == false) { +this.state = 3; +if (true) break; +} +if (true) break; + +case 3: +//C +this.state = 1; + //BA.debugLineNum = 741;BA.debugLine="temp2=CWmap.Get(temp)'gets second point for line"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_cwmap.Get((Object)(_temp))); + //BA.debugLineNum = 742;BA.debugLine="Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_line1xvalues,_line1yvalues)); +this.state = 13; +return; +case 13: +//C +this.state = 1; +; + //BA.debugLineNum = 743;BA.debugLine="temp = CWmap.Get(temp) 'changes the first line p"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_cwmap.Get((Object)(_temp))); + if (true) break; + +case 4: +//C +this.state = 5; +; + //BA.debugLineNum = 746;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 750;BA.debugLine="Do While temp <> pmin 'acwloop"; +if (true) break; + +case 5: +//do while +this.state = 8; +while ((_temp).equals(_pmin) == false) { +this.state = 7; +if (true) break; +} +if (true) break; + +case 7: +//C +this.state = 5; + //BA.debugLineNum = 751;BA.debugLine="temp2=ACWmap.Get(temp)'gets second point for lin"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_acwmap.Get((Object)(_temp))); + //BA.debugLineNum = 752;BA.debugLine="wait for (calcline(temp.x,temp.y, temp2.x,temp2."; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_line2xvalues,_line2yvalues)); +this.state = 14; +return; +case 14: +//C +this.state = 5; +; + //BA.debugLineNum = 753;BA.debugLine="temp = ACWmap.Get(temp) 'changes the first line"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_acwmap.Get((Object)(_temp))); + if (true) break; + +case 8: +//C +this.state = 9; +; + //BA.debugLineNum = 756;BA.debugLine="line1xvalues.add(pmin.x)'final point to both line"; +_line1xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 757;BA.debugLine="line1yvalues.add(pmin.y)"; +_line1yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 758;BA.debugLine="line2xvalues.add(pmin.x)"; +_line2xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 759;BA.debugLine="line2yvalues.add(pmin.y)"; +_line2yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 760;BA.debugLine="Dim ytemp As Int"; +_ytemp = 0; + //BA.debugLineNum = 763;BA.debugLine="ytemp=pmax.y 'could choose to save both x and y"; +_ytemp = (int) (_pmax.y /*float*/ ); + //BA.debugLineNum = 764;BA.debugLine="For i=0 To Min(line1xvalues.Size,line2xvalues.Siz"; +if (true) break; + +case 9: +//for +this.state = 12; +step63 = 1; +limit63 = (int) (anywheresoftware.b4a.keywords.Common.Min(_line1xvalues.getSize(),_line2xvalues.getSize())-1); +_i = (int) (0) ; +this.state = 15; +if (true) break; + +case 15: +//C +this.state = 12; +if ((step63 > 0 && _i <= limit63) || (step63 < 0 && _i >= limit63)) this.state = 11; +if (true) break; + +case 16: +//C +this.state = 15; +_i = ((int)(0 + _i + step63)) ; +if (true) break; + +case 11: +//C +this.state = 16; + //BA.debugLineNum = 765;BA.debugLine="bmcGraph.DrawLine(line1xvalues.Get(i),ytemp,line"; +parent.mostCurrent._bmcgraph._drawline((float)(BA.ObjectToNumber(_line1xvalues.Get(_i))),(float) (_ytemp),(float)(BA.ObjectToNumber(_line2xvalues.Get(_i))),(float) (_ytemp),parent._boomcolor[_k],(int) (1)); + //BA.debugLineNum = 766;BA.debugLine="ytemp=ytemp-1"; +_ytemp = (int) (_ytemp-1); + if (true) break; +if (true) break; + +case 12: +//C +this.state = -1; +; + //BA.debugLineNum = 795;BA.debugLine="Return 2"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,(Object)(2));return;}; + //BA.debugLineNum = 796;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _trianglechecker(b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,int _k) throws Exception{ +ResumableSub_trianglechecker rsub = new ResumableSub_trianglechecker(null,_point1,_point2,_point3,_k); +rsub.resume(processBA, null); +return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); +} +public static class ResumableSub_trianglechecker extends BA.ResumableSub { +public ResumableSub_trianglechecker(b4a.bitmapdrawer2.main parent,b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,int _k) { +this.parent = parent; +this._point1 = _point1; +this._point2 = _point2; +this._point3 = _point3; +this._k = _k; +} +b4a.bitmapdrawer2.main parent; +b4a.bitmapdrawer2.main._coordx _point1; +b4a.bitmapdrawer2.main._coordx _point2; +b4a.bitmapdrawer2.main._coordx _point3; +int _k; +anywheresoftware.b4a.objects.collections.Map _acwmap = null; +anywheresoftware.b4a.objects.collections.Map _cwmap = null; +anywheresoftware.b4a.objects.collections.List _line1xvalues = null; +anywheresoftware.b4a.objects.collections.List _line2xvalues = null; +anywheresoftware.b4a.objects.collections.List _line2yvalues = null; +anywheresoftware.b4a.objects.collections.List _line1yvalues = null; +b4a.bitmapdrawer2.main._coordx _pmax = null; +b4a.bitmapdrawer2.main._coordx _pmin = null; +b4a.bitmapdrawer2.main._coordx _temp = null; +anywheresoftware.b4a.objects.collections.Map _pmap = null; +float _temp3 = 0f; +float _temp4 = 0f; +b4a.bitmapdrawer2.main._coordx _temp2 = null; +int _ytemp = 0; +int _pixelchecked = 0; +int _i = 0; +int _j = 0; +int step60; +int limit60; +int step61; +int limit61; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +{ +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;} +case 0: +//C +this.state = 1; + //BA.debugLineNum = 1058;BA.debugLine="Dim ACWmap As Map"; +_acwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 1059;BA.debugLine="Dim CWmap As Map"; +_cwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 1060;BA.debugLine="Dim line1xvalues As List"; +_line1xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 1061;BA.debugLine="Dim line2xvalues As List"; +_line2xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 1062;BA.debugLine="Dim line2yvalues As List"; +_line2yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 1063;BA.debugLine="Dim line1yvalues As List"; +_line1yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 1066;BA.debugLine="ACWmap.Initialize 'used to progress clockwise an"; +_acwmap.Initialize(); + //BA.debugLineNum = 1067;BA.debugLine="ACWmap.Put(point1,point2)"; +_acwmap.Put((Object)(_point1),(Object)(_point2)); + //BA.debugLineNum = 1068;BA.debugLine="ACWmap.Put(point2,point3)"; +_acwmap.Put((Object)(_point2),(Object)(_point3)); + //BA.debugLineNum = 1069;BA.debugLine="ACWmap.Put(point3,point1)"; +_acwmap.Put((Object)(_point3),(Object)(_point1)); + //BA.debugLineNum = 1072;BA.debugLine="CWmap.Initialize"; +_cwmap.Initialize(); + //BA.debugLineNum = 1073;BA.debugLine="CWmap.Put(point1,point3)"; +_cwmap.Put((Object)(_point1),(Object)(_point3)); + //BA.debugLineNum = 1074;BA.debugLine="CWmap.Put(point2,point1)"; +_cwmap.Put((Object)(_point2),(Object)(_point1)); + //BA.debugLineNum = 1075;BA.debugLine="CWmap.Put(point3,point2)"; +_cwmap.Put((Object)(_point3),(Object)(_point2)); + //BA.debugLineNum = 1077;BA.debugLine="line1xvalues.Initialize"; +_line1xvalues.Initialize(); + //BA.debugLineNum = 1078;BA.debugLine="line2xvalues.Initialize"; +_line2xvalues.Initialize(); + //BA.debugLineNum = 1079;BA.debugLine="line1yvalues.initialize"; +_line1yvalues.Initialize(); + //BA.debugLineNum = 1080;BA.debugLine="line2yvalues.Initialize"; +_line2yvalues.Initialize(); + //BA.debugLineNum = 1083;BA.debugLine="Dim pmax As coordX"; +_pmax = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1084;BA.debugLine="Dim pmin As coordX"; +_pmin = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1085;BA.debugLine="Dim temp As coordX"; +_temp = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1086;BA.debugLine="Dim Pmap As Map 'lets us grab the maxY and minY"; +_pmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 1087;BA.debugLine="Pmap.Initialize"; +_pmap.Initialize(); + //BA.debugLineNum = 1088;BA.debugLine="Pmap.Put(point1.y,point1)"; +_pmap.Put((Object)(_point1.y /*float*/ ),(Object)(_point1)); + //BA.debugLineNum = 1089;BA.debugLine="Pmap.Put(point2.y,point2)"; +_pmap.Put((Object)(_point2.y /*float*/ ),(Object)(_point2)); + //BA.debugLineNum = 1090;BA.debugLine="Pmap.Put(point3.y,point3)"; +_pmap.Put((Object)(_point3.y /*float*/ ),(Object)(_point3)); + //BA.debugLineNum = 1092;BA.debugLine="pmax.Initialize"; +_pmax.Initialize(); + //BA.debugLineNum = 1093;BA.debugLine="pmin.Initialize"; +_pmin.Initialize(); + //BA.debugLineNum = 1095;BA.debugLine="Dim temp3 As Float"; +_temp3 = 0f; + //BA.debugLineNum = 1096;BA.debugLine="temp3 = Max(point1.y,Max(point2.y,point3.y))"; +_temp3 = (float) (anywheresoftware.b4a.keywords.Common.Max(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Max(_point2.y /*float*/ ,_point3.y /*float*/ ))); + //BA.debugLineNum = 1097;BA.debugLine="Dim temp4 As Float"; +_temp4 = 0f; + //BA.debugLineNum = 1098;BA.debugLine="temp4 = Min(point1.y,Min(point2.y,point3.y))"; +_temp4 = (float) (anywheresoftware.b4a.keywords.Common.Min(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Min(_point2.y /*float*/ ,_point3.y /*float*/ ))); + //BA.debugLineNum = 1099;BA.debugLine="pmax=Pmap.Get(temp3) 'temp variable required, oth"; +_pmax = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp3))); + //BA.debugLineNum = 1100;BA.debugLine="pmin=Pmap.Get(temp4)"; +_pmin = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp4))); + //BA.debugLineNum = 1101;BA.debugLine="Dim temp2 As coordX"; +_temp2 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1102;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 1103;BA.debugLine="line1xvalues.add(pmax.x)'initial point to both li"; +_line1xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 1104;BA.debugLine="line1yvalues.add(pmax.y)"; +_line1yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 1105;BA.debugLine="line2xvalues.add(pmax.x)"; +_line2xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 1106;BA.debugLine="line2yvalues.add(pmax.y)"; +_line2yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 1108;BA.debugLine="Do While temp <> pmin 'cwloop"; +if (true) break; + +case 1: +//do while +this.state = 4; +while ((_temp).equals(_pmin) == false) { +this.state = 3; +if (true) break; +} +if (true) break; + +case 3: +//C +this.state = 1; + //BA.debugLineNum = 1109;BA.debugLine="temp2=CWmap.Get(temp)'gets second point for line"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_cwmap.Get((Object)(_temp))); + //BA.debugLineNum = 1110;BA.debugLine="Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_line1xvalues,_line1yvalues)); +this.state = 21; +return; +case 21: +//C +this.state = 1; +; + //BA.debugLineNum = 1111;BA.debugLine="temp = CWmap.Get(temp) 'changes the first line p"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_cwmap.Get((Object)(_temp))); + if (true) break; + +case 4: +//C +this.state = 5; +; + //BA.debugLineNum = 1113;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 1117;BA.debugLine="Do While temp <> pmin 'acwloop"; +if (true) break; + +case 5: +//do while +this.state = 8; +while ((_temp).equals(_pmin) == false) { +this.state = 7; +if (true) break; +} +if (true) break; + +case 7: +//C +this.state = 5; + //BA.debugLineNum = 1118;BA.debugLine="temp2=ACWmap.Get(temp)'gets second point for lin"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_acwmap.Get((Object)(_temp))); + //BA.debugLineNum = 1119;BA.debugLine="wait for (calcline(temp.x,temp.y, temp2.x,temp2."; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_line2xvalues,_line2yvalues)); +this.state = 22; +return; +case 22: +//C +this.state = 5; +; + //BA.debugLineNum = 1120;BA.debugLine="temp = ACWmap.Get(temp) 'changes the first line"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_acwmap.Get((Object)(_temp))); + if (true) break; + +case 8: +//C +this.state = 9; +; + //BA.debugLineNum = 1122;BA.debugLine="line1xvalues.add(pmin.x)'adds final point to both"; +_line1xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 1123;BA.debugLine="line1yvalues.add(pmin.y)"; +_line1yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 1124;BA.debugLine="line2xvalues.add(pmin.x)"; +_line2xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 1125;BA.debugLine="line2yvalues.add(pmin.y)"; +_line2yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 1126;BA.debugLine="Dim ytemp As Int"; +_ytemp = 0; + //BA.debugLineNum = 1127;BA.debugLine="Dim pixelchecked As Int"; +_pixelchecked = 0; + //BA.debugLineNum = 1128;BA.debugLine="pixelchecked=0"; +_pixelchecked = (int) (0); + //BA.debugLineNum = 1131;BA.debugLine="ytemp=pmax.y 'could choose to save both x and y"; +_ytemp = (int) (_pmax.y /*float*/ ); + //BA.debugLineNum = 1132;BA.debugLine="For i=0 To (Min(line1xvalues.Size,line2xvalues.Si"; +if (true) break; + +case 9: +//for +this.state = 20; +step60 = 1; +limit60 = (int) ((anywheresoftware.b4a.keywords.Common.Min(_line1xvalues.getSize(),_line2xvalues.getSize())-1)); +_i = (int) (0) ; +this.state = 23; +if (true) break; + +case 23: +//C +this.state = 20; +if ((step60 > 0 && _i <= limit60) || (step60 < 0 && _i >= limit60)) this.state = 11; +if (true) break; + +case 24: +//C +this.state = 23; +_i = ((int)(0 + _i + step60)) ; +if (true) break; + +case 11: +//C +this.state = 12; + //BA.debugLineNum = 1133;BA.debugLine="For j=line2xvalues.Get(i) To line1xvalues.Get(i)"; +if (true) break; + +case 12: +//for +this.state = 19; +step61 = 1; +limit61 = (int)(BA.ObjectToNumber(_line1xvalues.Get(_i))); +_j = (int)(BA.ObjectToNumber(_line2xvalues.Get(_i))) ; +this.state = 25; +if (true) break; + +case 25: +//C +this.state = 19; +if ((step61 > 0 && _j <= limit61) || (step61 < 0 && _j >= limit61)) this.state = 14; +if (true) break; + +case 26: +//C +this.state = 25; +_j = ((int)(0 + _j + step61)) ; +if (true) break; + +case 14: +//C +this.state = 15; + //BA.debugLineNum = 1134;BA.debugLine="pixelchecked=pixelchecked+1"; +_pixelchecked = (int) (_pixelchecked+1); + //BA.debugLineNum = 1135;BA.debugLine="If bmcGraph.GetColor(j,ytemp)=-1 Then"; +if (true) break; + +case 15: +//if +this.state = 18; +if (parent.mostCurrent._bmcgraph._getcolor(_j,_ytemp)==-1) { +this.state = 17; +}if (true) break; + +case 17: +//C +this.state = 18; + //BA.debugLineNum = 1136;BA.debugLine="boomon=True"; +parent._boomon = anywheresoftware.b4a.keywords.Common.True; + //BA.debugLineNum = 1137;BA.debugLine="boomcolor(k)=xui.Color_Green"; +parent._boomcolor[_k] = parent.mostCurrent._xui.Color_Green; + //BA.debugLineNum = 1138;BA.debugLine="Return boomcolor(k)"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,(Object)(parent._boomcolor[_k]));return;}; + if (true) break; + +case 18: +//C +this.state = 26; +; + if (true) break; +if (true) break; + +case 19: +//C +this.state = 24; +; + //BA.debugLineNum = 1142;BA.debugLine="ytemp=ytemp-1"; +_ytemp = (int) (_ytemp-1); + if (true) break; +if (true) break; + +case 20: +//C +this.state = -1; +; + //BA.debugLineNum = 1144;BA.debugLine="boomcolor(k)=xui.Color_yellow"; +parent._boomcolor[_k] = parent.mostCurrent._xui.Color_Yellow; + //BA.debugLineNum = 1145;BA.debugLine="boomon=False"; +parent._boomon = anywheresoftware.b4a.keywords.Common.False; + //BA.debugLineNum = 1146;BA.debugLine="Log(\"boomon\"&boomon)"; +anywheresoftware.b4a.keywords.Common.LogImpl("71966169","boomon"+BA.ObjectToString(parent._boomon),0); + //BA.debugLineNum = 1147;BA.debugLine="Return boomcolor(k)"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,(Object)(parent._boomcolor[_k]));return;}; + //BA.debugLineNum = 1148;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +public static anywheresoftware.b4a.keywords.Common.ResumableSubWrapper _trianglefiller(b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,int _k) throws Exception{ +ResumableSub_trianglefiller rsub = new ResumableSub_trianglefiller(null,_point1,_point2,_point3,_k); +rsub.resume(processBA, null); +return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub); +} +public static class ResumableSub_trianglefiller extends BA.ResumableSub { +public ResumableSub_trianglefiller(b4a.bitmapdrawer2.main parent,b4a.bitmapdrawer2.main._coordx _point1,b4a.bitmapdrawer2.main._coordx _point2,b4a.bitmapdrawer2.main._coordx _point3,int _k) { +this.parent = parent; +this._point1 = _point1; +this._point2 = _point2; +this._point3 = _point3; +this._k = _k; +} +b4a.bitmapdrawer2.main parent; +b4a.bitmapdrawer2.main._coordx _point1; +b4a.bitmapdrawer2.main._coordx _point2; +b4a.bitmapdrawer2.main._coordx _point3; +int _k; +long _timer = 0L; +anywheresoftware.b4a.objects.collections.List _line1xvalues = null; +anywheresoftware.b4a.objects.collections.List _line2xvalues = null; +anywheresoftware.b4a.objects.collections.List _line1yvalues = null; +anywheresoftware.b4a.objects.collections.List _line2yvalues = null; +anywheresoftware.b4a.objects.collections.Map _cwmap = null; +anywheresoftware.b4a.objects.collections.Map _acwmap = null; +b4a.bitmapdrawer2.main._coordx _pmax = null; +b4a.bitmapdrawer2.main._coordx _pmin = null; +b4a.bitmapdrawer2.main._coordx _temp = null; +anywheresoftware.b4a.objects.collections.Map _pmap = null; +float _temp3 = 0f; +float _temp4 = 0f; +b4a.bitmapdrawer2.main._coordx _temp2 = null; +int _ytemp = 0; +int _i = 0; +int step60; +int limit60; + +@Override +public void resume(BA ba, Object[] result) throws Exception{ + + while (true) { + switch (state) { + case -1: +{ +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;} +case 0: +//C +this.state = 1; + //BA.debugLineNum = 975;BA.debugLine="Dim timer As Long"; +_timer = 0L; + //BA.debugLineNum = 976;BA.debugLine="timer=DateTime.Now"; +_timer = anywheresoftware.b4a.keywords.Common.DateTime.getNow(); + //BA.debugLineNum = 978;BA.debugLine="Dim line1xvalues As List"; +_line1xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 979;BA.debugLine="Dim line2xvalues As List"; +_line2xvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 980;BA.debugLine="Dim line1yvalues As List"; +_line1yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 981;BA.debugLine="Dim line2yvalues As List"; +_line2yvalues = new anywheresoftware.b4a.objects.collections.List(); + //BA.debugLineNum = 982;BA.debugLine="Dim CWmap As Map"; +_cwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 983;BA.debugLine="Dim ACWmap As Map"; +_acwmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 985;BA.debugLine="ACWmap.Initialize 'used to progress clockwise an"; +_acwmap.Initialize(); + //BA.debugLineNum = 986;BA.debugLine="ACWmap.Put(point1,point2)"; +_acwmap.Put((Object)(_point1),(Object)(_point2)); + //BA.debugLineNum = 987;BA.debugLine="ACWmap.Put(point2,point3)"; +_acwmap.Put((Object)(_point2),(Object)(_point3)); + //BA.debugLineNum = 988;BA.debugLine="ACWmap.Put(point3,point1)"; +_acwmap.Put((Object)(_point3),(Object)(_point1)); + //BA.debugLineNum = 991;BA.debugLine="CWmap.Initialize"; +_cwmap.Initialize(); + //BA.debugLineNum = 992;BA.debugLine="CWmap.Put(point1,point3)"; +_cwmap.Put((Object)(_point1),(Object)(_point3)); + //BA.debugLineNum = 993;BA.debugLine="CWmap.Put(point2,point1)"; +_cwmap.Put((Object)(_point2),(Object)(_point1)); + //BA.debugLineNum = 994;BA.debugLine="CWmap.Put(point3,point2)"; +_cwmap.Put((Object)(_point3),(Object)(_point2)); + //BA.debugLineNum = 995;BA.debugLine="line1xvalues.Initialize"; +_line1xvalues.Initialize(); + //BA.debugLineNum = 996;BA.debugLine="line2xvalues.Initialize"; +_line2xvalues.Initialize(); + //BA.debugLineNum = 997;BA.debugLine="line1yvalues.initialize"; +_line1yvalues.Initialize(); + //BA.debugLineNum = 998;BA.debugLine="line2yvalues.Initialize"; +_line2yvalues.Initialize(); + //BA.debugLineNum = 1001;BA.debugLine="Dim pmax As coordX"; +_pmax = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1002;BA.debugLine="Dim pmin As coordX"; +_pmin = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1003;BA.debugLine="Dim temp As coordX"; +_temp = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1004;BA.debugLine="Dim Pmap As Map 'lets us grab the maxY and minY"; +_pmap = new anywheresoftware.b4a.objects.collections.Map(); + //BA.debugLineNum = 1005;BA.debugLine="Pmap.Initialize"; +_pmap.Initialize(); + //BA.debugLineNum = 1006;BA.debugLine="Pmap.Put(point1.y,point1)"; +_pmap.Put((Object)(_point1.y /*float*/ ),(Object)(_point1)); + //BA.debugLineNum = 1007;BA.debugLine="Pmap.Put(point2.y,point2)"; +_pmap.Put((Object)(_point2.y /*float*/ ),(Object)(_point2)); + //BA.debugLineNum = 1008;BA.debugLine="Pmap.Put(point3.y,point3)"; +_pmap.Put((Object)(_point3.y /*float*/ ),(Object)(_point3)); + //BA.debugLineNum = 1010;BA.debugLine="pmax.Initialize"; +_pmax.Initialize(); + //BA.debugLineNum = 1011;BA.debugLine="pmin.Initialize"; +_pmin.Initialize(); + //BA.debugLineNum = 1012;BA.debugLine="Dim temp3 As Float"; +_temp3 = 0f; + //BA.debugLineNum = 1013;BA.debugLine="temp3 = Max(point1.y,Max(point2.y,point3.y))"; +_temp3 = (float) (anywheresoftware.b4a.keywords.Common.Max(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Max(_point2.y /*float*/ ,_point3.y /*float*/ ))); + //BA.debugLineNum = 1014;BA.debugLine="Dim temp4 As Float"; +_temp4 = 0f; + //BA.debugLineNum = 1015;BA.debugLine="temp4 = Min(point1.y,Min(point2.y,point3.y))"; +_temp4 = (float) (anywheresoftware.b4a.keywords.Common.Min(_point1.y /*float*/ ,anywheresoftware.b4a.keywords.Common.Min(_point2.y /*float*/ ,_point3.y /*float*/ ))); + //BA.debugLineNum = 1016;BA.debugLine="pmax=Pmap.Get(temp3) 'temp variable required, oth"; +_pmax = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp3))); + //BA.debugLineNum = 1017;BA.debugLine="pmin=Pmap.Get(temp4)"; +_pmin = (b4a.bitmapdrawer2.main._coordx)(_pmap.Get((Object)(_temp4))); + //BA.debugLineNum = 1018;BA.debugLine="Dim temp2 As coordX"; +_temp2 = new b4a.bitmapdrawer2.main._coordx(); + //BA.debugLineNum = 1019;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 1020;BA.debugLine="line1xvalues.add(pmax.x)'initial point to both li"; +_line1xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 1021;BA.debugLine="line1yvalues.add(pmax.y)"; +_line1yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 1022;BA.debugLine="line2xvalues.add(pmax.x)"; +_line2xvalues.Add((Object)(_pmax.x /*float*/ )); + //BA.debugLineNum = 1023;BA.debugLine="line2yvalues.add(pmax.y)"; +_line2yvalues.Add((Object)(_pmax.y /*float*/ )); + //BA.debugLineNum = 1025;BA.debugLine="Do While temp <> pmin 'cwloop"; +if (true) break; + +case 1: +//do while +this.state = 4; +while ((_temp).equals(_pmin) == false) { +this.state = 3; +if (true) break; +} +if (true) break; + +case 3: +//C +this.state = 1; + //BA.debugLineNum = 1026;BA.debugLine="temp2=CWmap.Get(temp)'gets second point for line"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_cwmap.Get((Object)(_temp))); + //BA.debugLineNum = 1027;BA.debugLine="Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y"; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_line1xvalues,_line1yvalues)); +this.state = 13; +return; +case 13: +//C +this.state = 1; +; + //BA.debugLineNum = 1028;BA.debugLine="temp = CWmap.Get(temp) 'changes the first line p"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_cwmap.Get((Object)(_temp))); + if (true) break; + +case 4: +//C +this.state = 5; +; + //BA.debugLineNum = 1031;BA.debugLine="temp = pmax"; +_temp = _pmax; + //BA.debugLineNum = 1035;BA.debugLine="Do While temp <> pmin 'acwloop"; +if (true) break; + +case 5: +//do while +this.state = 8; +while ((_temp).equals(_pmin) == false) { +this.state = 7; +if (true) break; +} +if (true) break; + +case 7: +//C +this.state = 5; + //BA.debugLineNum = 1036;BA.debugLine="temp2=ACWmap.Get(temp)'gets second point for lin"; +_temp2 = (b4a.bitmapdrawer2.main._coordx)(_acwmap.Get((Object)(_temp))); + //BA.debugLineNum = 1037;BA.debugLine="wait for (calcline(temp.x,temp.y, temp2.x,temp2."; +anywheresoftware.b4a.keywords.Common.WaitFor("complete", processBA, this, _calcline((int) (_temp.x /*float*/ ),(int) (_temp.y /*float*/ ),(int) (_temp2.x /*float*/ ),(int) (_temp2.y /*float*/ ),_line2xvalues,_line2yvalues)); +this.state = 14; +return; +case 14: +//C +this.state = 5; +; + //BA.debugLineNum = 1038;BA.debugLine="temp = ACWmap.Get(temp) 'changes the first line"; +_temp = (b4a.bitmapdrawer2.main._coordx)(_acwmap.Get((Object)(_temp))); + if (true) break; + +case 8: +//C +this.state = 9; +; + //BA.debugLineNum = 1041;BA.debugLine="line1xvalues.add(pmin.x)'final point to both line"; +_line1xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 1042;BA.debugLine="line1yvalues.add(pmin.y)"; +_line1yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 1043;BA.debugLine="line2xvalues.add(pmin.x)"; +_line2xvalues.Add((Object)(_pmin.x /*float*/ )); + //BA.debugLineNum = 1044;BA.debugLine="line2yvalues.add(pmin.y)"; +_line2yvalues.Add((Object)(_pmin.y /*float*/ )); + //BA.debugLineNum = 1045;BA.debugLine="Dim ytemp As Int"; +_ytemp = 0; + //BA.debugLineNum = 1046;BA.debugLine="ytemp=pmax.y 'could choose to save both x and y"; +_ytemp = (int) (_pmax.y /*float*/ ); + //BA.debugLineNum = 1047;BA.debugLine="For i=0 To Min(line1xvalues.Size,line2xvalues.Siz"; +if (true) break; + +case 9: +//for +this.state = 12; +step60 = 1; +limit60 = (int) (anywheresoftware.b4a.keywords.Common.Min(_line1xvalues.getSize(),_line2xvalues.getSize())-1); +_i = (int) (0) ; +this.state = 15; +if (true) break; + +case 15: +//C +this.state = 12; +if ((step60 > 0 && _i <= limit60) || (step60 < 0 && _i >= limit60)) this.state = 11; +if (true) break; + +case 16: +//C +this.state = 15; +_i = ((int)(0 + _i + step60)) ; +if (true) break; + +case 11: +//C +this.state = 16; + //BA.debugLineNum = 1048;BA.debugLine="bmcGraph.DrawLine(line1xvalues.Get(i),ytemp,line"; +parent.mostCurrent._bmcgraph._drawline((float)(BA.ObjectToNumber(_line1xvalues.Get(_i))),(float) (_ytemp),(float)(BA.ObjectToNumber(_line2xvalues.Get(_i))),(float) (_ytemp),parent._boomcolor[_k],(int) (1)); + //BA.debugLineNum = 1049;BA.debugLine="ytemp=ytemp-1"; +_ytemp = (int) (_ytemp-1); + if (true) break; +if (true) break; + +case 12: +//C +this.state = -1; +; + //BA.debugLineNum = 1053;BA.debugLine="Return 2"; +if (true) { +anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,(Object)(2));return;}; + //BA.debugLineNum = 1054;BA.debugLine="End Sub"; +if (true) break; + + } + } + } +} +} diff --git a/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/starter.java b/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/starter.java new file mode 100644 index 0000000..efdc485 --- /dev/null +++ b/migrationbitmapb4a/Objects/src/b4a/bitmapdrawer2/starter.java @@ -0,0 +1,217 @@ +package b4a.bitmapdrawer2; + + +import anywheresoftware.b4a.BA; +import anywheresoftware.b4a.objects.ServiceHelper; +import anywheresoftware.b4a.debug.*; + +public class starter extends android.app.Service{ + public static class starter_BR extends android.content.BroadcastReceiver { + + @Override + public void onReceive(android.content.Context context, android.content.Intent intent) { + BA.LogInfo("** Receiver (starter) OnReceive **"); + android.content.Intent in = new android.content.Intent(context, starter.class); + if (intent != null) + in.putExtra("b4a_internal_intent", intent); + ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, true, BA.class); + } + + } + static starter mostCurrent; + public static BA processBA; + private ServiceHelper _service; + public static Class getObject() { + return starter.class; + } + @Override + public void onCreate() { + super.onCreate(); + mostCurrent = this; + if (processBA == null) { + processBA = new BA(this, null, null, "b4a.bitmapdrawer2", "b4a.bitmapdrawer2.starter"); + if (BA.isShellModeRuntimeCheck(processBA)) { + processBA.raiseEvent2(null, true, "SHELL", false); + } + try { + Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null); + } catch (Exception e) { + throw new RuntimeException(e); + } + processBA.loadHtSubs(this.getClass()); + ServiceHelper.init(); + } + _service = new ServiceHelper(this); + processBA.service = this; + + if (BA.isShellModeRuntimeCheck(processBA)) { + processBA.raiseEvent2(null, true, "CREATE", true, "b4a.bitmapdrawer2.starter", processBA, _service, anywheresoftware.b4a.keywords.Common.Density); + } + if (!true && ServiceHelper.StarterHelper.startFromServiceCreate(processBA, false) == false) { + + } + else { + processBA.setActivityPaused(false); + BA.LogInfo("*** Service (starter) Create ***"); + processBA.raiseEvent(null, "service_create"); + } + processBA.runHook("oncreate", this, null); + if (true) { + ServiceHelper.StarterHelper.runWaitForLayouts(); + } + } + @Override + public void onStart(android.content.Intent intent, int startId) { + onStartCommand(intent, 0, 0); + } + @Override + public int onStartCommand(final android.content.Intent intent, int flags, int startId) { + if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() { + public void run() { + handleStart(intent); + }})) + ; + else { + ServiceHelper.StarterHelper.addWaitForLayout (new Runnable() { + public void run() { + processBA.setActivityPaused(false); + BA.LogInfo("** Service (starter) Create **"); + processBA.raiseEvent(null, "service_create"); + handleStart(intent); + ServiceHelper.StarterHelper.removeWaitForLayout(); + } + }); + } + processBA.runHook("onstartcommand", this, new Object[] {intent, flags, startId}); + return android.app.Service.START_NOT_STICKY; + } + public void onTaskRemoved(android.content.Intent rootIntent) { + super.onTaskRemoved(rootIntent); + if (true) + processBA.raiseEvent(null, "service_taskremoved"); + + } + private void handleStart(android.content.Intent intent) { + BA.LogInfo("** Service (starter) Start **"); + java.lang.reflect.Method startEvent = processBA.htSubs.get("service_start"); + if (startEvent != null) { + if (startEvent.getParameterTypes().length > 0) { + anywheresoftware.b4a.objects.IntentWrapper iw = ServiceHelper.StarterHelper.handleStartIntent(intent, _service, processBA); + processBA.raiseEvent(null, "service_start", iw); + } + else { + processBA.raiseEvent(null, "service_start"); + } + } + } + + @Override + public void onDestroy() { + super.onDestroy(); + if (true) { + BA.LogInfo("** Service (starter) Destroy (ignored)**"); + } + else { + BA.LogInfo("** Service (starter) Destroy **"); + processBA.raiseEvent(null, "service_destroy"); + processBA.service = null; + mostCurrent = null; + processBA.setActivityPaused(true); + processBA.runHook("ondestroy", this, null); + } + } + +@Override + public android.os.IBinder onBind(android.content.Intent intent) { + return null; + }public anywheresoftware.b4a.keywords.Common __c = null; +public static anywheresoftware.b4a.objects.RuntimePermissions _rp = null; +public static anywheresoftware.b4a.gps.GPS _gps1 = null; +public static boolean _gpsstarted = false; +public static boolean _validgps = false; +public static anywheresoftware.b4a.gps.LocationWrapper _location2 = null; +public b4a.bitmapdrawer2.main _main = null; +public static boolean _application_error(anywheresoftware.b4a.objects.B4AException _error,String _stacktrace) throws Exception{ + //BA.debugLineNum = 52;BA.debugLine="Sub Application_Error (Error As Exception, StackTr"; + //BA.debugLineNum = 53;BA.debugLine="Return True"; +if (true) return anywheresoftware.b4a.keywords.Common.True; + //BA.debugLineNum = 54;BA.debugLine="End Sub"; +return false; +} +public static String _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{ + //BA.debugLineNum = 37;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)"; + //BA.debugLineNum = 38;BA.debugLine="CallSub2(Main, \"LocationChanged\", Location1)"; +anywheresoftware.b4a.keywords.Common.CallSubNew2(processBA,(Object)(mostCurrent._main.getObject()),"LocationChanged",(Object)(_location1)); + //BA.debugLineNum = 39;BA.debugLine="Location2 = Location1"; +_location2 = _location1; + //BA.debugLineNum = 40;BA.debugLine="ValidGPS = True"; +_validgps = anywheresoftware.b4a.keywords.Common.True; + //BA.debugLineNum = 41;BA.debugLine="End Sub"; +return ""; +} +public static String _process_globals() throws Exception{ + //BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals"; + //BA.debugLineNum = 9;BA.debugLine="Public rp As RuntimePermissions"; +_rp = new anywheresoftware.b4a.objects.RuntimePermissions(); + //BA.debugLineNum = 10;BA.debugLine="Public GPS1 As GPS"; +_gps1 = new anywheresoftware.b4a.gps.GPS(); + //BA.debugLineNum = 11;BA.debugLine="Private gpsStarted As Boolean"; +_gpsstarted = false; + //BA.debugLineNum = 12;BA.debugLine="Public ValidGPS As Boolean"; +_validgps = false; + //BA.debugLineNum = 13;BA.debugLine="Public Location2 As Location"; +_location2 = new anywheresoftware.b4a.gps.LocationWrapper(); + //BA.debugLineNum = 14;BA.debugLine="End Sub"; +return ""; +} +public static String _service_create() throws Exception{ + //BA.debugLineNum = 16;BA.debugLine="Sub Service_Create"; + //BA.debugLineNum = 19;BA.debugLine="GPS1.Initialize(\"GPS\")"; +_gps1.Initialize("GPS"); + //BA.debugLineNum = 20;BA.debugLine="Location2.Initialize"; +_location2.Initialize(); + //BA.debugLineNum = 21;BA.debugLine="End Sub"; +return ""; +} +public static String _service_destroy() throws Exception{ + //BA.debugLineNum = 56;BA.debugLine="Sub Service_Destroy"; + //BA.debugLineNum = 58;BA.debugLine="End Sub"; +return ""; +} +public static String _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{ + //BA.debugLineNum = 43;BA.debugLine="Sub Service_Start (StartingIntent As Intent)"; + //BA.debugLineNum = 44;BA.debugLine="Service.StopAutomaticForeground 'Starter service"; +mostCurrent._service.StopAutomaticForeground(); + //BA.debugLineNum = 45;BA.debugLine="End Sub"; +return ""; +} +public static String _service_taskremoved() throws Exception{ + //BA.debugLineNum = 47;BA.debugLine="Sub Service_TaskRemoved"; + //BA.debugLineNum = 49;BA.debugLine="End Sub"; +return ""; +} +public static String _startgps() throws Exception{ + //BA.debugLineNum = 23;BA.debugLine="Public Sub StartGps"; + //BA.debugLineNum = 24;BA.debugLine="If gpsStarted = False Then"; +if (_gpsstarted==anywheresoftware.b4a.keywords.Common.False) { + //BA.debugLineNum = 25;BA.debugLine="GPS1.Start(0, 0)"; +_gps1.Start(processBA,(long) (0),(float) (0)); + //BA.debugLineNum = 26;BA.debugLine="gpsStarted = True"; +_gpsstarted = anywheresoftware.b4a.keywords.Common.True; + }; + //BA.debugLineNum = 28;BA.debugLine="End Sub"; +return ""; +} +public static String _stopgps() throws Exception{ + //BA.debugLineNum = 30;BA.debugLine="Public Sub StopGps"; + //BA.debugLineNum = 31;BA.debugLine="If gpsStarted Then"; +if (_gpsstarted) { + //BA.debugLineNum = 32;BA.debugLine="GPS1.Stop"; +_gps1.Stop(); + //BA.debugLineNum = 33;BA.debugLine="gpsStarted = False"; +_gpsstarted = anywheresoftware.b4a.keywords.Common.False; + }; + //BA.debugLineNum = 35;BA.debugLine="End Sub"; +return ""; +} +} diff --git a/migrationbitmapb4a/Starter.bas b/migrationbitmapb4a/Starter.bas new file mode 100644 index 0000000..a1b02f2 --- /dev/null +++ b/migrationbitmapb4a/Starter.bas @@ -0,0 +1,64 @@ +B4A=true +Group=Default Group +ModulesStructureVersion=1 +Type=Service +Version=9.9 +@EndOfDesignText@ +#Region Service Attributes + #StartAtBoot: False + #ExcludeFromLibrary: True +#End Region + +Sub Process_Globals + 'These global variables will be declared once when the application starts. + 'These variables can be accessed from all modules. + Public rp As RuntimePermissions + Public GPS1 As GPS + Private gpsStarted As Boolean + Public ValidGPS As Boolean + Public Location2 As Location +End Sub + +Sub Service_Create + 'This is the program entry point. + 'This is a good place to load resources that are not specific to a single activity. + GPS1.Initialize("GPS") + Location2.Initialize +End Sub + +Public Sub StartGps + If gpsStarted = False Then + GPS1.Start(0, 0) + gpsStarted = True + End If +End Sub + +Public Sub StopGps + If gpsStarted Then + GPS1.Stop + gpsStarted = False + End If +End Sub + +Sub GPS_LocationChanged (Location1 As Location) + CallSub2(Main, "LocationChanged", Location1) + Location2 = Location1 + ValidGPS = True +End Sub + +Sub Service_Start (StartingIntent As Intent) + Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases. +End Sub + +Sub Service_TaskRemoved + 'This event will be raised when the user removes the app from the recent apps list. +End Sub + +'Return true to allow the OS default exceptions handler to handle the uncaught exception. +Sub Application_Error (Error As Exception, StackTrace As String) As Boolean + Return True +End Sub + +Sub Service_Destroy + +End Sub diff --git a/migrationbitmapb4a/jacksbitmapdrawerb4amigration.b4a b/migrationbitmapb4a/jacksbitmapdrawerb4amigration.b4a new file mode 100644 index 0000000..b878ed2 --- /dev/null +++ b/migrationbitmapb4a/jacksbitmapdrawerb4amigration.b4a @@ -0,0 +1,1171 @@ +Build1=Default,b4a.bitmapdrawer2 +File1=bitmapdrawer.bal +FileGroup1=Default Group +Group=Default Group +Library1=core +Library2=bitmapcreator +Library3=xui +Library4=xui2d +Library5=javaobject +Library6=gps +Library7=runtimepermissions +ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~~\n~)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.DarkTheme)~\n~'End of default text.~\n~ +Module1=|relative|..\sideextra +Module2=Starter +NumberOfFiles=1 +NumberOfLibraries=7 +NumberOfModules=2 +Version=9.9 +@EndOfDesignText@ +#Region Project Attributes + #ApplicationLabel: b4amod + #VersionCode: 1 + #VersionName: + 'SupportedOrientations possible values: unspecified, landscape or portrait. + #SupportedOrientations: unspecified + #CanInstallToExternalStorage: False +#End Region + +#Region Activity Attributes + #FullScreen: False + #IncludeTitle: True +#End Region + +'todo +'set location start to center of bc +'turn on dads bc rotation bmc2 +'current position in x,y=origin(x,y)+delta(x,y) times (current lat long - origin lat long +'increae bc size +'fire iteration on location changed, not on 1000ms timer +'breaking code up into seperate files"b4a break +''wait for could be removed in its entirety and program should still be good + + + +Sub Process_globals + +End Sub + +Sub Globals + Type coordX (y As Float,x As Float) + Type coordxx (lat As Float,lng As Float) + Private mapsize As coordX + 'Private fx As JFX + 'Private MainForm As Form + Private xui As XUI + Private timerx As Int + Private rectanglewholeb4x As B4XRect + + Private pnlGraph As Panel + Private cvsGraph As B4XCanvas + Private imvGraph As ImageView + Private pthGraph As BCPath + Private bmcGraph As BitmapCreator + Private bmc2ndgraph As BitmapCreator + + Private PointX(6), PointY(6) As Double +' Private BtnClear As B4XView +' Private BtnDraw As B4XView +' Private BtnFast As B4XView +' Private BtnStop As B4XView +' Private BtnSlow As B4XView +' Private BtnLeft As B4XView +' Private BtnRight As B4XView + + Private timeriterate As Timer + Private xpos, ypos, xposnew, yposnew As Float + + Private xposleft, yposleft, xposright, yposright, widthsection As Float + Private velocity, heading, headingrate As Float +' Private BtnActivateTimerTick As B4XView + + '///// + Private tractor1 As coordX 'location of tractor + Private trailer1 As coordX 'location of center of trailer + Private tractor0 As coordX 'location of tractor + Private trailer0 As coordX 'location of center of trailer + Private hitch1 As coordX 'location of tractor hitch + Private Offset_hitch As Float + Private offset_trailertoboom As Float + Private offset_trailerlength As Float + Private boomsectionwidth(4) As Float 'center is 1 + Private vector1 As coordX + Private vectorlength1 As Float + Private boompoint0 As coordX + Private boompoint00 As coordX + Private boompoint01 As coordX 'leading point + Private boompoint1 As coordX + Private boompoint10 As coordX + Private boompoint11 As coordX + Private boompoint2 As coordX + Private boompoint20 As coordX + Private boompoint21 As coordX + Private boompoint3 As coordX + Private boompoint30 As coordX + Private boompoint31 As coordX + Private boompoint4 As coordX + Private boompoint40 As coordX + Private boompoint41 As coordX + Private boompoint5 As coordX + Private boompoint50 As coordX + Private boompoint51 As coordX 'leading point + Private boomcenter1 As coordX + Private unitvector1 As coordX + Private boomcolor(5) As Int +' Private boom1color As Int +' Private boom2color As Int +' Private boom3color As Int +' Private boom4color As Int + + + + + Public x1 As Int + Public x2 As Int + Public y1 As Int + Public y2 As Int + + Public P1 As coordX + Public P2 As coordX + Public P3 As coordX + Public P4 As coordX + + Public a0 As coordX + Public a1 As coordX + Public b0 As coordX + Public b1 As coordX + + Public rectanglewhole As Rect + Public canvas1 As Canvas +Private rp As RuntimePermissions + + Dim displayoutlines As Boolean + Dim displayfill As Boolean + + 'Public boomcolour As String + Public boomon As Boolean + Private Panel1 As B4XView + + Type coord (lat As Long,lng As Long) + +' Private location1 As Location + Public origin As coordxx + Private deltalat As Float + Private deltalong As Float + Private xposorigin As Int + Private yposorigin As Int + Private b4arect1 As B4XRect + Private section1colour As Panel + Private section2colour As Panel + Private section3colour As Panel + Private section4colour As Panel + Private section5colour As Panel +End Sub + +Sub activity_create (FirstTime As Boolean)'(Form1 As Form, Args() As String) + 'MainForm = Form1 + 'MainForm.RootPane.LoadLayout("Main") 'Load the layout file. + 'MainForm.Show + Activity.LoadLayout("bitmapdrawer.bal") + 'timeriterate.Initialize("IterateTimer",1000) + 'timeriterate.Enabled = True + b4arect1.Initialize(0,0,imvGraph.Width,imvGraph.Height) + mapsize.Initialize + mapsize.x=1200 + mapsize.y=1200 + xposorigin=mapsize.x/2 + yposorigin=mapsize.y/2 + + xpos = xposorigin + ypos = yposorigin + + + unitvector1.Initialize + Offset_hitch = 0 + offset_trailerlength = 1 + offset_trailertoboom = 1 + boomsectionwidth(1) = 8 + boomsectionwidth(2) = 8 + boomsectionwidth(3) = 8 + +rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION) + a0.Initialize + a1.Initialize + b0.Initialize + b1.Initialize + trailer0.x=xpos + trailer0.y=ypos-Offset_hitch-offset_trailerlength + velocity = 10 + heading = 180 +' bmcGraph..b + boompoint50.Initialize + boompoint5.Initialize + boompoint0.Initialize + boompoint00.Initialize + boompoint51.Initialize + boompoint01.Initialize + boompoint1.Initialize + boompoint10.Initialize + boompoint11.Initialize + boompoint2.Initialize + boompoint20.Initialize + boompoint21.Initialize + boompoint3.Initialize + boompoint30.Initialize + boompoint31.Initialize + boompoint4.Initialize + boompoint40.Initialize + boompoint41.Initialize + boompoint00.x=0 + boompoint50.x=0 + boompoint10.x=0 + boompoint20.x=0 + boompoint30.x=0 + boompoint40.x=0 + headingrate = 0 + widthsection = 100 + cvsGraph.Initialize(imvGraph) + boomon=True + boomcolor(0)=xui.Color_Green + boomcolor(1)=xui.Color_Green + boomcolor(2)=xui.Color_Green + boomcolor(3)=xui.Color_Green + boomcolor(4)=xui.Color_Green + Initialize(1) + 'location_center + Do While Starter.ValidGPS = False + Sleep (100) + Loop + ''Log("a") + +location_center + +End Sub + +Sub LocationChanged(Location1 As Location)'IterateTimer_Tick + If Starter.Location2.BearingValid = True Then + heading=Starter.Location2.Bearing + End If + 'Log("b") + 'heading = heading + headingrate +' If heading < 0 Then +' heading = heading + 360 + 'Else If heading >360 Then + ' heading = heading - 360 + 'End If + timerx=DateTime.now + 'Log("deltalong"&deltalong) +xposnew=xposorigin+deltalong*(Starter.Location2.Longitude-origin.lng)/2 + yposnew=yposorigin+deltalat*(Starter.Location2.latitude-origin.lat)/2 + 'xposnew = xpos + velocity * SinD(heading) + 'yposnew = ypos - velocity * CosD(heading) + Log("xposnew: " & NumberFormat(xposnew,0,0) & " yposnew: " & NumberFormat(yposnew,0,0) & " heading: " & NumberFormat(heading,0,0)) + 'bmcGraph.DrawLine(xpos,ypos,xposnew,yposnew,xui.Color_Black,10) + +' xposright = xposnew + widthsection*CosD(heading)/2 +' yposright = yposnew + widthsection*SinD(heading)/2 +' xposleft = xposnew - widthsection*CosD(heading)/2 +' yposleft = yposnew - widthsection*SinD(heading)/2 + bmcGraph.DrawCircle(xposnew,yposnew,4,xui.Color_red,True,1) + 'hiden by jack bmcGraph.DrawLine(xposleft,yposleft,xposright,yposright,xui.Color_Blue,4) + + '/////// + + + + 'convert all tractor positions to cartesian on our map + tractor0.x=xpos + tractor0.y=ypos + + tractor1.x=xposnew + tractor1.y=yposnew + 'find hitch position of tractor(1) + hitch1.x=tractor1.x-Offset_hitch*CosD(heading+90) + hitch1.y=tractor1.y-Offset_hitch*SinD(heading+90) + 'Log(hitch1.x) + 'Log(hitch1.y) + + vector1.x = hitch1.x-trailer0.x + vector1.y = hitch1.y-trailer0.y + vectorlength1=Power(Power(vector1.x,2)+Power(vector1.y,2),.5) + unitvector1.x=vector1.x/vectorlength1 + unitvector1.y=vector1.y/vectorlength1 + trailer1.x=hitch1.x-vector1.x*offset_trailerlength/vectorlength1 + trailer1.y=hitch1.y-vector1.y*offset_trailerlength/vectorlength1 + boomcenter1.x=-unitvector1.x*offset_trailertoboom+trailer1.x + boomcenter1.y=-unitvector1.y*offset_trailertoboom+trailer1.y + 'perpvect.x=vec.y + 'perpvect.y=-vec.x +' Log("new1"&boompoint0) +' Log("old1"&boompoint00) + boompoint0.x=-(boomsectionwidth(1)/2+boomsectionwidth(2)+boomsectionwidth(3))*unitvector1.y+boomcenter1.x + boompoint0.y=-(boomsectionwidth(1)/2+boomsectionwidth(2)+boomsectionwidth(3))*-unitvector1.x+boomcenter1.y + boompoint01.x=boompoint0.x+ boompoint0.x-boompoint00.x + boompoint01.y=boompoint0.y+ boompoint0.y-boompoint00.y + boompoint1.x=-(boomsectionwidth(1)/2+boomsectionwidth(2))*unitvector1.y+boomcenter1.x + boompoint1.y=-(boomsectionwidth(1)/2+boomsectionwidth(2))*-unitvector1.x+boomcenter1.y + boompoint11.x=boompoint1.x+ boompoint1.x-boompoint10.x + boompoint11.y=boompoint1.y+ boompoint1.y-boompoint10.y + boompoint2.x=-(boomsectionwidth(1)/2)*unitvector1.y+boomcenter1.x + boompoint2.y=-(boomsectionwidth(1)/2)*-unitvector1.x+boomcenter1.y + boompoint21.x=boompoint2.x+ boompoint2.x-boompoint20.x + boompoint21.y=boompoint2.y+ boompoint2.y-boompoint20.y + boompoint3.x=(boomsectionwidth(1)/2)*unitvector1.y+boomcenter1.x + boompoint3.y=(boomsectionwidth(1)/2)*-unitvector1.x+boomcenter1.y + boompoint31.x=boompoint3.x+ boompoint3.x-boompoint30.x + boompoint31.y=boompoint3.y+ boompoint3.y-boompoint30.y + boompoint4.x=(boomsectionwidth(1)/2+boomsectionwidth(2))*unitvector1.y+boomcenter1.x + boompoint4.y=(boomsectionwidth(1)/2+boomsectionwidth(2))*-unitvector1.x+boomcenter1.y + boompoint41.x=boompoint4.x+ boompoint4.x-boompoint40.x + boompoint41.y=boompoint4.y+ boompoint4.y-boompoint40.y + boompoint5.x=(boomsectionwidth(1)/2+boomsectionwidth(2)+boomsectionwidth(3))*unitvector1.y+boomcenter1.x + boompoint5.y=(boomsectionwidth(1)/2+boomsectionwidth(2)+boomsectionwidth(3))*-unitvector1.x+boomcenter1.y + boompoint51.x=boompoint5.x+ boompoint5.x-boompoint50.x + boompoint51.y=boompoint5.y+ boompoint5.y-boompoint50.y + + 'boompoint51.x=boompoint5.x+ (boompoint0.x-boompoint00.x+boompoint5.x-boompoint50.x)/2 + 'boompoint51.y=boompoint5.y+ (boompoint0.y-boompoint00.y+boompoint5.y-boompoint50.y)/2 + 'boompoint01.x=boompoint0.x+ (boompoint0.x-boompoint00.x+boompoint5.x-boompoint50.x)/2 + 'boompoint01.y=boompoint0.y+ (boompoint0.y-boompoint00.y+boompoint5.y-boompoint50.y)/2 + + bmcGraph.DrawLine(boompoint0.x,boompoint0.y,boompoint1.x,boompoint1.y,xui.Color_Gray,1) + bmcGraph.DrawLine(boompoint1.x,boompoint1.y,boompoint2.x,boompoint2.y,xui.Color_Cyan,1) + bmcGraph.DrawLine(boompoint2.x,boompoint2.y,boompoint3.x,boompoint3.y,xui.Color_Green,1) + bmcGraph.DrawLine(boompoint3.x,boompoint3.y,boompoint4.x,boompoint4.y,xui.Color_Magenta,1) + bmcGraph.DrawLine(boompoint4.x,boompoint4.y,boompoint5.x,boompoint5.y,xui.Color_Black,1) + ''Log(bmcGraph.GetColor(1,1))'(boompoint0.x+boompoint01.x+boompoint5.x+boompoint51.x)/4,(boompoint0.y+boompoint01.y+boompoint5.y+boompoint51.y)/4)) + bmcGraph.DrawCircle(hitch1.x,hitch1.y,2,xui.Color_black,True,1) + trailer0.x=trailer1.x + trailer0.y=trailer1.y + If boompoint00.x <>0 Then + + 'Log("boomon"&boomon) + 'If boomon=True Then + + +' Wait For(rectanglefiller(boompoint0, boompoint00, boompoint10, boompoint1,0)) complete '(result As Int) +' Wait For(rectanglefiller(boompoint1, boompoint10, boompoint20, boompoint2,1)) complete '(result As Int) +' Wait For(rectanglefiller(boompoint2, boompoint20, boompoint30, boompoint3,2)) complete '(result As Int) +' Wait For(rectanglefiller(boompoint3, boompoint30, boompoint40, boompoint4,3)) complete '(result As Int) +' Wait For(rectanglefiller(boompoint4, boompoint40, boompoint50, boompoint5,4)) complete '(result As Int) +' End If +' Wait For(rectanglechecker(boompoint01, boompoint0,boompoint1,boompoint11,0)) complete +' Wait For(rectanglechecker(boompoint11, boompoint1,boompoint2,boompoint21,1)) complete +' Wait For(rectanglechecker(boompoint21, boompoint2,boompoint3,boompoint31,2)) complete +' Wait For(rectanglechecker(boompoint31, boompoint3,boompoint4,boompoint41,3)) complete +' Wait For(rectanglechecker(boompoint41, boompoint4,boompoint5,boompoint51,4)) complete + + Wait For (lineintersect(boompoint00,boompoint0,boompoint01,boompoint10,boompoint1,boompoint11,0)) complete + + Wait For (lineintersect(boompoint10,boompoint1,boompoint11,boompoint20,boompoint2,boompoint21,1)) complete + Wait For (lineintersect(boompoint20,boompoint2,boompoint21,boompoint30,boompoint3,boompoint31,2)) complete + Wait For (lineintersect(boompoint30,boompoint3,boompoint31,boompoint40,boompoint4,boompoint41,3)) complete + Wait For (lineintersect(boompoint40,boompoint4,boompoint41,boompoint50,boompoint5,boompoint51,4)) complete + timerx=DateTime.Now-timerx + Log("timerx"&timerx) + bmcGraph.DrawLine(boompoint01.x,boompoint01.y,boompoint51.x,boompoint51.y,xui.Color_red,1) + bmcGraph.DrawLine(boompoint01.x,boompoint01.y,boompoint0.x,boompoint0.y,xui.Color_magenta,1) + 'bmcGraph.DrawLine(boompoint0.x,boompoint0.y,boompoint5.x,boompoint5.y,xui.Color_red,1)'shows up too much on trail + bmcGraph.DrawLine(boompoint51.x,boompoint51.y,boompoint5.x,boompoint5.y,xui.Color_blue,1) + + '(boompoint0, boompoint00, boompoint50, boompoint5)) + '(boompoint0.x,boompoint0.y, boompoint00.x,boompoint00.y, boompoint50.x,boompoint50.y, boompoint5.x,boompoint5.y)) + End If + + + boompoint00.x=boompoint0.x'custom type issue, equating one boompoint to another just refers rather than copying over, this is in reference to primitive and nonprimitive variables + boompoint00.y=boompoint0.y + boompoint10.x=boompoint1.x + boompoint10.y=boompoint1.y + boompoint20.x=boompoint2.x + boompoint20.y=boompoint2.y + boompoint30.x=boompoint3.x + boompoint30.y=boompoint3.y + boompoint40.x=boompoint4.x + boompoint40.y=boompoint4.y + + boompoint50.x=boompoint5.x + boompoint50.y=boompoint5.y + + + 'rectanglefiller(boompoint0.x)', boompoint00, boompoint50, boompoint5) + '/////// Jacks transform bitmapcreator + 'Sleep(2000) + Dim r As B4XRect + r.Initialize(xposnew-400,yposnew-400,xposnew+400,yposnew+400)'defines the square that is observed and copied from bc + bmc2ndgraph.Initialize(imvGraph.Width, imvGraph.Height) + Dim dt As DrawTask = bmcGraph.CreateDrawTask(bmcGraph,r,imvGraph.Width/2,imvGraph.Height/2,True) + dt.SrcScaleX=4 + dt.SrcScaleY=4 + dt.Degrees=-Starter.Location2.Bearing + 'Log("bearing"&Starter.Location2.Bearing) + ''Log("bmc"&bmcGraph.mHeight) + ''Log("imvgraph.width"&imvGraph.Width) + bmc2ndgraph.DrawBitmapCreatorTransformed(dt) + cvsGraph.DrawBitmap(bmc2ndgraph.Bitmap,b4arect1) + imvGraph.Invalidate + section1colour.Color=boomcolor(0) + section2colour.Color=boomcolor(1) + section3colour.Color=boomcolor(2) + section4colour.Color=boomcolor(3) + section5colour.Color=boomcolor(4) + '/// + + 'Dim r As B4XRect + 'r.Initialize(450,450, 550,550)'xposnew+bmcGraph.mWidth/20,yposnew+bmcGraph.mHeight/20) + 'Dim dt As DrawTask = bmcGraph.CreateDrawTask(bmcGraph, r, 100, 100, True) '(50, 50) defines the target center + 'dt.SrcScaleX = .5 + 'dt.SrcScaleY = .5 + 'Log(bmcGraph.mWidth) + 'dt.Degrees = -heading +' dt.TargetX=200 +' dt.TargetY=200 +' dt.SkipBlending=True +' dt.Source=bmcGraph +' dt.SrcRect=r +' bmcGraph.DrawCircle(100,100,30,Colors.Black,True,1) +' bmcGraph.DrawLine(3,3,100,100,xui.Color_red,3) + 'bmcGraph.DrawBitmapCreatorTransformed(dt) +' imvGraph.SetBitmap(bmcGraph.Bitmap) +' bmc2ndgraph.Initialize(pnlGraph.Width, pnlGraph.Height) + 'need to clear bmc2ndgraph above before writing a clean image onto it. Otherwise DrawBitmapCreatorTransformed(dt) just draws over the top +' bmc2ndgraph.DrawBitmapCreatorTransformed(dt) +' canv.DrawBitmap(bc.Bitmap,Null,b4arect) + 'imvGraph.SetBitmap(bmcGraph.Bitmap) +' cvsGraph.DrawBitmap(bmcGraph.Bitmap,rectanglewholeb4x) +' imvGraph.Invalidate + 'imvGraph.Bitmap=(bmc2ndgraph.Bitmap) + ', xposright, yposright, width + ''Log("color"&bmcGraph.GetColor(100,100)) + + 'r.Initialize(0, 0, bmcGraph.mWidth, bmcGraph.mHeight) + 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + 'ABOVE WORKS, BELOW DOSEN'T. i THINK IT IS BEACUSE RECTANGLE CAN'T HAVE NEGATIVE COORDS + 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + 'FIXED BY ENLARGING MAIN BC AND STARTING IN MIDDLE. cRASHES WHEN AN ATTEMPT IS MADE TO DRAW OUTSIDE THIS BC. + 'NEED TO CHECK THAT HEADING IS CORRECT. + 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZXXXXXXXXXXXXXXXXXXCCCCCCCCCCCCCCCCCCVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV + + + + + xpos = xposnew + ypos = yposnew +End Sub + +Sub BtnFast_Click + velocity = velocity + 1 + +End Sub + +Sub BtnStop_Click + velocity = 0 + +End Sub + +Sub BtnSlow_Click + velocity = velocity - 1 +End Sub + +Sub BtnLeft_Click + + headingrate = headingrate -1 + +End Sub + +Sub BtnRight_Click + headingrate = headingrate +1 + +End Sub + +Sub BtnClear_Click + 'timeriterate.Enabled = False + 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + bmcGraph.Initialize(pnlGraph.Width*10, pnlGraph.Height*10) + imvGraph.Bitmap=(bmcGraph.Bitmap) + 'timeriterate.Enabled = True +End Sub + +'Sub BtnActivateTimerTick_Click + 'timeriterate.Enabled = True + 'IterateTimer_Tick +'End Sub + +Sub BtnDraw_Click + Dim intcolour As Int + For i=0 To pnlGraph.Width-1 + For j=0 To pnlGraph.Height-1 + intcolour = bmcGraph.GetColor(i,j) + 'don't know why white is showing up as =0 in this test. Testing for color white doesn't work + If bmcGraph.GetColor(i,j) <> 0 Then 'fx.Colors.To32Bit(fx.Colors.White) and xui.Color_White don't work + 'bmcGraph.SetColor(i,j,fx.Colors.To32Bit(fx.Colors.Green)) + End If + + Next + Next + bmcGraph.DrawLine(0,0,pnlGraph.Width, 0,xui.Color_Magenta,100) + Dim r As B4XRect + 'r.Initialize(0, 0, bmcGraph.mWidth, bmcGraph.mHeight) + r.Initialize(bmcGraph.mWidth/4, bmcGraph.mHeight/4, bmcGraph.mWidth*0.75, bmcGraph.mHeight*0.75) + Dim dt As DrawTask = bmcGraph.CreateDrawTask(bmcGraph, r, pnlGraph.Width/2, pnlGraph.Height/2, True) '(50, 50) defines the target center + dt.SrcScaleX = 1 + dt.SrcScaleY = 1 + dt.Degrees = 15 +' bmcGraph.DrawBitmapCreatorTransformed(dt) +' imvGraph.SetBitmap(bmcGraph.Bitmap) + bmc2ndgraph.DrawBitmapCreatorTransformed(dt) + + imvGraph.Bitmap=(bmc2ndgraph.Bitmap) + 'the inclusion of the following line results in unexpected behaviour + 'bmcGraph = bmc2ndgraph +End Sub + +'points must be in order +Sub rectanglechecker(point1 As coordX, point2 As coordX, point3 As coordX, point4 As coordX, k As Int)As ResumableSub + Dim RC_ACWmap As Map + Dim RC_CWmap As Map + Dim RC_line1xvalues As List + Dim RC_line2xvalues As List + Dim RC_line2yvalues As List + Dim RC_line1yvalues As List + 'Dim boomcolor As Int + + RC_ACWmap.Initialize 'used to progress clockwise and anticlockwise around rectangle + RC_ACWmap.Put(point1,point2) + RC_ACWmap.Put(point2,point3) + RC_ACWmap.Put(point4,point1) + RC_ACWmap.Put(point3,point4) + + RC_CWmap.Initialize + RC_CWmap.Put(point1,point4) + RC_CWmap.Put(point2,point1) + RC_CWmap.Put(point4,point3) + RC_CWmap.Put(point3,point2) + + RC_line1xvalues.Initialize + RC_line2xvalues.Initialize + RC_line1yvalues.initialize + RC_line2yvalues.Initialize + + + Dim pmax As coordX + Dim pmin As coordX + Dim temp As coordX + Dim Pmap As Map 'lets us grab the maxY and minY after finding the min and max value + Pmap.Initialize + Pmap.Put(point1.y,point1) + Pmap.Put(point2.y,point2) + Pmap.Put(point4.y,point4) + Pmap.Put(point3.y,point3) + + pmax.Initialize + pmin.Initialize + + Dim temp3 As Float + temp3 = Max(point1.y,Max(point2.y,Max(point4.y,point3.y))) + Dim temp4 As Float + temp4 = Min(point1.y,Min(point2.y,Min(point4.y,point3.y))) + pmax=Pmap.Get(temp3) 'temp variable required, otherwise pmax is null + pmin=Pmap.Get(temp4) + Dim temp2 As coordX + temp = pmax + RC_line1xvalues.add(pmax.x)'initial point to both line lists + RC_line1yvalues.add(pmax.y) + RC_line2xvalues.add(pmax.x) + RC_line2yvalues.add(pmax.y) + + Do While temp <> pmin 'cwloop + temp2=RC_CWmap.Get(temp)'gets second point for line + Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y,RC_line1xvalues,RC_line1yvalues)) complete 'RC_line2xvalues generated + temp = RC_CWmap.Get(temp) 'changes the first line point to the second + Loop + temp = pmax + + + + Do While temp <> pmin 'acwloop + temp2=RC_ACWmap.Get(temp)'gets second point for line + wait for (calcline(temp.x,temp.y, temp2.x,temp2.y,RC_line2xvalues,RC_line2yvalues)) complete 'RC_line2xvalues generated + temp = RC_ACWmap.Get(temp) 'changes the first line point to the second + Loop + RC_line1xvalues.add(pmin.x)'adds final point to both line lists + RC_line1yvalues.add(pmin.y) + RC_line2xvalues.add(pmin.x) + RC_line2yvalues.add(pmin.y) + Dim ytemp As Int + Dim pixelchecked As Int + pixelchecked=0 + 'Dim loop1cycles As Int +' loop1cycles=0 +' Dim loop2onetake2 As Double +' loop2onetake2=0 + ' bmcGraph.DrawLine(line1xvalues.Get(i),ytemp,line2xvalues.get(i),ytemp,boomcolour,1) + ' ytemp=ytemp-1 + + ytemp=pmax.y 'could choose to save both x and y values to RC_line1xvalues rather than just x. + For i=0 To (Min(RC_line1xvalues.Size,RC_line2xvalues.Size)-1) 'iterates from top point to bottom of polygone, drawing a level line from left to right + For j=RC_line2xvalues.Get(i) To RC_line1xvalues.Get(i) Step 1'issue solved, was counting from a higher number to a lower number rather than lower to higher + 'Log("j="&j) + pixelchecked=pixelchecked+1 +' loop2onetake2=loop2onetake2+RC_line1xvalues.Get(i)-RC_line2xvalues.Get(i) +' Log("1 "&RC_line1xvalues.Get(i)) +' Log("2 "&RC_line2xvalues.Get(i)) +' Log("ytemp"&ytemp) +' Log("color"&bmcGraph.GetColor(j,ytemp)) + 'bmcGraph.DrawCircle(RC_line1xvalues.Get(i),ytemp,6,-16711936,False,2)'-7829368 is gray + If bmcGraph.GetColor(j,ytemp)=-1 Then + boomon=True + boomcolor(k)=xui.Color_Green + Log("pixelchecked"&pixelchecked) +' Log("loop2"&loop2onetake2) +' Log("boomon"&boomon) + Return boomcolor(k) + + End If +' bmcGraph.setColor(j,ytemp,xui.Color_Yellow) + Next +' loop1cycles=loop1cycles+1 + 'bmcGraph.DrawLine(RC_line1xvalues.Get(i),ytemp,RC_line2xvalues.get(i),ytemp,xui.Color_green,1) + ytemp=ytemp-1 + Next + Log("pixelchecked"&pixelchecked) + boomcolor(k)=xui.Color_yellow + 'Log("line1size"&RC_line1xvalues.size) +' Log("line2size"&RC_line2xvalues.size) +' Log("loop1cycles"&loop1cycles) +' Log("loop2 "&loop2onetake2) + boomon=False + Log("boomon"&boomon) +' Log("pauselinefalse") + Return boomcolor(k) +End Sub + +'Return true to allow the default exceptions handler to handle the uncaught exception. +Sub Application_Error (Error As Exception, StackTrace As String) As Boolean + Return True +End Sub + + +Private Sub Initialize(Index As Int) + 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + bmcGraph.Initialize(1000,1000) + 'the following line + 'bmc2ndgraph.Initialize(pnlGraph.Width/2, pnlGraph.Height/2) + ' results in the following commands enlarging the bmc2ndgraph to fit + 'bmc2ndgraph.DrawBitmapCreatorTransformed(dt) + 'imvGraph.SetBitmap(bmc2ndgraph.Bitmap) + + bmc2ndgraph.Initialize(mapsize.x, mapsize.y) + rectanglewhole.Initialize(0,0,mapsize.x,mapsize.y) + rectanglewholeb4x.Initialize(0,0,1000,1000) + bmcGraph.DrawRect(rectanglewholeb4x,xui.Color_white,True,1) + bmcGraph.DrawLine(5,900,900,5,xui.Color_green,60) + bmcGraph.DrawLine(5,300,300,5,xui.Color_green,40) +'cvsGraph.DrawBitmap(bmcGraph.bitmap,rectanglewholeb4x) +'imvGraph.Invalidate + +End Sub + 'points must be in order +Sub rectanglefiller(point1 As coordX, point2 As coordX, point3 As coordX, point4 As coordX,k As Int)As ResumableSub + 'find pmax, find pmin + 'construct line clockwise from pmax to pmin + 'construct line anticlockwise from pmax to pmin + 'pull list of x values and draw canvas line between all + Dim timer As Long + timer=DateTime.Now +' point1.x=boompoint00.x +' point1.y=boompoint00.y +' point2.x=boompoint0.x +' point2.y=boompoint0.y +' point4.x=boompoint50.x +' point4.y=boompoint50.y +' point3.x=boompoint5.x +' point3.y=boompoint5.y + Dim line1xvalues As List + Dim line2xvalues As List + Dim line1yvalues As List + Dim line2yvalues As List + Dim CWmap As Map + Dim ACWmap As Map + + ACWmap.Initialize 'used to progress clockwise and anticlockwise around rectangle + ACWmap.Put(point1,point2) + ACWmap.Put(point2,point3) + ACWmap.Put(point4,point1) + ACWmap.Put(point3,point4) + + CWmap.Initialize + CWmap.Put(point1,point4) + CWmap.Put(point2,point1) + CWmap.Put(point4,point3) + CWmap.Put(point3,point2) + line1xvalues.Initialize + line2xvalues.Initialize + line1yvalues.initialize + line2yvalues.Initialize + + + Dim pmax As coordX + Dim pmin As coordX + Dim temp As coordX + Dim Pmap As Map 'lets us grab the maxY and minY after finding the min and max value + Pmap.Initialize + Pmap.Put(point1.y,point1) + Pmap.Put(point2.y,point2) + Pmap.Put(point4.y,point4) + Pmap.Put(point3.y,point3) + + '// + 'line1:y1=g1x1+h2 + 'line2:y2=g2x2+h2 + 'Dim g0 As Float + 'Dim g1 As Float + 'Dim h0 As Float + 'Dim h1 As Float + 'Dim Inter As floatcoord + 'If point1.x = point4.x Then 'line is verticle, ie;x=2 +' 'find line2(x=2) which is intercect point + 'End If + 'If point2.x = point3.x Then 'line2 is verticle' +' 'find line2(x=2) which is intercect point + 'End If + 'g0=(point1.y-point4.y)/(point1.x-point4.x) + 'g1=(point2.y-point3.y)/(point2.x-point3.x) + 'h0=point1.y-point1.x*(point1.y-point4.y)/(point1.x-point4.x) + 'h1=point2.y-point2.x*(point2.y-point3.y)/(point2.x-point3.x) + 'Inter.x=(h1-h0)/(g1-g0) + 'Inter.y=g0*Inter.x+h0 + + '// vector form + '// + + + 'pmax=Max(point1.y,Max(point2.y,Max(point4.y,point3.y))) + 'pmin=Min(point1.y,Min(point2.y,Min(point4.y,point3.y))) + pmax.Initialize + pmin.Initialize +' Log(Max(point1.y,Max(point2.y,Max(point4.y,point3.y)))) + Dim temp3 As Float + temp3 = Max(point1.y,Max(point2.y,Max(point4.y,point3.y))) + Dim temp4 As Float + temp4 = Min(point1.y,Min(point2.y,Min(point4.y,point3.y))) +' Log(Pmap.Get(temp3)) + pmax=Pmap.Get(temp3) 'temp variable required, otherwise pmax is null + pmin=Pmap.Get(temp4) + Dim temp2 As coordX + temp = pmax + line1xvalues.add(pmax.x)'initial point to both line lists + line1yvalues.add(pmax.y) + line2xvalues.add(pmax.x) + line2yvalues.add(pmax.y) + + Do While temp <> pmin 'cwloop + temp2=CWmap.Get(temp)'gets second point for line + Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y,line1xvalues,line1yvalues)) complete 'line2xvalues generated + temp = CWmap.Get(temp) 'changes the first line point to the second + 'Log("line1") + Loop + temp = pmax + + + + Do While temp <> pmin 'acwloop + temp2=ACWmap.Get(temp)'gets second point for line + wait for (calcline(temp.x,temp.y, temp2.x,temp2.y,line2xvalues,line2yvalues)) complete 'line2xvalues generated + temp = ACWmap.Get(temp) 'changes the first line point to the second + 'Log("line2") + Loop + line1xvalues.add(pmin.x)'final point to both line lists + line1yvalues.add(pmin.y) + line2xvalues.add(pmin.x) + line2yvalues.add(pmin.y) + Dim ytemp As Int + 'bitmap1.InitializeMutable(40dip,40dip) + 'canvas1.Initialize2(bitmap1) + ytemp=pmax.y 'could choose to save both x and y values to line1xvalues rather than just x. + For i=0 To Min(line1xvalues.Size,line2xvalues.Size)-1 + bmcGraph.DrawLine(line1xvalues.Get(i),ytemp,line2xvalues.get(i),ytemp,boomcolor(k),1) + ytemp=ytemp-1 +' Log(line1xvalues.size) +' Log(xposnew) +' Log(yposnew) +' Log(heading) +' Log(point1) +' Log(point2) +' Log(point4) +' Log(point3) + + ' bitmap2.Initializemutable(1000dip,1000dip) + ' bitmap2=bitmap1.Resize(1000,1000,False) + 'Label1.SetBackgroundImage(bitmap1) + ' ImageView1.Color=(Colors.White) + ' ImageView1.Bitmap = bitmap2 + Next + + + 'End If +' timer=DateTime.Now-timer +' Log("timer") +' Log(timer) +' bitmap2.Initializemutable(1000dip,1000dip) +' bitmap2=bitmap1.Resize(1000,1000,False) + 'Label1.SetBackgroundImage(bitmap1) +' ImageView1.Color=(Colors.White) +' ImageView1.Bitmap = bitmap2 +' Log($"line1size ${line1yvalues.size}"$) +' Log($"line2size ${line2yvalues.size}"$) + Return 2 +End Sub + +Sub calcline (tx1 As Int,ty1 As Int,tx2 As Int, ty2 As Int, linenumber As List, lineynumber As List) As ResumableSub + 'initialy a duplicate of bresenham + Dim x As Int = tx1 + Dim y As Int = ty1 + + Dim dx As Int = Abs(tx2 - tx1) + Dim dy As Int = Abs(ty2 - ty1) + + Dim signx As Int = (tx2-tx1)/dx + Dim signy As Int = (ty2-ty1)/dy + + Dim changed As Boolean = False + + + If (dy>=dx) Then + Dim dy As Int = Abs(tx2 - tx1) 'swap + Dim dx As Int = Abs(ty2 - ty1) + changed = True + +' Log(changed) + Else +' Log(changed) + + + End If + + + + Dim e As Float = (2*dy)-dx + For i=1 To dx + 'canvas1.DrawPoint((x),(y),Colors.Black) + If lineynumber.Get(lineynumber.size-1)<>y Then + linenumber.add(x) + lineynumber.add(y) + End If + Do While e>=0 + If changed=True Then + ' If signx<0 Then + x=x+signx + 'Else + ' x=x+1 + 'End If + Else + ' If signy<0 Then + y=y+signy + ' Else + ' y=y+1 + ' End If + End If + e=e-2*dx + Loop + If changed=True Then + y =y+signy + Else + x =x+signx + End If + e=e+(2*dy) + + Next +' canvas1.DrawPoint(x2,y2,Colors.Black) +' linenumber.Add(tx2) +' lineynumber.add(ty2) + Return Null + +End Sub + +Sub location_center 'to convert lat and long into 0.5m bitmap location + 'get current location + + Private distance As Float + Private radius As Float + Private H1 As Float 'long + Private O1 As Float 'lat + Private H2 As Float 'long + Private O2 As Float 'lat + Dim location6 As Location + + location6.Initialize +' location6.Latitude=(-32.6661) +' location6.Longitude=(118.1861) + Dim location7 As Location + location7.Initialize +' location7.Latitude=(-32.666) +' location7.Longitude=(118.1861) +origin.Initialize +radius =6372300 + origin.lat =Starter.location2.Latitude +' Log("lat"&Starter.location2.Latitude) + origin.lng =Starter.location2.Longitude +' Log("long"&Starter.location2.Longitude) + H1=(origin.lng)/360*2*cPI + H2=(origin.lng+.01)/360*2*cPI + 'Log(origin.lat) + O1=(origin.lat)/360*2*cPI + O2=(origin.lat+.01)/360*2*cPI + 'Dim disttohouse As Float + location6.Latitude=O1 + location6.Longitude=H1 + location7.Latitude=O1 + location7.Longitude=H2 + deltalat=-2*radius*ASin(Power(Power(Sin((O2-O1)/2),2)+Cos(O1)*Cos(O2)*Power(Sin((0)/2),2),.5))/.01*2'111000 + deltalong=2*radius*ASin(Power(Cos(O1)*Cos(O1)*Power(Sin((H2-H1)/2),2),.5))/.01*2'fudge'94000 + + 'therefore 1 change in longitude equals deltalong in m + 'and 1 change in latitude equals deltalat in m +'Log("det "&deltalat) +' Log("del "&deltalong) +' Log("location6 "&(location6.DistanceTo(location7)/.01)) +' Log("house"&disttohouse) +' deltalat=-2*radius*ASin(Power(Power(Sin((O2-O1)/2),2)+Cos(O1)*Cos(O2)*Power(Sin((H1-H1)/2),2),.5))'111000 + +End Sub + +Sub Activity_Resume + If Starter.GPS1.GPSEnabled = False Then + ToastMessageShow("Please enable the GPS device.", True) + StartActivity(Starter.GPS1.LocationSettingsIntent) 'Will open the relevant settings screen. + Else + Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION) + Wait For Activity_PermissionResult (Permission As String, Result As Boolean) + If Result Then CallSubDelayed(Starter, "StartGPS") + End If +End Sub + +Sub Activity_Pause (UserClosed As Boolean) + CallSubDelayed(Starter, "StopGPS") +End Sub + +Sub lineintersect (point1p As coordX, point1c As coordX,point1f As coordX, point2p As coordX, point2c As coordX,point2f As coordX,k As Int) As ResumableSub +'pointp=past: pointc=current: pointf=future + 'filler(boompoint0, boompoint00, boompoint10, boompoint1,0)) + '// + 'line1:y1=g1x1+h2 + 'line2:y2=g2x2+h2 + + Dim U As Float + Dim V As Float + Dim denominat As Float + Dim intersectpoint As coordX + intersectpoint.Initialize + + + denominat=(point2c.x-point1c.x)*(point2f.y-point1f.y)-(point2c.y-point1c.y)*(point2f.x-point1f.x) + If denominat=0 Then + 'lines are parrallel, do rectangle find + rectanglefiller(point1c,point1p,point2p,point2c,k) + rectanglechecker(point1f,point1c,point2c,point2f,k) + Return + End If + + U=((point1c.y-point1f.y)*(point2f.x-point1f.x)-(point2f.y-point1f.y)*(point1c.x-point1f.x))/denominat + v=((point1c.y-point1f.y)*(point2c.x-point1c.x)-(point2c.y-point1c.y)*(point1c.x-point1f.x))/denominat + If (U>0 And U<1 And v<1 And v>0) Then + 'lines intersect, therefore need to calculate areas inside two triangles rather than one rectangle + intersectpoint.x=point1c.x+(point2c.x-point1c.x)*U + intersectpoint.y=point1c.y+(point2c.y-point1c.x)*V + trianglefiller(point1c,point1p,intersectpoint,k) + trianglefiller(point2c,point2p,intersectpoint,k) + '!!need the case to be that if either of the following checkers return a "gap" then section needs to be on + boomcolor(k)=Colors.yellow + wait for (trianglechecker(point1f,point1p,intersectpoint,k)) complete + If boomcolor(k)=Colors.Yellow Then + wait for (trianglechecker(point2f,point2p,intersectpoint,k)) complete + End If + Return + Else + 'lines are not parrellel, but dont intersect + wait for (rectanglefiller(point1c,point1p,point2p,point2c,k)) complete + wait for (rectanglechecker(point1f,point1c,point2c,point2f,k)) complete + Return + End If +End Sub + +Sub trianglefiller(point1 As coordX, point2 As coordX, point3 As coordX,k As Int)As ResumableSub + 'find pmax, find pmin + 'construct line clockwise from pmax to pmin + 'construct line anticlockwise from pmax to pmin + 'pull list of x values and draw canvas line between all + Dim timer As Long + timer=DateTime.Now + + Dim line1xvalues As List + Dim line2xvalues As List + Dim line1yvalues As List + Dim line2yvalues As List + Dim CWmap As Map + Dim ACWmap As Map + + ACWmap.Initialize 'used to progress clockwise and anticlockwise around rectangle + ACWmap.Put(point1,point2) + ACWmap.Put(point2,point3) + ACWmap.Put(point3,point1) + + + CWmap.Initialize + CWmap.Put(point1,point3) + CWmap.Put(point2,point1) + CWmap.Put(point3,point2) + line1xvalues.Initialize + line2xvalues.Initialize + line1yvalues.initialize + line2yvalues.Initialize + + + Dim pmax As coordX + Dim pmin As coordX + Dim temp As coordX + Dim Pmap As Map 'lets us grab the maxY and minY after finding the min and max value + Pmap.Initialize + Pmap.Put(point1.y,point1) + Pmap.Put(point2.y,point2) + Pmap.Put(point3.y,point3) + + pmax.Initialize + pmin.Initialize + Dim temp3 As Float + temp3 = Max(point1.y,Max(point2.y,point3.y)) + Dim temp4 As Float + temp4 = Min(point1.y,Min(point2.y,point3.y)) + pmax=Pmap.Get(temp3) 'temp variable required, otherwise pmax is null + pmin=Pmap.Get(temp4) + Dim temp2 As coordX + temp = pmax + line1xvalues.add(pmax.x)'initial point to both line lists + line1yvalues.add(pmax.y) + line2xvalues.add(pmax.x) + line2yvalues.add(pmax.y) + + Do While temp <> pmin 'cwloop + temp2=CWmap.Get(temp)'gets second point for line + Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y,line1xvalues,line1yvalues)) complete 'line2xvalues generated + temp = CWmap.Get(temp) 'changes the first line point to the second + 'Log("line1") + Loop + temp = pmax + + + + Do While temp <> pmin 'acwloop + temp2=ACWmap.Get(temp)'gets second point for line + wait for (calcline(temp.x,temp.y, temp2.x,temp2.y,line2xvalues,line2yvalues)) complete 'line2xvalues generated + temp = ACWmap.Get(temp) 'changes the first line point to the second + 'Log("line2") + Loop + line1xvalues.add(pmin.x)'final point to both line lists + line1yvalues.add(pmin.y) + line2xvalues.add(pmin.x) + line2yvalues.add(pmin.y) + Dim ytemp As Int + ytemp=pmax.y 'could choose to save both x and y values to line1xvalues rather than just x. + For i=0 To Min(line1xvalues.Size,line2xvalues.Size)-1 + bmcGraph.DrawLine(line1xvalues.Get(i),ytemp,line2xvalues.get(i),ytemp,boomcolor(k),1) + ytemp=ytemp-1 + + Next + + Return 2 +End Sub + + +Sub trianglechecker(point1 As coordX, point2 As coordX, point3 As coordX, k As Int)As ResumableSub + Dim ACWmap As Map + Dim CWmap As Map + Dim line1xvalues As List + Dim line2xvalues As List + Dim line2yvalues As List + Dim line1yvalues As List + + + ACWmap.Initialize 'used to progress clockwise and anticlockwise around rectangle + ACWmap.Put(point1,point2) + ACWmap.Put(point2,point3) + ACWmap.Put(point3,point1) + + + CWmap.Initialize + CWmap.Put(point1,point3) + CWmap.Put(point2,point1) + CWmap.Put(point3,point2) + + line1xvalues.Initialize + line2xvalues.Initialize + line1yvalues.initialize + line2yvalues.Initialize + + + Dim pmax As coordX + Dim pmin As coordX + Dim temp As coordX + Dim Pmap As Map 'lets us grab the maxY and minY after finding the min and max value + Pmap.Initialize + Pmap.Put(point1.y,point1) + Pmap.Put(point2.y,point2) + Pmap.Put(point3.y,point3) + + pmax.Initialize + pmin.Initialize + + Dim temp3 As Float + temp3 = Max(point1.y,Max(point2.y,point3.y)) + Dim temp4 As Float + temp4 = Min(point1.y,Min(point2.y,point3.y)) + pmax=Pmap.Get(temp3) 'temp variable required, otherwise pmax is null + pmin=Pmap.Get(temp4) + Dim temp2 As coordX + temp = pmax + line1xvalues.add(pmax.x)'initial point to both line lists + line1yvalues.add(pmax.y) + line2xvalues.add(pmax.x) + line2yvalues.add(pmax.y) + + Do While temp <> pmin 'cwloop + temp2=CWmap.Get(temp)'gets second point for line + Wait For(calcline(temp.x,temp.y, temp2.x,temp2.y,line1xvalues,line1yvalues)) complete 'line2xvalues generated + temp = CWmap.Get(temp) 'changes the first line point to the second + Loop + temp = pmax + + + + Do While temp <> pmin 'acwloop + temp2=ACWmap.Get(temp)'gets second point for line + wait for (calcline(temp.x,temp.y, temp2.x,temp2.y,line2xvalues,line2yvalues)) complete 'line2xvalues generated + temp = ACWmap.Get(temp) 'changes the first line point to the second + Loop + line1xvalues.add(pmin.x)'adds final point to both line lists + line1yvalues.add(pmin.y) + line2xvalues.add(pmin.x) + line2yvalues.add(pmin.y) + Dim ytemp As Int + Dim pixelchecked As Int + pixelchecked=0 + + + ytemp=pmax.y 'could choose to save both x and y values to line1xvalues rather than just x. + For i=0 To (Min(line1xvalues.Size,line2xvalues.Size)-1) 'iterates from top point to bottom of polygone, drawing a level line from left to right + For j=line2xvalues.Get(i) To line1xvalues.Get(i) Step 1'issue solved, was counting from a higher number to a lower number rather than lower to higher + pixelchecked=pixelchecked+1 + If bmcGraph.GetColor(j,ytemp)=-1 Then + boomon=True + boomcolor(k)=xui.Color_Green + Return boomcolor(k) + + End If + Next + ytemp=ytemp-1 + Next + boomcolor(k)=xui.Color_yellow + boomon=False + Log("boomon"&boomon) + Return boomcolor(k) +End Sub \ No newline at end of file diff --git a/migrationbitmapb4a/jacksbitmapdrawerb4amigration.b4a.meta b/migrationbitmapb4a/jacksbitmapdrawerb4amigration.b4a.meta new file mode 100644 index 0000000..5255ac6 --- /dev/null +++ b/migrationbitmapb4a/jacksbitmapdrawerb4amigration.b4a.meta @@ -0,0 +1,12 @@ +ModuleBookmarks0= +ModuleBookmarks1= +ModuleBookmarks2= +ModuleBreakpoints0= +ModuleBreakpoints1= +ModuleBreakpoints2= +ModuleClosedNodes0=2,3,4,5,7,8,9,10,11,12,13,14,15,16,20,21,23,24 +ModuleClosedNodes1= +ModuleClosedNodes2= +NavigationStack=Main,trianglechecker,1031,0,Visual Designer,bitmapdrawer.bal,-100,1,Main,location_center,898,1,Main,activity_create,204,0,Main,calcline,828,0,Starter,Process_Globals,11,0,Starter,Service_Create,19,0,Main,Globals,28,0,Main,LocationChanged,337,6,Main,lineintersect,948,6 +SelectedBuild=0 +VisibleModules=2,1 diff --git a/migrationbitmapb4a/sideextra.bas b/migrationbitmapb4a/sideextra.bas new file mode 100644 index 0000000..33f9e9a --- /dev/null +++ b/migrationbitmapb4a/sideextra.bas @@ -0,0 +1,36 @@ +B4A=true +Group=Default Group +ModulesStructureVersion=1 +Type=Activity +Version=9.9 +@EndOfDesignText@ +#Region Activity Attributes + #FullScreen: False + #IncludeTitle: True +#End Region + +Sub Process_Globals + 'These global variables will be declared once when the application starts. + 'These variables can be accessed from all modules. + +End Sub + +Sub Globals + 'These global variables will be redeclared each time the activity is created. + 'These variables can only be accessed from this module. + +End Sub + +Sub Activity_Create(FirstTime As Boolean) + 'Do not forget to load the layout file created with the visual designer. For example: + 'Activity.LoadLayout("Layout1") + +End Sub + +Sub Activity_Resume + +End Sub + +Sub Activity_Pause (UserClosed As Boolean) + +End Sub