         if(self.imgView == nil){
             return
         }
-        self.imgView.image = buildImage(imgWidth: 1024, imgHeight: 768)
+        self.imgView.image = buildImage(imgWidth: Int(self.nativeUiWidth), imgHeight: Int(self.nativeUiHeight))
         self.imgView.setNeedsDisplay()
     }
     

            return
        }
        
        if let touch = touches.first{
            let pos = touch.location(in: self.imgView)
            
            mouse_down(Int32(pos.x), Int32(pos.y))
        }
    }

    func buildImage(imgWidth: Int, imgHeight: Int) -> UIImage?{
        let pixData = getPixels(imgWidth: imgWidth, imgHeight: imgHeight)
        if(pixData == nil){

    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        let pos = touchPosToNative(touches: touches)
        mouse_down((pos[0]), (pos[1]))
        self.isMouseDown = true
    }
    
    override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
        let pos = touchPosToNative(touches: touches)
        mouse_up((pos[0]), (pos[1]))
        self.isMouseDown = false
    }
    
    override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
