public void restoreState(int index, PdfContentByte cb) { int pops; if (index < 0) { pops = Math.Min(-index, savedStates.Count); } else { pops = Math.Max(savedStates.Count - index, 0); } if (pops == 0) { return; } MetaState state = null; while (pops-- != 0) { cb.restoreState(); state = (MetaState)savedStates.Pop(); } metaState = state; }
public void saveState(PdfContentByte cb) { cb.saveState(); MetaState state = new MetaState(this); savedStates.Push(this); }
public MetaState(MetaState state) { metaState = state; }
public float getFontSize(MetaState state) { return(Math.Abs(state.transformY(height) - state.transformY(0)) * 0.86f); }