Skip to content

毫米的单位转px单位是固定的吗 #11

@xiaoxinne

Description

@xiaoxinne

我看代码毫米转px是直接写死的,不需要通过DPI或者PPI换算吗。项目试运行在ipad的app上的。
// 毫米 mm: { px: 96 / 25.4, gaps: [1000, 500, 200, 100, 50, 20, 10, 5, 2], defaultGap: 2000 },
convertUnitsToPx(value: number, toUnit: string): number { return value * this.config.conversionFactors[toUnit].px || DEFAULT_CONVERSION_FACTORS.px }

望回复。感谢感谢🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions