Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaugeScale"/> class.
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public GaugeScale(GaugeObject parent)
 {
     this.parent = parent;
     font        = new Font("Arial", 8.0f);
     TextFill    = new SolidFill(Color.Black);
     majorTicks  = new ScaleTicks();
     minorTicks  = new ScaleTicks();
 }
Beispiel #2
0
 /// <summary>
 /// Serializes the scale ticks.
 /// </summary>
 /// <param name="writer">Writer object.</param>
 /// <param name="prefix">Scale ticks property name.</param>
 /// <param name="diff">Another ScaleTicks to compare with.</param>
 /// <remarks>
 /// This method is for internal use only.
 /// </remarks>
 public virtual void Serialize(FRWriter writer, string prefix, ScaleTicks diff)
 {
     if (Length != diff.Length)
     {
         writer.WriteFloat(prefix + ".Length", Length);
     }
     if (Width != diff.Width)
     {
         writer.WriteInt(prefix + ".Width", Width);
     }
     if (Color != diff.Color)
     {
         writer.WriteValue(prefix + ".Color", Color);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Copies the contents of another ScaleTicks.
 /// </summary>
 /// <param name="src">The ScaleTicks instance to copy the contents from.</param>
 public virtual void Assign(ScaleTicks src)
 {
     Length = src.Length;
     Width  = src.Width;
     Color  = src.Color;
 }