updtaes from j3270
This commit is contained in:
@@ -257,10 +257,11 @@ fun TerminalView(
|
||||
val gridW = metrics.gridWidth.toInt()
|
||||
val gridH = metrics.gridHeight.toInt()
|
||||
if (gridW > 0 && gridH > 0) {
|
||||
graphicsPlane.resize(gridW, gridH)
|
||||
val gWidth = graphicsPlane.canvasWidth
|
||||
val gHeight = graphicsPlane.canvasHeight
|
||||
val rgb = graphicsPlane.rgbBuffer
|
||||
if (rgb != null) {
|
||||
val bmp = android.graphics.Bitmap.createBitmap(rgb, gridW, gridH, android.graphics.Bitmap.Config.ARGB_8888)
|
||||
if (rgb != null && gWidth > 0 && gHeight > 0) {
|
||||
val bmp = android.graphics.Bitmap.createBitmap(rgb, gWidth, gHeight, android.graphics.Bitmap.Config.ARGB_8888)
|
||||
drawContext.canvas.nativeCanvas.drawBitmap(
|
||||
bmp,
|
||||
null,
|
||||
@@ -728,7 +729,7 @@ private fun copySelection(
|
||||
}
|
||||
}
|
||||
|
||||
private fun getFgColorForAttribute(ea: ExtendedAttribute, currentFieldEa: ExtendedAttribute?, currentFA: Byte): Color {
|
||||
internal fun getFgColorForAttribute(ea: ExtendedAttribute, currentFieldEa: ExtendedAttribute?, currentFA: Byte): Color {
|
||||
val fg = if (ea.fg != 0.toByte()) (ea.fg.toInt() and 0xFF)
|
||||
else if (currentFieldEa != null && currentFieldEa.fg != 0.toByte()) (currentFieldEa.fg.toInt() and 0xFF)
|
||||
else 0
|
||||
|
||||
Reference in New Issue
Block a user