2 Комити c1fbc534cf ... 774afec081

Аутор SHA1 Порука Датум
  zhangweixin 774afec081 *********************************** wx ********************************* пре 3 година
  zhangweixin 3cc955fa47 *********************************** wx ********************************* пре 3 година
66 измењених фајлова са 42 додато и 18 уклоњено
  1. 2 0
      app/src/main/java/cn/sagacloud/cadengine/GzipUtil.java
  2. 10 7
      app/src/main/java/cn/sagacloud/cadengine/MainActivity.kt
  3. 2 1
      app/src/main/res/values/styles.xml
  4. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/build-history.bin
  5. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab
  6. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream
  7. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len
  8. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len
  9. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at
  10. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i
  11. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab
  12. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream
  13. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len
  14. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len
  15. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at
  16. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i
  17. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab
  18. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream
  19. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len
  20. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len
  21. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at
  22. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i
  23. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab
  24. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream
  25. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len
  26. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len
  27. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at
  28. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i
  29. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab
  30. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream
  31. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len
  32. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len
  33. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at
  34. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i
  35. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab
  36. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at
  37. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab
  38. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at
  39. 2 2
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab
  40. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab
  41. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream
  42. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len
  43. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len
  44. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at
  45. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i
  46. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab
  47. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream
  48. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len
  49. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len
  50. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at
  51. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i
  52. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab
  53. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream
  54. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len
  55. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len
  56. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values
  57. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at
  58. 1 1
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.s
  59. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i
  60. BIN
      sybotan-android-graphy/build/kotlin/compileDebugKotlin/last-build.bin
  61. BIN
      sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/SGraphyItem.class
  62. BIN
      sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/SGraphyScene.class
  63. BIN
      sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/SGraphyView.class
  64. BIN
      sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/utils/MatrixTools.class
  65. 1 1
      sybotan-android-graphy/src/main/java/com/sybotan/android/graphy/SGraphyScene.kt
  66. 24 6
      sybotan-android-graphy/src/main/java/com/sybotan/android/graphy/SGraphyView.kt

+ 2 - 0
app/src/main/java/cn/sagacloud/cadengine/GzipUtil.java

@@ -155,6 +155,8 @@ public class GzipUtil {
         {
             return "";
         }
+
+
     }
 }
 

+ 10 - 7
app/src/main/java/cn/sagacloud/cadengine/MainActivity.kt

@@ -19,7 +19,7 @@ import org.jetbrains.anko.uiThread
 
 class MainActivity : AppCompatActivity() {
     val scene = FloorScene()
-    val path = "Fl42010500018b580334dcf111e8a553db1eadfac99320190803114958bim.jsonz"
+    val path = "base/0d5b6dd89b7011eb88b7b12cd4310b6f.jsonz"
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
@@ -38,9 +38,8 @@ class MainActivity : AppCompatActivity() {
             val graphyFmItem = GraphyFmItem()
             graphyFmItem.show()
             graphyFmItem.isVisible = true
-
             graphyFmItem.moveTo(300f,300f)
-            graphyFmItem.rotate = 60f // (20f*Math.PI / 180f) as Float
+//            graphyFmItem.rotate = 60f // (20f*Math.PI / 180f) as Float
             graphyFmItem.isTransform = false
             scene.addItem(graphyFmItem)
             val graphyTwoItem = GraphyTwoItem()
@@ -52,18 +51,22 @@ class MainActivity : AppCompatActivity() {
 //            graphyTwoItem.flag = true
 //            graphyTwoItem.parent = graphyFmItem
             graphyTwoItem.moveTo(100f,100f)
-//            graphyTwoItem.color = Color.RED
+            graphyTwoItem.color = Color.RED
 
 
-//            scene.addItem(graphyTwoItem)
+            scene.addItem(graphyTwoItem)
             /** 主线程处理ui */
             uiThread {
 
 
                 /** 适应屏幕大小 */
-//                graphyView.fitSceneToView()
-//                /** 限定移动范围不超出屏幕 */
+                graphyView.fitSceneToView()
+                /** 限定移动范围不超出屏幕 */
 //                graphyView.moveRange()
+                graphyView.post {
+                    Log.e("viewW",graphyView.width.toString())
+                }
+                Log.e("viewH",graphyView.measuredHeight.toString())
             }
         }
     } // Function onCreate()

+ 2 - 1
app/src/main/res/values/styles.xml

@@ -1,7 +1,7 @@
 <resources>
 
     <!-- Base application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
         <!-- Customize your theme here. -->
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@@ -9,3 +9,4 @@
     </style>
 
 </resources>
+

BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/build-history.bin


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at


+ 2 - 2
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab

@@ -1,2 +1,2 @@
-41
-24
+94
+77

BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at


+ 1 - 1
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.s

@@ -1 +1 @@
-Ь“ЮNЩCо>А7И@БKщ7э8Г0и)ц>з:Ф$
+А—ВNщ@И4Ф1ж2о,С+у*С(Ъ)О'Ь#у-ВCб1И'о"Х"ш"Ш$а)ы'Ь!МЩт$кя щ(м%щНь?А г"ЖЩЯеДлЭифтмРПНпМрдЖшгкРЪфГюуншо К!рДюЛТЩФКхЧУфМеиоЮв 

BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i


BIN
sybotan-android-graphy/build/kotlin/compileDebugKotlin/last-build.bin


BIN
sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/SGraphyItem.class


BIN
sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/SGraphyScene.class


BIN
sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/SGraphyView.class


BIN
sybotan-android-graphy/build/tmp/kotlin-classes/debug/com/sybotan/android/graphy/utils/MatrixTools.class


+ 1 - 1
sybotan-android-graphy/src/main/java/com/sybotan/android/graphy/SGraphyScene.kt

@@ -186,7 +186,7 @@ open class SGraphyScene {
     fun worldRect(): RectF {
         val rect = RectF()
 
-        for (item in rootNode.children) {        // 依次取item列中的所有item。将所有item的边界做并处理。
+        for (item in rootNode.children) {        // 依次取item列中的所有item。将所有item的边界做并处理。
             rect.union(item.boundingRect().adjusted(item.pos))
         }
 

+ 24 - 6
sybotan-android-graphy/src/main/java/com/sybotan/android/graphy/SGraphyView.kt

@@ -28,7 +28,6 @@ import android.graphics.*
 import android.util.AttributeSet
 import android.util.Log
 import android.view.*
-import android.view.MotionEvent
 import com.sybotan.android.graphy.enums.SGraphyViewTouchState
 import com.sybotan.android.graphy.events.SGraphyViewMoveEvent
 import com.sybotan.android.graphy.events.SGraphyViewZoomEvent
@@ -125,6 +124,12 @@ open class SGraphyView(context: Context, attrs: AttributeSet? = null)
         initView()
     } // init
 
+    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
+        Log.e("w",widthMeasureSpec.toString())
+        Log.e("h",heightMeasureSpec.toString())
+    }
+
     /**
      * 适配视图到视图
      */
@@ -133,12 +138,25 @@ open class SGraphyView(context: Context, attrs: AttributeSet? = null)
         if (null == scene) {
             return
         }
+//        val w = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)
+//        val h = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)
+//        this.measure(width, height)
+//        val h: Int = this.getMeasuredHeight()
+//        val w: Int = this.getMeasuredWidth()
+
+        this.post {
+            val w = width.toFloat()
+            val h = height.toFloat()
+
+            val rect = scene!!.worldRect()
+            setCenterPoint( PointF(rect.centerX(), rect.centerY()),
+                    min(w / rect.width(), h / rect.height()) * fitrate)
+//            Log.e("w",w.toString())
+//            Log.e("h",h.toString())
+//            Log.e("rect1",rect.toJson())
+//            Log.e("min",(min(w / rect.width(), h / rect.height())).toJson())
+        }
 
-        val w = width.toFloat()
-        val h = height.toFloat()
-        val rect = scene!!.worldRect()
-        setCenterPoint( PointF(rect.centerX(), rect.centerY()),
-                min(w / rect.width(), h / rect.height()) * fitrate)
     } // Function FitView()
 
     /**