Skip to content

Commit

Permalink
Move ZplDpiSetting
Browse files Browse the repository at this point in the history
Bump to 0.0.4
  • Loading branch information
itsmattking committed Jul 6, 2024
1 parent d45eb5f commit 6988fc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "info.mking.k2zpl"
version = "0.0.3"
version = "0.0.4"

repositories {
mavenCentral()
Expand All @@ -25,7 +25,7 @@ tasks.test {
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
coordinates("info.mking.k2zpl", "k2zpl", "0.0.3")
coordinates("info.mking.k2zpl", "k2zpl", "0.0.4")
pom {
name.set("k2zpl")
description.set("Kotlin DSL for ZPL (Zebra Programming Language)")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package command.options
@file:Suppress("UNUSED")

enum class DpiSetting(val dpi: Int, val dotsPerMm: Double) {
package info.mking.k2zpl.command.options

enum class ZplDpiSetting(val dpi: Int, val dotsPerMm: Double) {
Unset(-1, -1.0),
DPI_152(152, 6.0),
DPI_203(203, 8.0),
DPI_300(300, 11.8),
DPI_608(608, 24.0);

companion object {
fun fromDpi(dpi: Int): DpiSetting {
fun fromDpi(dpi: Int): ZplDpiSetting {
return entries.find { it.dpi == dpi }
?: throw IllegalArgumentException("Unsupported DPI value: $dpi")
}
Expand Down

0 comments on commit 6988fc1

Please sign in to comment.