int VSpace::inPixels(BufferView const & bv) const { // Height of a normal line in pixels (zoom factor considered) int const default_height = defaultRowHeight(); switch (kind_) { case DEFSKIP: return bv.buffer().params().getDefSkip().inPixels(bv); // This is how the skips are normally defined by LateX. // But there should be some way to change this per document. case SMALLSKIP: return default_height / 4; case MEDSKIP: return default_height / 2; case BIGSKIP: return default_height; case VFILL: // leave space for the vfill symbol return 3 * default_height; case LENGTH: return len_.len().inPixels(bv.workWidth()); default: LATTEST(false); // fall through in release mode } return 0; }
int HSpace::inPixels(BufferView const & bv) const { switch (kind_) { case DEFAULT: // FIXME: replace by correct length return bv.buffer().params().getIndentation().inPixels(bv); case LENGTH: return len_.len().inPixels(bv.workWidth()); default: LATTEST(false); // fall through in release mode } return 0; }