public LineStyle2(SwfReader r, ShapeType shapeType) { this.Width = r.GetUI16(); this.StartCapStyle = (CapStyle)r.GetBits(2); this.JoinStyle = (JoinStyle)r.GetBits(2); this.HasFillFlag = r.GetBit(); this.NoHScaleFlag = r.GetBit(); this.NoVScaleFlag = r.GetBit(); this.PixelHintingFlag = r.GetBit(); r.GetBits(5); // skip this.NoClose = r.GetBit(); this.EndCapStyle = (CapStyle)r.GetBits(2); if (this.JoinStyle == JoinStyle.MiterJoin) { this.MiterLimitFactor = (float)((r.GetByte() / 0x100) + r.GetByte()); } if (this.HasFillFlag) { this.FillStyle = FillStyleArray.ParseFillStyle2(r, shapeType); } else { this.Color = new RGBA(r.GetByte(), r.GetByte(), r.GetByte(), r.GetByte()); } }
internal LineStyle2(SwfReader r, ShapeType shapeType) { this.Width = r.GetUI16(); this.StartCapStyle = (CapStyle)r.GetBits(2); this.JoinStyle = (JoinStyle)r.GetBits(2); this.HasFillFlag = r.GetBit(); this.NoHScaleFlag = r.GetBit(); this.NoVScaleFlag = r.GetBit(); this.PixelHintingFlag = r.GetBit(); r.GetBits(5); // skip this.NoClose = r.GetBit(); this.EndCapStyle = (CapStyle)r.GetBits(2); if (this.JoinStyle == JoinStyle.MiterJoin) { this.MiterLimitFactor = (float)((r.GetByte() / 0x100) + r.GetByte()); } if (this.HasFillFlag) { this.FillStyle = FillStyleArray.ParseFillStyle2(r, shapeType); } else { this.Color = new RGBA(r.GetByte(), r.GetByte(), r.GetByte(), r.GetByte()); } }
private void initialize() { ID = -1; Members = new List <Relation>(); Tables = new List <AliasTable>(); JoinType = JoinStyle.INNER; }
public RelationGroup(int id, List <Relation> members, List <AliasTable> tables, JoinStyle joinType) { initialize(); ID = id; Members = members; Tables = tables; JoinType = joinType; }
/// <summary> /// Creates a set of parameters with the /// given parameter values. /// </summary> /// <param name="quadrantSegments"> the number of quadrant segments to use</param> /// <param name="endCapStyle"> the end cap style to use</param> /// <param name="joinStyle"> the join style to use</param> /// <param name="mitreLimit"> the mitre limit to use</param> public BufferParameters(int quadrantSegments, EndCapStyle endCapStyle, JoinStyle joinStyle, double mitreLimit) : this(quadrantSegments, endCapStyle) { JoinStyle = joinStyle; MitreLimit = mitreLimit; }
/// <summary> /// LINESTYLE2 builds upon the capabilities of the LINESTYLE record by allowing the use of new types of joins /// and caps as well as scaling options and the ability to fill a stroke. /// </summary> /// <param name="InitialVersion">The version of the Swf file using this object.</param> public LineStyle2(byte InitialVersion) : base(InitialVersion) { this._startCapStyle = CapStyle.None; this._joinstyle = JoinStyle.Round; this._endCapStyle = CapStyle.None; this._color = new Rgba(this._SwfVersion); this._fillStyle = new FillStyle(this._SwfVersion); }
private MorphLineStyle ReadMorphLineStyle2(SWFDataTypeReader shapeReader) { int startwidth = shapeReader.ReadUI16(); int endwidth = shapeReader.ReadUI16(); CapStyle startCap = (CapStyle)shapeReader.ReadUBits(2); JoinStyle join = (JoinStyle)shapeReader.ReadUBits(2); bool hasFill = shapeReader.ReadBit(); bool noHScaling = shapeReader.ReadBit(); bool noVScaling = shapeReader.ReadBit(); bool hasPixelHints = shapeReader.ReadBit(); shapeReader.ReadUBits(5); // Reserved: 0 bool noClose = shapeReader.ReadBit(); CapStyle endCap = (CapStyle)shapeReader.ReadUBits(2); int?miterLimit = null; if (join == JoinStyle.Miter) { miterLimit = shapeReader.ReadUI16(); } Color? startColour = null; Color? endColour = null; MorphFillStyle fs = null; if (hasFill) { fs = this.ReadMorphFillStyle(shapeReader); } else { startColour = shapeReader.ReadRGBA(); endColour = shapeReader.ReadRGBA(); } return(new MorphLineStyle() { StartWidth = startwidth, EndWidth = endwidth, StartColour = startColour, EndColour = endColour, StartCap = startCap, EndCap = endCap, Join = join, HasFill = hasFill, NoHScaling = noHScaling, NoVScaling = noVScaling, HasPixelHints = hasPixelHints, FillStyle = fs, MiterLimit = miterLimit }); }
private LineStyle ReadLineStyle2(SWFDataTypeReader shapeReader, Tag format) { int width = shapeReader.ReadUI16(); CapStyle startCap = (CapStyle)shapeReader.ReadUBits(2); JoinStyle join = (JoinStyle)shapeReader.ReadUBits(2); bool hasFill = shapeReader.ReadBit(); bool noHScaling = shapeReader.ReadBit(); bool noVScaling = shapeReader.ReadBit(); bool hasPixelHints = shapeReader.ReadBit(); shapeReader.ReadUBits(5); /* Reserved: 0 */ bool noClose = shapeReader.ReadBit(); CapStyle endCap = (CapStyle)shapeReader.ReadUBits(2); int?miterLimit = null; if (join == JoinStyle.Miter) { miterLimit = shapeReader.ReadUI16(); } Color? c = null; FillStyle fs = null; if (hasFill) { fs = this.ReadFillStyle(shapeReader, format); } else { c = shapeReader.ReadRGBA(); } return(new LineStyle() { Width = width, StartCap = startCap, EndCap = endCap, Join = join, HasFill = hasFill, NoHScaling = noHScaling, NoVScaling = noVScaling, HasPixelHints = hasPixelHints, Colour = c, FillStyle = fs, MiterLimit = miterLimit }); }
public PlotStyle() : base() { Name = "New style"; // needs to be iterative based on existing nodes LocalizedName = string.Empty; Description = string.Empty; Color = null; ModeColor = null; ColorPolicy = 1; PhysicalPenNumber = 0; VirtualPenNumber = 0; Screen = 100; LinePatternSize = 0.5; Linetype = Plot.Linetype.FromObject; AdaptiveLinetype = true; LineWeight = 0; FillStyle = FillStyle.FromObject; EndStyle = EndStyle.FromObject; JoinStyle = JoinStyle.FromObject; }
/// <summary> /// Parses this object out of a stream /// </summary> /// <param name="input">The input stream.</param> public override void Parse(Stream input) { BinaryReader br = new BinaryReader(input); this._startWidth = br.ReadUInt16(); this._endWidth = br.ReadUInt16(); BitStream bits = new BitStream(input); this._startCapStyle = (CapStyle)(Convert.ToByte(bits.GetBits(2))); this._joinstyle = (JoinStyle)(Convert.ToByte(bits.GetBits(2))); this._hasFillFlag = (0 != bits.GetBits(1) ? true : false); this._noHScale = (0 != bits.GetBits(1) ? true : false); this._noVScale = (0 != bits.GetBits(1) ? true : false); this._pixelHinting = (0 != bits.GetBits(1) ? true : false); bits.GetBits(5); // reserved must be null this._noClose = (0 != bits.GetBits(1) ? true : false); this._endCapStyle = (CapStyle)bits.GetBits(2); if (this._joinstyle.Equals(JoinStyle.Miter)) { this._miterLimtiFactor = br.ReadUInt16(); } if (!this._hasFillFlag) { this._startColor.Parse(input); this._endColor.Parse(input); } if (this._hasFillFlag) { //bits.Reset(); this._fillStyle.Parse(input); } }
public static extern Status XSetLineAttributes(IntPtr display, IntPtr gc, uint line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style);
/// <summary> /// Borders the join style. /// </summary> /// <param name="value">The value.</param> /// <returns>RadarDatasetBuilder.</returns> public RadarDatasetBuilder BorderJoinStyle(JoinStyle value) { Dataset.BorderJoinStyle = value; return(this); }