comparison src/name/blackcap/imageprep/RotateDialog.kt @ 13:3feeb953d9ae

val -> var
author David Barts <n5jrn@me.com>
date Sat, 18 Jul 2020 14:23:02 -0700
parents 26a507e095ab
children 2bb46da74667
comparison
equal deleted inserted replaced
12:26a507e095ab 13:3feeb953d9ae
43 } 43 }
44 } 44 }
45 private val drawingPane = DrawingPane(initialImage) 45 private val drawingPane = DrawingPane(initialImage)
46 46
47 private class ImageWaiter: ImageObserver { 47 private class ImageWaiter: ImageObserver {
48 private var sem = Semaphore(0) 48 private val MASK = ImageObserver.ALLBITS or ImageObserver.ERROR or ImageObserver.ABORT
49 private val sem = Semaphore(0)
49 @Volatile private var flags: Int? = null 50 @Volatile private var flags: Int? = null
50 private var MASK = ImageObserver.ALLBITS or ImageObserver.ERROR or ImageObserver.ABORT
51 51
52 override fun imageUpdate(img: Image, infoflags: Int, x: Int, y: Int, width: Int, height: Int): Boolean { 52 override fun imageUpdate(img: Image, infoflags: Int, x: Int, y: Int, width: Int, height: Int): Boolean {
53 if (infoflags and MASK != 0) { 53 if ((infoflags and MASK) != 0) {
54 flags = infoflags 54 flags = infoflags
55 sem.release() 55 sem.release()
56 return false 56 return false
57 } 57 }
58 return true 58 return true