Change the formating to tabs

This commit is contained in:
lucas lelievre committed 2022-04-28 03:44:24 +02:00
1 parent 93c353bbc6
commit 3a80ad0632
118 files changed
+16690 -16689

No files matched your search

+59 -59
View File
@@ -6,85 +6,85 @@ import java.util.Map;
public class ScalableFont extends Font {
protected float scale = 1.0f;
protected float scale = 1.0f;
protected int initSize;
protected float initPointSize;
protected int initSize;
protected float initPointSize;
public ScalableFont(Map<? extends Attribute, ?> attributes) {
super(attributes);
public ScalableFont(Map<? extends Attribute, ?> attributes) {
super(attributes);
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
public ScalableFont(Font font) {
super(font);
public ScalableFont(Font font) {
super(font);
if (font instanceof ScalableFont) {
ScalableFont sourceFont = (ScalableFont) font;
if (font instanceof ScalableFont) {
ScalableFont sourceFont = (ScalableFont) font;
this.initSize = sourceFont.getInitSize();
this.initPointSize = sourceFont.getInitSize2D();
this.initSize = sourceFont.getInitSize();
this.initPointSize = sourceFont.getInitSize2D();
this.size = this.initSize;
this.pointSize = this.initPointSize;
} else {
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
}
this.size = this.initSize;
this.pointSize = this.initPointSize;
} else {
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
}
public ScalableFont(Font font, float scale) {
super(font);
public ScalableFont(Font font, float scale) {
super(font);
if (font instanceof ScalableFont) {
ScalableFont sourceFont = (ScalableFont) font;
if (font instanceof ScalableFont) {
ScalableFont sourceFont = (ScalableFont) font;
this.initSize = sourceFont.getInitSize();
this.initPointSize = sourceFont.getInitSize2D();
} else {
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
this.initSize = sourceFont.getInitSize();
this.initPointSize = sourceFont.getInitSize2D();
} else {
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
setScale(scale);
}
setScale(scale);
}
public ScalableFont(String name, int style, int size) {
super(name, style, size);
public ScalableFont(String name, int style, int size) {
super(name, style, size);
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
this.initSize = this.size;
this.initPointSize = this.pointSize;
}
public ScalableFont(String name, int style, int size, float scale) {
super(name, style, size);
public ScalableFont(String name, int style, int size, float scale) {
super(name, style, size);
this.initSize = this.size;
this.initPointSize = this.pointSize;
this.initSize = this.size;
this.initPointSize = this.pointSize;
setScale(scale);
}
setScale(scale);
}
public int getInitSize() {
return initSize;
}
public int getInitSize() {
return initSize;
}
public float getInitSize2D() {
return initPointSize;
}
public float getInitSize2D() {
return initPointSize;
}
public float getScale() {
return scale;
}
public float getScale() {
return scale;
}
private void setScale(float scale) {
this.scale = scale;
private void setScale(float scale) {
this.scale = scale;
float newPointSize = initPointSize * scale;
float newPointSize = initPointSize * scale;
this.size = (int) (newPointSize + 0.5);
this.pointSize = newPointSize;
}
this.size = (int) (newPointSize + 0.5);
this.pointSize = newPointSize;
}
}