public DxfText Defaults()
        {
            Thickness                   = 0.0;
            Layer                       = "0";
            Color                       = DxfDefaultColors.ByLayer.ColorToString();
            FirstAlignment              = new Vector3(0.0, 0.0, 0.0);
            TextHeight                  = 1.0;
            DefaultValue                = string.Empty;
            TextRotation                = 0.0;
            ScaleFactorX                = 1.0;
            ObliqueAngle                = 0.0;
            TextStyle                   = "Standard";
            TextGenerationFlags         = DxfTextGenerationFlags.Default;
            HorizontalTextJustification = DxfHorizontalTextJustification.Default;
            SecondAlignment             = new Vector3(0.0, 0.0, 0.0);;
            ExtrusionDirection          = new Vector3(0.0, 0.0, 1.0);
            VerticalTextJustification   = DxfVerticalTextJustification.Default;

            return(this);
        }
        public DxfAttrib Defaults()
        {
            Thickness                   = 0.0;
            Layer                       = "0";
            StartPoint                  = new Vector3(0.0, 0.0, 0.0);
            TextHeight                  = 1.0;
            DefaultValue                = string.Empty;
            TextRotation                = 0.0;
            ScaleFactorX                = 1.0;
            ObliqueAngle                = 0.0;
            TextStyle                   = "Standard";
            TextGenerationFlags         = DxfTextGenerationFlags.Default;
            HorizontalTextJustification = DxfHorizontalTextJustification.Default;
            AlignmentPoint              = new Vector3(0.0, 0.0, 0.0);;
            ExtrusionDirection          = new Vector3(0.0, 0.0, 1.0);
            Tag                       = string.Empty;
            AttributeFlags            = DxfAttributeFlags.Default;
            FieldLength               = 0;
            VerticalTextJustification = DxfVerticalTextJustification.Default;

            return(this);
        }
Example #3
0
 protected override void Initialize()
 {
     base.Initialize();
     this.Thickness = 0.0;
     this.Location = DxfPoint.Origin;
     this.TextHeight = 1.0;
     this.Value = null;
     this.Rotation = 0;
     this.RelativeXScaleFactor = 1.0;
     this.ObliqueAngle = 0.0;
     this.TextStyleName = "STANDARD";
     this.TextGenerationFlags = 0;
     this.HorizontalTextJustification = DxfHorizontalTextJustification.Left;
     this.SecondAlignmentPoint = DxfPoint.Origin;
     this.Normal = DxfVector.ZAxis;
     this.VerticalTextJustification = DxfVerticalTextJustification.Baseline;
 }
Example #4
0
        internal override bool TrySetPair(DxfCodePair pair)
        {
            switch (pair.Code)
            {
                case 1:
                    this.Value = (pair.StringValue);
                    break;
                case 7:
                    this.TextStyleName = (pair.StringValue);
                    break;
                case 10:
                    this.Location.X = pair.DoubleValue;
                    break;
                case 20:
                    this.Location.Y = pair.DoubleValue;
                    break;
                case 30:
                    this.Location.Z = pair.DoubleValue;
                    break;
                case 11:
                    this.SecondAlignmentPoint.X = pair.DoubleValue;
                    break;
                case 21:
                    this.SecondAlignmentPoint.Y = pair.DoubleValue;
                    break;
                case 31:
                    this.SecondAlignmentPoint.Z = pair.DoubleValue;
                    break;
                case 39:
                    this.Thickness = (pair.DoubleValue);
                    break;
                case 40:
                    this.TextHeight = (pair.DoubleValue);
                    break;
                case 41:
                    this.RelativeXScaleFactor = (pair.DoubleValue);
                    break;
                case 50:
                    this.Rotation = (pair.DoubleValue);
                    break;
                case 51:
                    this.ObliqueAngle = (pair.DoubleValue);
                    break;
                case 71:
                    this.TextGenerationFlags = (int)(pair.ShortValue);
                    break;
                case 72:
                    this.HorizontalTextJustification = (DxfHorizontalTextJustification)(pair.ShortValue);
                    break;
                case 73:
                    this.VerticalTextJustification = (DxfVerticalTextJustification)(pair.ShortValue);
                    break;
                case 210:
                    this.Normal.X = pair.DoubleValue;
                    break;
                case 220:
                    this.Normal.Y = pair.DoubleValue;
                    break;
                case 230:
                    this.Normal.Z = pair.DoubleValue;
                    break;
                default:
                    return base.TrySetPair(pair);
            }

            return true;
        }