use of uk.me.parabola.imgfmt.app.typ.ShapeStacking in project mkgmap by openstreetmap.
the class TypTextReaderTest method testStacking.
@Test
public void testStacking() {
tr = makeTyp("[_drawOrder]\n" + "Type=0x3,1\n" + "Type=0x2,2\n" + "Type=0x1,4\n" + "Type=0x4,2\n" + "Type=0x10402,2\n" + "Type=0x10405,2\n" + "[End]\n");
ShapeStacking stacking = tr.getData().getStacking();
ArrayImgWriter out = new ArrayImgWriter();
stacking.write(out);
byte[] buf = out.getBytes();
assertEquals(3, buf[0]);
assertEquals(0, buf[ORDER_SIZE]);
assertEquals(2, buf[2 * ORDER_SIZE]);
assertEquals(4, buf[3 * ORDER_SIZE]);
assertEquals(0, buf[3 * ORDER_SIZE + 1]);
assertEquals(4, buf[4 * ORDER_SIZE]);
assertEquals((1 << 2) + (1 << 5), buf[4 * ORDER_SIZE + 1]);
}
Aggregations