Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        public void saveState(PdfContentByte cb)
        {
            cb.saveState();
            MetaState state = new MetaState(this);

            savedStates.Push(this);
        }
Exemplo n.º 3
0
 public MetaState(MetaState state)
 {
     metaState = state;
 }
Exemplo n.º 4
0
 public float getFontSize(MetaState state)
 {
     return(Math.Abs(state.transformY(height) - state.transformY(0)) * 0.86f);
 }