package com.remax.visualnovel.extension


import com.remax.visualnovel.configs.NovelApplication

private val resources = NovelApplication.appContext().resources

// dp, pixcel 相关
fun Float.dpToPx(): Float = this * resources.displayMetrics.density
fun Int.dpToPx(): Int = this * resources.displayMetrics.density.toInt()
fun Float.spToPx(): Float = this * resources.displayMetrics.scaledDensity