Upgrade to Kotlin 1.4, Gradle 6.6

This commit is contained in:
Edwin Jakobs
2020-08-18 08:30:18 +02:00
parent d7b17d6910
commit 5235d8ce19
22 changed files with 205 additions and 62 deletions

View File

@@ -70,9 +70,9 @@ fun ColorBuffer.toPlanarU8() : Planar<GrayU8> {
for (y in 0 until height) {
for (x in 0 until width) {
val c = shadow.read(x, y)
bands[0].data[offset] = (c.r * 255).toByte()
bands[1].data[offset] = (c.g * 255).toByte()
bands[2].data[offset] = (c.b * 255).toByte()
bands[0].data[offset] = (c.r * 255).toInt().toByte()
bands[1].data[offset] = (c.g * 255).toInt().toByte()
bands[2].data[offset] = (c.b * 255).toInt().toByte()
offset++
}
}

View File

@@ -0,0 +1,19 @@
package org.openrndr.boofcv.binding
import georegression.struct.affine.Affine2D_F32
import georegression.struct.affine.Affine2D_F64
import org.openrndr.math.Matrix44
fun Affine2D_F32.toMatrix44() = Matrix44(
c0r0 = a11.toDouble(), c1r0 = a12.toDouble(), c3r0 = tx.toDouble(),
c0r1 = a21.toDouble(), c1r1 = a22.toDouble(), c3r1 = ty.toDouble(),
c2r2 = 1.0,
c3r3 = 1.0
)
fun Affine2D_F64.toMatrix44() = Matrix44(
c0r0 = a11, c1r0 = a12, c3r0 = tx,
c0r1 = a21, c1r1 = a22, c3r1 = ty,
c2r2 = 1.0,
c3r3 = 1.0
)