• <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++高級(jí)工程師 Android高級(jí)軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語(yǔ)言 程序猿
            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) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): QT編程
             
            久久综合亚洲鲁鲁五月天| 国产成人精品久久二区二区| 国内精品久久久久久久久| 久久人人爽人爽人人爽av| 久久久久久九九99精品| 青草影院天堂男人久久| 久久99久国产麻精品66| 久久99精品久久久久久水蜜桃| 国内精品久久久久久不卡影院 | 国产精品福利一区二区久久| 久久伊人精品青青草原高清| 少妇被又大又粗又爽毛片久久黑人 | 97久久国产亚洲精品超碰热 | 污污内射久久一区二区欧美日韩 | 亚洲精品国精品久久99热一| 久久强奷乱码老熟女网站| 色欲久久久天天天综合网精品| 99久久国产亚洲高清观看2024| 久久99精品综合国产首页| 久久国产精品99精品国产987| 性做久久久久久久久浪潮| 欧洲性大片xxxxx久久久| 久久99国产综合精品| 午夜不卡久久精品无码免费| 国产亚洲色婷婷久久99精品91| 久久青青草原亚洲av无码app| 伊人久久一区二区三区无码| 中文字幕亚洲综合久久菠萝蜜| 91性高湖久久久久| 久久夜色精品国产亚洲| 国产成人久久精品区一区二区| 久久亚洲AV成人无码软件| 欧美麻豆久久久久久中文| 久久国产免费| 亚洲中文字幕无码久久精品1| 精品久久人妻av中文字幕| 国内高清久久久久久| 亚洲精品无码久久久久sm| 大香伊人久久精品一区二区 | 久久久WWW成人免费精品| 久久播电影网|