protected virtual MarkupLineRawRule <RegularLineStyle> GetDefaultRule(RegularLineStyle lineStyle, bool empty = true) { var from = empty ? null : GetDefaultEdge(Start); var to = empty ? null : GetDefaultEdge(End); return(new MarkupLineRawRule <RegularLineStyle>(this, lineStyle, from, to)); }
public MarkupLineRawRule <RegularLineStyle> AddRule(RegularLineStyle lineStyle, bool empty = true, bool update = true) { var newRule = GetDefaultRule(lineStyle, empty); AddRule(newRule, update); return(newRule); }
protected override MarkupLineRawRule <RegularLineStyle> GetDefaultRule(RegularLineStyle lineStyle, bool empty = true) { var from = empty ? null : new CrosswalkBorderEdge(this, BorderPosition.Right); var to = empty ? null : new CrosswalkBorderEdge(this, BorderPosition.Left); return(new MarkupLineRawRule <RegularLineStyle>(this, lineStyle, from, to)); }
public override void CopyTo(RegularLineStyle target) { base.CopyTo(target); if (target is Line3DStyle pavementTarget) { pavementTarget.Elevation.Value = Elevation; } }
public static T GetDefault <T>(StyleType type) where T : Style { return((type & StyleType.GroupMask) switch { StyleType.RegularLine when RegularLineStyle.GetDefault((RegularLineStyle.RegularLineType)(int) type) is T tStyle => tStyle, StyleType.StopLine when StopLineStyle.GetDefault((StopLineStyle.StopLineType)(int) type) is T tStyle => tStyle, StyleType.Filler when FillerStyle.GetDefault((FillerStyle.FillerType)(int) type) is T tStyle => tStyle, StyleType.Crosswalk when CrosswalkStyle.GetDefault((CrosswalkStyle.CrosswalkType)(int) type) is T tStyle => tStyle, _ => null, });
public MarkupRegularLine(Markup markup, MarkupPointPair pointPair, RegularLineStyle style = null, Alignment alignment = Alignment.Centre, bool update = true) : base(markup, pointPair, false) { RawAlignment = new PropertyEnumValue <Alignment>("A", AlignmentChanged, alignment); if (update) { Update(true); } if (style != null) { AddRule(style, false, false); RecalculateStyleData(); } }
public MarkupRegularLine(Markup markup, MarkupPoint first, MarkupPoint second, RegularLineStyle style = null, Alignment alignment = Alignment.Centre, bool update = true) : this(markup, MarkupPointPair.FromPoints(first, second, out bool invert), style, !invert ? alignment : alignment.Invert(), update) { }