/// <summary> /// Create a new <see cref="SetLineJoin"/>. /// </summary> public SetLineJoin(LineJoinStyle join) { if (join < 0 || (int)join > 2) { throw new ArgumentException("Invalid argument passed for line join style. Should be 0, 1 or 2; instead got: " + join); } Join = join; }
/// <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; }
/// <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; }
public virtual void set_Renamed(State state) { this.scene = state.scene; //UPGRADE_ISSUE: Method 'java.awt.geom.AffineTransform.setTransform' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtgeomAffineTransformsetTransform_javaawtgeomAffineTransform_3"' //TODO PENDING this.transform.setTransform(state.transform); this.font = state.font; this.strokeColor = state.strokeColor; this.fillColor = state.fillColor; this.fillBrush = state.fillBrush; this.lineWidth = state.lineWidth; this.lineCap = state.lineCap; this.lineJoin = state.lineJoin; this.miterLimit = state.miterLimit; this.lineDashLengths = state.lineDashLengths; this.lineDashPhase = state.lineDashPhase; this.fillRule = state.fillRule; this.textPosition = state.textPosition; this.usesFractionalFontMetrics = state.usesFractionalFontMetrics; }
public void polylineSetStyle(int contextId, float width, LineCapStyle cap, LineJoinStyle join, float miterLimit, float[] lineDashLengths, float lineDashPhase) { Scenic.Render.Context context = getContext(contextId); context.lineWidth = width; context.lineCap = cap; context.lineJoin = join; context.miterLimit = miterLimit; context.lineDashLengths = new List <float>(); if (lineDashLengths != null) { for (int i = 0; i < lineDashLengths.GetLongLength(0); i++) { context.lineDashLengths.Add(lineDashLengths[i]); } } context.lineDashPhase = lineDashPhase; }
protected virtual void strokeLineSegment(LineSegment segment1, LineSegment segment2, LineJoinStyle joinStyle, bool joinOnLeft) { //Draw Linsegment if (segment1 == null) return; fillConvexPolygon(segment1); //Draw join if (segment2 == null) return; Vector2 joinEndPoint = joinOnLeft ? segment1.LeftEndPoint : segment1.RightEndPoint; Vector2 joinStartPoint = joinOnLeft ? segment2.LeftStartPoint : segment2.RightStartPoint; switch (joinStyle) { case LineJoinStyle.Miter: fillConvexPolygon(joinEndPoint, segment1.EndPoint, joinStartPoint); break; case LineJoinStyle.Bevel: case LineJoinStyle.Round: default: throw new System.NotImplementedException(); } }
/// <summary> /// Constructor for <see cref="LineJoinOperator"/>. /// </summary> /// <param name="style">The line join style to use.</param> public LineJoinOperator(LineJoinStyle style) { Style = style; }
public void SetLineJoin(LineJoinStyle join) { GetCurrentState().JoinStyle = join; }
public void polylineSetStyle(int contextId, float width, LineCapStyle cap, LineJoinStyle join, float miterLimit, float[] lineDashLengths, float lineDashPhase) { Scenic.Render.Context context = getContext(contextId); context.lineWidth = width; context.lineCap = cap; context.lineJoin = join; context.miterLimit = miterLimit; context.lineDashLengths = new List<float>(); if (lineDashLengths != null) { for (int i = 0; i < lineDashLengths.GetLongLength(0); i++) context.lineDashLengths.Add(lineDashLengths[i]); } context.lineDashPhase = lineDashPhase; }