12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 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() {
- mWidth = 0;
- mHeight = 0;
- }
- public PaperSize(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- Info_paper stringId = mInfo.getStringId(i);
- mWidth = stringId.getPaper_width();
- mHeight = stringId.getPaper_height();
- mInfo.destructor();
- }
- public void setPaperSize(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- Info_paper stringId = mInfo.getStringId(i);
- mWidth = stringId.getPaper_width();
- mHeight = stringId.getPaper_height();
- mInfo.destructor();
- }
- public int[] getPaperSizeBoder(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- Info_paper stringId = mInfo.getStringId(i);
- int[] iArr = {stringId.getPaper_width_boder(), stringId.getPaper_height_boder()};
- mInfo.destructor();
- return iArr;
- }
- public int getWidth_boder(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- int paper_width_boder = mInfo.getStringId(i).getPaper_width_boder();
- mInfo.destructor();
- return paper_width_boder;
- }
- public int getHeight_boder(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- int paper_height_boder = mInfo.getStringId(i).getPaper_height_boder();
- mInfo.destructor();
- return paper_height_boder;
- }
- public int getWidth_boderLess(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- int paper_width_boderless = mInfo.getStringId(i).getPaper_width_boderless();
- mInfo.destructor();
- return paper_width_boderless;
- }
- public int getHeight_boderLess(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- int paper_height_boderless = mInfo.getStringId(i).getPaper_height_boderless();
- mInfo.destructor();
- return paper_height_boderless;
- }
- public int getTopMargin(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- int topMargin = mInfo.getStringId(i).getTopMargin();
- mInfo.destructor();
- return Math.abs(topMargin);
- }
- public int getLeftMargin(int i) {
- mInfo = new MediaInfo.PaperSize_constants();
- int leftMargin = mInfo.getStringId(i).getLeftMargin();
- mInfo.destructor();
- return Math.abs(leftMargin);
- }
- public int getHeightPaper() {
- return mHeight;
- }
- public int getWidthPaper() {
- return mWidth;
- }
- }
|