realmasync
Laurent 3 years ago
parent d8d70e26ed
commit 102353db1e
  1. 6
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerAnimator.kt
  2. 7
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/TableDrawer.kt

@ -97,7 +97,7 @@ class ReplayerAnimator(var handHistory: HandHistory, var export: Boolean) {
* 2/ The last frame of the last step is longer because some video players
* auto-replay videos, and we want viewers to visualize the end.
*/
private val visualOccurences: Int
private val visualOccurrences: Int
get() {
val step = this.currentStep
return when {
@ -536,7 +536,7 @@ class ReplayerAnimator(var handHistory: HandHistory, var export: Boolean) {
val bitmap = Bitmap.createBitmap(this.width.toInt(), this.height.toInt(), Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
vo = this.visualOccurences / 90.0 // this is needed before the call to drawTable which pass to the next frame
vo = this.visualOccurrences / 90.0 // this is needed before the call to drawTable which pass to the next frame
this.drawer.drawTable(canvas, context)
@ -588,7 +588,7 @@ class ReplayerAnimator(var handHistory: HandHistory, var export: Boolean) {
// Timber.d("FRAME [$f] >> step: $currentStepIndex, frame: $currentFrameIndex, vo: ${this.visualOccurences}, type: ${this.frameType}")
val bitmap = Bitmap.createBitmap(this.width.toInt(), this.height.toInt(), Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
val vo = this.visualOccurences // this is needed before the call to drawTable which pass to the next frame
val vo = this.visualOccurrences // this is needed before the call to drawTable which pass to the next frame
this.drawer.drawTable(canvas, context)

@ -1,7 +1,10 @@
package net.pokeranalytics.android.ui.modules.handhistory.replayer
import android.content.Context
import android.graphics.*
import android.graphics.Canvas
import android.graphics.DashPathEffect
import android.graphics.Paint
import android.graphics.RectF
import androidx.core.content.res.ResourcesCompat
import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory
import net.pokeranalytics.android.R
@ -250,7 +253,7 @@ class TableDrawer {
cardRects.forEachIndexed { j, cardRect ->
val showVillainHands = Preferences.getShowVillainCards(context)
if (j < cards?.size ?: 0 && (showVillainHands || isHero)) { // show card
if (j < (cards?.size ?: 0) && (showVillainHands || isHero)) { // show card
val card = cards?.get(j)!! // tested line before
drawCard(card, cardRect, canvas, context)
} else { // show hidden cards

Loading…
Cancel
Save