File tree 2 files changed +6
-8
lines changed
src/main/java/com/labelzoom/api/model/components
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ plugins {
6
6
}
7
7
8
8
group = ' com.labelzoom.api'
9
- version = ' 1.1 .0'
9
+ version = ' 1.2 .0'
10
10
11
11
java {
12
12
sourceCompatibility = JavaVersion . VERSION_1_8
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public class CLabel
27
27
private int height ;
28
28
29
29
@ Getter @ Setter
30
- private boolean isHighRes = false ;
30
+ private int dpi = 100 ;
31
31
32
32
@ Getter @ Setter
33
33
private PageOrientation orientation = PageOrientation .Portrait ;
@@ -82,7 +82,7 @@ protected CLabel(final CLabel original, final boolean cloneData)
82
82
{
83
83
width = original .getWidth ();
84
84
height = original .getHeight ();
85
- isHighRes = original .isHighRes ();
85
+ dpi = original .getDpi ();
86
86
orientation = original .getOrientation ();
87
87
if (original .getLayers () != null )
88
88
{
@@ -108,6 +108,9 @@ protected CLabel(final CLabel original, final boolean cloneData)
108
108
}
109
109
}
110
110
111
+ public boolean isHighRes () { return dpi >= 1000 ; }
112
+ public void setHighRes (final boolean isHighRes ) { dpi = isHighRes ? 1000 : 100 ; }
113
+
111
114
public void setElements (final List <AComponent > elements ) { getLayerMap ().get (DEFAULT_LAYER_NAME ).setElements (elements ); } // TODO: Multi-layer support
112
115
public List <AComponent > getElements () { return getLayerMap ().get (DEFAULT_LAYER_NAME ).getElements (); } // TODO: Multi-layer support
113
116
@@ -199,9 +202,4 @@ public List<AComponent> getSortedElements()
199
202
else if (!c1 .isReverse () && c2 .isReverse ()) return -1 ;
200
203
return Integer .compare (this .getElements ().indexOf (c1 ), this .getElements ().indexOf (c2 ));
201
204
};
202
-
203
- public int getDpi ()
204
- {
205
- return isHighRes ? 1000 : 100 ;
206
- }
207
205
}
You can’t perform that action at this time.
0 commit comments