package com.isidroid.rendering.constant

import androidx.annotation.IntDef

@Retention(AnnotationRetention.SOURCE)
@IntDef(PrintSize.FILL_PAGE, PrintSize.PAPER_ORIGINAL_PAGE, PrintSize.FIT_TO_PAPER, PrintSize.FIT_TO_PRINTABLE_AREA)
annotation class PrintSize {
    companion object {
        const val FILL_PAGE = 0
        const val PAPER_ORIGINAL_PAGE = 1
        const val FIT_TO_PAPER = 2
        const val FIT_TO_PRINTABLE_AREA = 3
    }
}


@PrintSize val Int.printSizeName
    get() = when (this) {
        PrintSize.FILL_PAGE -> "FILL_PAGE"
        PrintSize.PAPER_ORIGINAL_PAGE -> "PAPER_ORIGINAL_PAGE"
        PrintSize.FIT_TO_PAPER -> "FIT_TO_PAPER"
        PrintSize.FIT_TO_PRINTABLE_AREA -> "FIT_TO_PRINTABLE_AREA"
        else -> "UNKNOWN"
    }

