• <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 閱讀(1549) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            久久无码高潮喷水| 亚洲一本综合久久| 九九精品99久久久香蕉| 99久久精品午夜一区二区| 久久久精品久久久久特色影视| 欧美日韩精品久久久久| 青草影院天堂男人久久| 少妇熟女久久综合网色欲| 久久精品国产精品国产精品污| 性欧美大战久久久久久久| 久久精品草草草| 日韩人妻无码精品久久免费一| 久久996热精品xxxx| 国产V亚洲V天堂无码久久久| 武侠古典久久婷婷狼人伊人| 久久久久亚洲AV无码专区体验| 色婷婷综合久久久久中文字幕| 久久综合久久久| 久久精品无码专区免费东京热| 亚洲?V乱码久久精品蜜桃| 日本久久久精品中文字幕| 99久久超碰中文字幕伊人| 亚洲国产精品无码久久久不卡| 亚洲婷婷国产精品电影人久久| 激情综合色综合久久综合| 日本精品久久久久中文字幕8| 久久国产精品无码一区二区三区 | 国产精品久久精品| 久久偷看各类wc女厕嘘嘘| 老男人久久青草av高清| 欧美久久亚洲精品| 久久只有这精品99| 欧美日韩精品久久久久 | 亚洲国产一成人久久精品| 伊人久久五月天| 99久久国产宗和精品1上映| 国内精品伊人久久久久妇| 伊人色综合久久天天人守人婷 | 18岁日韩内射颜射午夜久久成人 | 国色天香久久久久久久小说 | 一97日本道伊人久久综合影院|