• <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 閱讀(1520) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            久久99精品久久久久久水蜜桃| 日韩AV毛片精品久久久| 国产精品久久久久久久久| 99久久免费只有精品国产| 久久国产影院| 精品久久久噜噜噜久久久| 精品国产婷婷久久久| 青青草原综合久久大伊人| 久久综合狠狠综合久久激情 | 久久国产AVJUST麻豆| 久久国产精品一区二区| 久久伊人五月丁香狠狠色| AA级片免费看视频久久| 久久人人爽人人爽人人片AV不| 久久精品国产黑森林| 精品久久777| 亚洲精品无码久久久久久| 亚洲а∨天堂久久精品9966| 精品精品国产自在久久高清| 一本久久知道综合久久| 伊人色综合九久久天天蜜桃| 久久播电影网| 亚洲精品高清久久| 久久99国产精品尤物| 一本色道久久HEZYO无码| 亚洲乱码日产精品a级毛片久久 | 欧美一级久久久久久久大片| 丁香五月网久久综合| 久久www免费人成看片| 亚洲精品国产第一综合99久久| 精品久久久久久无码国产| AAA级久久久精品无码片| 久久人妻少妇嫩草AV无码专区| 欧美日韩精品久久久久| 精品国产日韩久久亚洲| 久久亚洲日韩看片无码| 久久精品aⅴ无码中文字字幕不卡| 国产精品久久婷婷六月丁香| 一本大道久久香蕉成人网| 久久精品极品盛宴观看| 中文精品久久久久人妻不卡|