Esempio n. 1
0
        public override object Clone()
        {
            UncoloredTilingPatternColorspace p = this.MemberwiseClone() as UncoloredTilingPatternColorspace;

            p._color = _color.Clone() as DeviceColor;
            p._canvas.Resources.Dictionary.AddRange(_canvas.Resources.Dictionary);
            byte[] buf = new byte[_canvas.Stream.Length];
            _canvas.Stream.Position = 0;
            _canvas.Stream.Read(buf, 0, buf.Length);
            p._canvas.Stream.Position = 0;
            p._canvas.Stream.Write(buf, 0, buf.Length);
            return(p);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.UncoloredTilingBrush class.
        /// </summary>
        /// <param name="width" href="http://msdn.microsoft.com/en-us/library/system.single.aspx">The width of pattern cells in pixels.</param>
        /// <param name="height" href="http://msdn.microsoft.com/en-us/library/system.single.aspx">The height of pattern cells in pixels.</param>
        public UncoloredTilingBrush(float width, float height)
        {
            if (width < 0)
            {
                throw new ArgumentOutOfRangeException("width");
            }
            if (height < 0)
            {
                throw new ArgumentOutOfRangeException("height");
            }

            _pattern = new UncoloredTilingPatternColorspace(width, height);
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.UncoloredTilingPen class.
        /// </summary>
        /// <param name="width" href="http://msdn.microsoft.com/en-us/library/system.single.aspx">The width of pattern cells in pixels.</param>
        /// <param name="height" href="http://msdn.microsoft.com/en-us/library/system.single.aspx">The height of pattern cells in pixels.</param>
        public UncoloredTilingPen(float width, float height)
        {
            if (width < 0)
            {
                throw new ArgumentOutOfRangeException("width");
            }
            if (height < 0)
            {
                throw new ArgumentOutOfRangeException("height");
            }

            _pattern     = new UncoloredTilingPatternColorspace(width, height);
            _width       = 1;
            _lineCap     = LineCapStyle.Butt;
            _lineJoin    = LineJoinStyle.Miter;
            _dashPattern = new DashPattern();
            _opacity     = 1.0f;
            _miterLimit  = 10.0f;
        }