Animal 4 年之前
父节点
当前提交
d75a155ae9
共有 1 个文件被更改,包括 19 次插入19 次删除
  1. 19 19
      main.qml

+ 19 - 19
main.qml

@@ -40,7 +40,7 @@ Window {
             id: moveAnimation
             running: true
             loops: Animation.Infinite
-            PropertyAnimation{target: rect; property: "x"; from: 10; to: source.width - rect.width - 10; duration: 1500; easing.type: Easing.OutCirc}
+            PropertyAnimation{target: rect; property: "x"; from: 10; to: source.width - rect.width - 10; duration: 1000}
             PropertyAnimation{target: rect; property: "y"; from: 10; to: source.height - rect.height - 10; duration: 1000/*; easing.type: Easing.OutCirc*/}
             PropertyAnimation{target: rect; property: "x"; from: source.width - rect.width - 10; to: 10; duration: 1000/*; easing.type: Easing.OutCirc*/}
             PropertyAnimation{target: rect; property: "y"; from: source.height - rect.height - 10; to: 0; duration: 1000/*; easing.type: Easing.OutCirc*/}
@@ -116,23 +116,23 @@ Window {
 //            }
 //        }
 
-    }
-
-    ShaderEffectSource{
-        id: sourceShader
-        visible: false // Do not render it (will only be rendered when called grapToImage()
-        sourceItem: source
-        width: source.width
-        height: source.height
-        live: false // Will only be updated, when explicitly called for
-
-        function save() {
-            scheduleUpdate() // explicitly update. grabToImage() will force rendering afterwards.
-            sourceShader.grabToImage(function(result) {
-                            d.images.push(result)
-                        })
-        }
-    }
+    }   // source item
+
+//    ShaderEffectSource{
+//        id: sourceShader
+//        visible: false // Do not render it (will only be rendered when called grapToImage()
+//        sourceItem: source
+//        width: source.width
+//        height: source.height
+//        live: false // Will only be updated, when explicitly called for
+
+//        function save() {
+//            scheduleUpdate() // explicitly update. grabToImage() will force rendering afterwards.
+//            sourceShader.grabToImage(function(result) {
+//                            d.images.push(result)
+//                        })
+//        }
+//    }
 
     Timer{
         id: timeToScreenShoot
@@ -142,7 +142,7 @@ Window {
         onTriggered: {
 //            sourceShader.save()
             source.grabToImage(function(result) {
-                            d.images.push(result)
+//                            d.images.push(result)
                         })
         }
     }