• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            Cpper
            C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿
            import QtQuick 2.9

            Item
            {
                visible: 
            true
                width: 
            1620
                height: 
            720
                id:background

                Image
                {
                    source: 
            "images/2560.png"
                    anchors.fill: parent
                }

                Flickable
                {
                    id: flick
                    anchors.top: parent.top;
                    anchors.left: parent.left
                    anchors.right: parent.right
                    anchors.bottom: parent.bottom
                    anchors.margins: 
            3
                    contentWidth: 
            0
                    contentHeight: 
            0
                    clip: 
            true

                    Image
                    {
                        id: image
                        smooth: 
            true
                        transformOrigin: Item.Center
                        source:
            "mark.png"

                        onStatusChanged:
                        {
                            
            if(status === Image.Ready)
                            {
                                image.width 
            *= 0.5
                                image.height 
            *= 0.5

                                image.x 
            = background.width*0.5-0.5*image.width
                                image.y 
            = background.height*0.5-0.5*image.height

                                
            /*mouseArea.drag.minimumX = 0
                                mouseArea.drag.maximumX = flick.width - image.width
                                mouseArea.drag.minimumY = 0
                                mouseArea.drag.maximumY = flick.height - image.height
            */
                            }
                        }
                    }
                }

                
            function makeImageCenter(imageWidth,imageHeight)
                {
                    
            var cx = image.x + 0.5*image.width
                    
            var cy = image.y + 0.5*image.height

                    image.width 
            = imageWidth
                    image.height 
            = imageHeight

                    image.x 
            = cx - image.width*0.5
                    image.y 
            = cy - image.height*0.5
                }

                MouseArea
                {
                    id: mouseArea
                    anchors.fill: flick
                    drag.target: image

                    onWheel:
                    {
                        
            var diff_w = 0.0
                        
            var diff_h = 0.0

                        
            if(wheel.angleDelta.y > 0)
                        {
                            diff_w 
            = image.width * 0.02
                            diff_h 
            = image.height * 0.02
                        }
                        
            else if(wheel.angleDelta.y < 0)
                        {
                            diff_w 
            = -image.width * 0.02
                            diff_h 
            = -image.height * 0.02
                        }
                        
            else
                        {
                            image.width 
            = width
                            image.height 
            = height
                        }

                        
            if(wheel.angleDelta.y != 0)
                            background.makeImageCenter(image.width
            +diff_w,image.height+diff_h)

                        drag.minimumX 
            = 0
                        drag.maximumX 
            = flick.width - image.width
                        drag.minimumY 
            = 0
                        drag.maximumY 
            = flick.height - image.height
                    }
                }
            }
            posted on 2019-08-20 13:53 ccsdu2009 閱讀(1537) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            东方aⅴ免费观看久久av| 香港aa三级久久三级老师2021国产三级精品三级在 | 亚洲国产成人久久笫一页| 一级做a爰片久久毛片看看| 亚洲国产视频久久| 精品久久久久久| 久久久综合香蕉尹人综合网| 色妞色综合久久夜夜| 久久亚洲高清观看| 国产精品乱码久久久久久软件| 亚洲精品无码专区久久同性男| 丁香色欲久久久久久综合网| 7777久久亚洲中文字幕| 中文字幕乱码人妻无码久久| 69久久夜色精品国产69| 国产精品久久久久久久app| 久久99精品国产一区二区三区| 亚洲午夜福利精品久久| 热re99久久精品国产99热| 麻豆精品久久久久久久99蜜桃| 91亚洲国产成人久久精品| 久久永久免费人妻精品下载| 精品久久人人妻人人做精品| 色欲久久久天天天综合网| 一本色道久久综合狠狠躁篇| 国产精品久久久天天影视| 亚洲精品无码成人片久久| 怡红院日本一道日本久久 | 97久久久精品综合88久久| 欧美亚洲另类久久综合婷婷| www.久久热.com| 久久久国产乱子伦精品作者| 亚洲伊人久久精品影院| 久久青青国产| 久久伊人精品青青草原日本| 久久精品亚洲男人的天堂| 午夜视频久久久久一区| 久久这里只有精品首页| 精品久久久噜噜噜久久久| 国产一区二区精品久久岳| 久久精品一区二区|