Beispiel #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 = savedStates.Pop();
            }
            metaState = state;
        }
Beispiel #2
0
        public void SaveState(PdfContentByte cb)
        {
            cb.SaveState();
            MetaState state = new MetaState(this);

            savedStates.Push(state);
        }
Beispiel #3
0
 public float GetFontSize(MetaState state)
 {
     return(Math.Abs(state.TransformY(height) - state.TransformY(0)) * Document.WmfFontCorrection);
 }
 public float GetFontSize(MetaState state) => Math.Abs(state.TransformY(_height) - state.TransformY(0)) * Document.WmfFontCorrection;
Beispiel #5
0
 public MetaState(MetaState state)
 {
     metaState = state;
 }
 public void SaveState(PdfContentByte cb)
 {
     cb.SaveState();
     MetaState state = new MetaState(this);
     savedStates.Push(state);
 }
 public MetaState(MetaState state)
 {
     metaState = state;
 }
Beispiel #8
0
 virtual 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 = savedStates.Pop();
     }
     metaState = state;
 }
Beispiel #9
0
 public float GetFontSize(MetaState state) {
     return Math.Abs(state.TransformY(height) - state.TransformY(0)) * Document.WmfFontCorrection;
 }
Beispiel #10
0
 public float GetFontSize(MetaState state)
 {
     return(Math.Abs(state.TransformY(height) - state.TransformY(0)) * 0.86f);
 }
Beispiel #11
0
 public float GetFontSize(MetaState state)
 {
     return Math.Abs(state.TransformY(height) - state.TransformY(0)) * 0.86f;
 }