示例#1
0
 /// <summary>
 /// Initializes a new instance of the Bytescout.PDF.ColoredTilingBrush 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 ColoredTilingBrush(float width, float height)
 {
     if (width < 0)
     {
         throw new ArgumentOutOfRangeException("width");
     }
     if (height < 0)
     {
         throw new ArgumentOutOfRangeException("height");
     }
     _pattern = new ColoredTilingPatternColorspace(width, height);
 }
示例#2
0
        public override object Clone()
        {
            ColoredTilingPatternColorspace p = this.MemberwiseClone() as ColoredTilingPatternColorspace;

            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);
        }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.ColoredTilingPen 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 ColoredTilingPen(float width, float height)
        {
            if (width < 0)
            {
                throw new ArgumentOutOfRangeException("width");
            }
            if (height < 0)
            {
                throw new ArgumentOutOfRangeException("height");
            }

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