/// <summary> /// Initializes a new instance of the Bytescout.PDF.SolidPen class. /// </summary> public SolidPen() { _width = 1; _color = new ColorRGB(0, 0, 0); _lineCap = LineCapStyle.Butt; _lineJoin = LineJoinStyle.Miter; _dashPattern = new DashPattern(); _opacity = 1.0f; _miterLimit = 10.0f; }
/// <summary> /// Initializes a new instance of the Bytescout.PDF.SolidPen class. /// </summary> /// <param name="color">A Bytescout.PDF.Color that indicates the color of the pen.</param> public SolidPen(Color color) { if (color == null) { throw new ArgumentNullException(); } _width = 1; _color = color; _lineCap = LineCapStyle.Butt; _lineJoin = LineJoinStyle.Miter; _dashPattern = new DashPattern(); _opacity = 1.0f; _miterLimit = 10.0f; }
/// <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; }
public float[] GetDashPattern() { var patternstrs = DashPattern.Split(';'); List <float> result = new List <float>(); for (int i = 0; i < patternstrs.Length; i++) { float value = 0; if (float.TryParse(patternstrs[i], out value)) { result.Add(value); } else { return new float[] { 1 } }; } return(result.ToArray()); }
/// <summary> /// Initializes a new instance of the Bytescout.PDF.SolidPen class. /// </summary> /// <param name="color">A Bytescout.PDF.Color that indicates the color of the pen.</param> /// <param name="width" href="http://msdn.microsoft.com/en-us/library/system.single.aspx">The width of the pen.</param> public SolidPen(Color color, float width) { if (color == null) { throw new ArgumentNullException("color"); } if (width < 0) { throw new ArgumentOutOfRangeException("width"); } _width = width; _color = color; _lineCap = LineCapStyle.Butt; _lineJoin = LineJoinStyle.Miter; _dashPattern = new DashPattern(); _opacity = 1.0f; _miterLimit = 10.0f; }
/// <summary> /// Determines whether the specified System.Object is equal to the current Bytescout.PDF.DashPattern. /// </summary> /// <param name="obj" href="http://msdn.microsoft.com/en-us/library/system.object.aspx">The System.Object to compare with the current Bytescout.PDF.DashPattern.</param> /// <returns cref="bool" href="http://msdn.microsoft.com/en-us/library/system.boolean.aspx">true if the specified System.Object is equal to the current Bytescout.PDF.DashPattern; otherwise, false.</returns> public override bool Equals(object obj) { if (obj is DashPattern) { DashPattern dash = obj as DashPattern; if (_dashPhase != dash._dashPhase) { return(false); } if (_dashArray.Length != dash._dashArray.Length) { return(false); } for (int i = 0; i < _dashArray.Length; ++i) { if (_dashArray[i] != dash._dashArray[i]) { return(false); } } return(true); } return(false); }
public override string ToString() { return("boog;" + Zichtbaarheid + ";" + Niveau + ";" + Layer.Naam + ";" + ColorTranslator.ToOle(LijnKleur) + ";" + LijnDikte + ";" + (int)LijnStijl + ";" + (LijnStijl == DashStyle.Custom ? string.Join("/", DashPattern.Select(T => T.ToString()).ToArray()) : "") + ";" + string.Join(";", punten.Select(T => T.ID.ToString()).ToArray())); }
public override string ToString() { return("raak;" + Zichtbaarheid + ";" + Niveau + ";" + Layer.Naam + ";" + ColorTranslator.ToOle(LijnKleur) + ";" + LijnDikte + ";" + (int)LijnStijl + ";" + (LijnStijl == System.Drawing.Drawing2D.DashStyle.Custom ? string.Join("/", DashPattern.Select(T => T.ToString()).ToArray()) : "") + ";" + RichtPunt.ID + ";" + eindpunt.ID + ";" + richtlijn.ID); }