package com.epson.mobilephone.common.escpr;

import com.epson.mobilephone.common.escpr.MediaInfo;

public class PaperSize {
    public int mHeight;
    MediaInfo.AbstractInfo_size mInfo;
    public int mWidth;

    public PaperSize() {
        this.mWidth = 0;
        this.mHeight = 0;
    }

    public PaperSize(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        Info_paper stringId = this.mInfo.getStringId(i);
        this.mWidth = stringId.getPaper_width();
        this.mHeight = stringId.getPaper_height();
        this.mInfo.destructor();
    }

    public void setPaperSize(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        Info_paper stringId = this.mInfo.getStringId(i);
        this.mWidth = stringId.getPaper_width();
        this.mHeight = stringId.getPaper_height();
        this.mInfo.destructor();
    }

    public int[] getPaperSizeBoder(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        Info_paper stringId = this.mInfo.getStringId(i);
        int[] iArr = {stringId.getPaper_width_boder(), stringId.getPaper_height_boder()};
        this.mInfo.destructor();
        return iArr;
    }

    public int getWidth_boder(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        int paper_width_boder = this.mInfo.getStringId(i).getPaper_width_boder();
        this.mInfo.destructor();
        return paper_width_boder;
    }

    public int getHeight_boder(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        int paper_height_boder = this.mInfo.getStringId(i).getPaper_height_boder();
        this.mInfo.destructor();
        return paper_height_boder;
    }

    public int getWidth_boderLess(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        int paper_width_boderless = this.mInfo.getStringId(i).getPaper_width_boderless();
        this.mInfo.destructor();
        return paper_width_boderless;
    }

    public int getHeight_boderLess(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        int paper_height_boderless = this.mInfo.getStringId(i).getPaper_height_boderless();
        this.mInfo.destructor();
        return paper_height_boderless;
    }

    public int getTopMargin(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        int topMargin = this.mInfo.getStringId(i).getTopMargin();
        this.mInfo.destructor();
        return Math.abs(topMargin);
    }

    public int getLeftMargin(int i) {
        this.mInfo = new MediaInfo.PaperSize_constants();
        int leftMargin = this.mInfo.getStringId(i).getLeftMargin();
        this.mInfo.destructor();
        return Math.abs(leftMargin);
    }

    public int getHeightPaper() {
        return this.mHeight;
    }

    public int getWidthPaper() {
        return this.mWidth;
    }
}
