Mercurial > dwindows
comparison android/DWindows.kt @ 2536:d172ab2eddb6
Android: Implement DW_DRAW_FULL flag for dw_draw_arc().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 11 May 2021 22:19:28 +0000 |
parents | d862d9e4069b |
children | cd9d2ba251d5 |
comparison
equal
deleted
inserted
replaced
2535:d862d9e4069b | 2536:d172ab2eddb6 |
---|---|
2043 if((flags and 1) == 1) { | 2043 if((flags and 1) == 1) { |
2044 paint.style = Paint.Style.FILL_AND_STROKE | 2044 paint.style = Paint.Style.FILL_AND_STROKE |
2045 } else { | 2045 } else { |
2046 paint.style = Paint.Style.STROKE | 2046 paint.style = Paint.Style.STROKE |
2047 } | 2047 } |
2048 canvas.drawArc(rect, a1.toFloat(), sweep.toFloat(), false, paint) | 2048 // Handle the DW_DRAW_FULL flag |
2049 if((flags and (1 shl 1)) != 0) { | |
2050 canvas.drawOval(rect, paint) | |
2051 } else { | |
2052 canvas.drawArc(rect, a1.toFloat(), sweep.toFloat(), false, paint) | |
2053 } | |
2049 } | 2054 } |
2050 } | 2055 } |
2051 } | 2056 } |
2052 | 2057 |
2053 fun colorSet(alpha: Int, red: Int, green: Int, blue: Int) | 2058 fun colorSet(alpha: Int, red: Int, green: Int, blue: Int) |