Beispiel #1
0
        private void changeArray()
        {
            _array.Clear();
            double angle = _angle * Math.PI / 180;

            double[] arrayf = new double[8];

            arrayf[6] = _left + _width * Math.Cos(angle) - _height * Math.Sin(angle);
            arrayf[7] = _top + _width * Math.Sin(angle) + _height * Math.Cos(angle);
            arrayf[4] = _left - _height * Math.Sin(angle);
            arrayf[5] = _top + _height * Math.Cos(angle);
            arrayf[2] = _left + _width * Math.Cos(angle);
            arrayf[3] = _top + _width * Math.Sin(angle);
            arrayf[0] = _left;
            arrayf[1] = _top;

            if (_page != null)
            {
                for (int i = 0; i < 4; ++i)
                {
                    arrayf[i * 2]     = arrayf[i * 2] + _page.PageRect.Left;
                    arrayf[i * 2 + 1] = _page.PageRect.Bottom - arrayf[i * 2 + 1];
                }
            }

            for (int i = 0; i < 8; ++i)
            {
                _array.AddItem(new PDFNumber((float)arrayf[i]));
            }
        }
Beispiel #2
0
 /// <summary>
 /// Removes all elements from the collection.
 /// </summary>
 public void Clear()
 {
     _items.Clear();
     if (ChangedChoiceItems != null)
     {
         ChangedChoiceItems(this);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Removes all elements from the collection.
        /// </summary>
        public void Clear()
        {
            _array.Clear();

            if (ChangedPointsArray != null)
            {
                ChangedPointsArray(this);
            }
        }
Beispiel #4
0
        private void createArray()
        {
            float pageLeft = 0, pageBottom = 0;

            if (_page != null)
            {
                RectangleF rect = _page.PageRect;
                pageLeft   = rect.Left;
                pageBottom = rect.Bottom;
            }

            if (_array == null)
            {
                _array = new PDFArray();
            }
            else
            {
                _array.Clear();
            }

            if (_page != null)
            {
                _array.AddItem(_page.GetDictionary());
            }
            else
            {
                _array.AddItem(new PDFNull());
            }

            switch (_zoomMode)
            {
            case ZoomMode.FitBounding:
                _array.AddItem(new PDFName("FitB"));
                break;

            case ZoomMode.FitBoundingHorizontal:
                _array.AddItem(new PDFName("FitBH"));
                _array.AddItem(new PDFNumber(pageBottom - _top));
                break;

            case ZoomMode.FitBoundingVertical:
                _array.AddItem(new PDFName("FitBV"));
                _array.AddItem(new PDFNumber(_left + pageLeft));
                break;

            case ZoomMode.FitHorizontal:
                _array.AddItem(new PDFName("FitH"));
                _array.AddItem(new PDFNumber(pageBottom - _top));
                break;

            case ZoomMode.FitPage:
                _array.AddItem(new PDFName("Fit"));
                break;

            case ZoomMode.FitRectangle:
                _array.AddItem(new PDFName("FitR"));
                _array.AddItem(new PDFNumber(_left + pageLeft));            //left
                _array.AddItem(new PDFNumber(pageBottom - _top - _height)); //bottom
                _array.AddItem(new PDFNumber(_left + pageLeft + _width));   //right
                _array.AddItem(new PDFNumber(pageBottom - _top));           //top
                break;

            case ZoomMode.FitVertical:
                _array.AddItem(new PDFName("FitV"));
                _array.AddItem(new PDFNumber(_left + pageLeft));
                break;

            case ZoomMode.FitXYZ:
                _array.AddItem(new PDFName("XYZ"));
                _array.AddItem(new PDFNumber(_left + pageLeft));
                _array.AddItem(new PDFNumber(pageBottom - _top));
                if (_zoom > 0)
                {
                    _array.AddItem(new PDFNumber(_zoom * 1.0f / 100));
                }
                else
                {
                    _array.AddItem(new PDFNull());
                }
                break;
            }
        }
Beispiel #5
0
 /// <summary>
 /// Removes all elements from the collection.
 /// </summary>
 public void Clear()
 {
     _array.Clear();
     _items.Clear();
 }
Beispiel #6
0
 /// <summary>
 /// Clears this collection.
 /// </summary>
 public void Clear()
 {
     _layers.Clear();
     _array.Clear();
 }
Beispiel #7
0
 internal void Clear()
 {
     _fields.Clear();
 }