/** * Constructor * * @param erd the escher record data */ public ClientAnchor(EscherRecordData erd) { super(erd); byte[] bytes = getBytes(); // The properties properties = IntegerHelper.getInt(bytes[0], bytes[1]); // The x1 cell int x1Cell = IntegerHelper.getInt(bytes[2], bytes[3]); int x1Fraction = IntegerHelper.getInt(bytes[4], bytes[5]); x1 = x1Cell + (double) x1Fraction / (double) 1024; // The y1 cell int y1Cell = IntegerHelper.getInt(bytes[6], bytes[7]); int y1Fraction = IntegerHelper.getInt(bytes[8], bytes[9]); y1 = y1Cell + (double) y1Fraction / (double) 256; // The x2 cell int x2Cell = IntegerHelper.getInt(bytes[10], bytes[11]); int x2Fraction = IntegerHelper.getInt(bytes[12], bytes[13]); x2 = x2Cell + (double) x2Fraction / (double) 1024; // The y1 cell int y2Cell = IntegerHelper.getInt(bytes[14], bytes[15]); int y2Fraction = IntegerHelper.getInt(bytes[16], bytes[17]); y2 = y2Cell + (double) y2Fraction / (double) 256; }
/** * Constructor * * @param erd the escher record data */ public ClientAnchor(EscherRecordData erd) { super(erd); byte[] bytes = getBytes(); // The properties properties = IntegerHelper.getInt(bytes[0], bytes[1]); // The x1 cell int x1Cell = IntegerHelper.getInt(bytes[2], bytes[3]); int x1Fraction = IntegerHelper.getInt(bytes[4], bytes[5]); x1 = x1Cell + (double) x1Fraction / (double) 1024; // The y1 cell int y1Cell = IntegerHelper.getInt(bytes[6], bytes[7]); int y1Fraction = IntegerHelper.getInt(bytes[8], bytes[9]); y1 = y1Cell + (double) y1Fraction / (double) 256; // The x2 cell int x2Cell = IntegerHelper.getInt(bytes[10], bytes[11]); int x2Fraction = IntegerHelper.getInt(bytes[12], bytes[13]); x2 = x2Cell + (double) x2Fraction / (double) 1024; // The y1 cell int y2Cell = IntegerHelper.getInt(bytes[14], bytes[15]); int y2Fraction = IntegerHelper.getInt(bytes[16], bytes[17]); y2 = y2Cell + (double) y2Fraction / (double) 256; }