void JB2Dict::JB2Codec::init_library(JB2Dict &jim) { int nshape = jim.get_inherited_shape_count(); shape2lib.resize(0,nshape-1); lib2shape.resize(0,nshape-1); libinfo.resize(0,nshape-1); for (int i=0; i<nshape; i++) { shape2lib[i] = i; lib2shape[i] = i; jim.get_bounding_box(i, libinfo[i]); } }
void JB2Dict::JB2Codec::init_library(JB2Dict &jim) { int nshape = jim.get_inherited_shape_count(); shape2lib.resize(0,nshape-1); lib2shape.resize(0,nshape-1); libinfo.resize(0,nshape-1); for (int i=0; i<nshape; i++) { shape2lib[i] = i; lib2shape[i] = i; JB2Shape &jshp = jim.get_shape(i); libinfo[i].compute_bounding_box(*(jshp.bits)); } }
void JB2Dict::JB2Codec::Encode::code_inherited_shape_count(JB2Dict &jim) { CodeNum(jim.get_inherited_shape_count(), 0, BIGPOSITIVE, inherited_shape_count_dist); }