📄 e682. getting the dimensions of a printed page.txt
字号:
Note that (0, 0) of the Graphics object is at the top-left of the actual page, which is outside the printable area.
public int print(Graphics g, PageFormat pf, int pageIndex) {
// The area of the printable area.
double ix = pf.getImageableX();
double iy = pf.getImageableY();
double iw = pf.getImageableWidth();
double ih = pf.getImageableHeight();
// The area of the actual page.
double x = 0;
double y = 0;
double w = pf.getWidth();
double h = pf.getHeight();
return Printable.NO_SUCH_PAGE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -