Skip to content

Commit

Permalink
Small addition
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Jan 30, 2023
1 parent 8233062 commit ccb4d13
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions korim/src/commonMain/kotlin/com/soywiz/korim/atlas/AtlasInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ data class AtlasInfo(
val name: String,
val frame: Rect,
val virtFrame: Rect? = null,
val imageOrientation: ImageOrientation = ImageOrientation.ROTATE_0,
val imageOrientation: ImageOrientation = ImageOrientation.NORMAL,
) {
@Deprecated("Use primary constructor")
constructor(
Expand Down Expand Up @@ -145,7 +145,15 @@ data class AtlasInfo(

// @TODO: Rename to path or name
//@IgnoreSerialization
val filename get() = name
val filename: String get() = name

// Used by Spine
@Suppress("unused")
val srcWidth: Int = if (imageOrientation.isRotatedDeg90CwOrCcw) frame.h else frame.w

// Used by Spine
@Suppress("unused")
val srcHeight: Int = if (imageOrientation.isRotatedDeg90CwOrCcw) frame.w else frame.h
}

val app: String get() = meta.app
Expand Down

0 comments on commit ccb4d13

Please sign in to comment.