Exemple #1
0
        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));
        }
Exemple #2
0
        public MarkupLineRawRule <RegularLineStyle> AddRule(RegularLineStyle lineStyle, bool empty = true, bool update = true)
        {
            var newRule = GetDefaultRule(lineStyle, empty);

            AddRule(newRule, update);
            return(newRule);
        }
Exemple #3
0
        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));
        }
Exemple #4
0
 public override void CopyTo(RegularLineStyle target)
 {
     base.CopyTo(target);
     if (target is Line3DStyle pavementTarget)
     {
         pavementTarget.Elevation.Value = Elevation;
     }
 }
Exemple #5
0
 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,
     });
Exemple #6
0
        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();
            }
        }
Exemple #7
0
 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)
 {
 }