/// <summary> /// Initializes a new instance of the <see cref="AngleDirection"/> class /// using the data read from persistent storage. /// </summary> /// <param name="editDeserializer">The mechanism for reading back content.</param> internal AngleDirection(EditDeserializer editDeserializer) : base(editDeserializer) { m_Backsight = editDeserializer.ReadFeatureRef<PointFeature>(this, DataField.Backsight); m_From = editDeserializer.ReadFeatureRef<PointFeature>(this, DataField.From); m_Observation = editDeserializer.ReadRadians(DataField.Value); }
/// <summary> /// Initializes a new instance of the <see cref="TextRotationOperation"/> class /// using the data read from persistent storage. /// </summary> /// <param name="editDeserializer">The mechanism for reading back content.</param> internal TextRotationOperation(EditDeserializer editDeserializer) : base(editDeserializer) { RadianValue value = editDeserializer.ReadRadians(DataField.Value); m_Rotation = value.Radians; }
/// <summary> /// Initializes a new instance of the <see cref="AngleDirection"/> class /// using the data read from persistent storage. /// </summary> /// <param name="editDeserializer">The mechanism for reading back content.</param> internal AngleDirection(EditDeserializer editDeserializer) : base(editDeserializer) { m_Backsight = editDeserializer.ReadFeatureRef <PointFeature>(this, DataField.Backsight); m_From = editDeserializer.ReadFeatureRef <PointFeature>(this, DataField.From); m_Observation = editDeserializer.ReadRadians(DataField.Value); }
/// <summary> /// Reads data that was previously written using <see cref="WriteData"/> /// </summary> /// <param name="editDeserializer">The mechanism for reading back content.</param> /// <param name="font">The text style</param> /// <param name="position">Position of the text's reference point</param> /// <param name="height">The height of the text, in meters on the ground.</param> /// <param name="width">The total width of the text, in meters on the ground.</param> /// <param name="rotation">Clockwise rotation from horizontal</param> static void ReadData(EditDeserializer editDeserializer, out IFont font, out PointGeometry position, out float height, out float width, out IAngle rotation) { if (editDeserializer.IsNextField(DataField.Font)) { int fontId = editDeserializer.ReadInt32(DataField.Font); font = EnvironmentContainer.FindFontById(fontId); } else { font = null; } position = editDeserializer.ReadPointGeometry(DataField.X, DataField.Y); width = (float)editDeserializer.ReadDouble(DataField.Width); height = (float)editDeserializer.ReadDouble(DataField.Height); rotation = editDeserializer.ReadRadians(DataField.Rotation); }