PageRenderTime 47ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/GPX.Firemap.Desktop/GPX.Firemap.Desktop.CustomLayers/GraticuleCustomLayers/GraticuleCustomLayers/CustomLayers/GDA94GraticuleCustomLayer.cs

https://bitbucket.org/shope/dfu
C# | 602 lines | 389 code | 81 blank | 132 comment | 39 complexity | b40caeb03a0685d08cdfe808fd3a24a6 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using ESRI.ArcGIS.ADF;
  6. using ESRI.ArcGIS.ArcMapUI;
  7. using ESRI.ArcGIS.Carto;
  8. using ESRI.ArcGIS.Display;
  9. using ESRI.ArcGIS.esriSystem;
  10. using ESRI.ArcGIS.Geometry;
  11. using ESRI.ArcGIS.Geodatabase;
  12. namespace GraticuleCustomLayers
  13. {
  14. [Guid("0f67adc8-eb7d-4fea-b982-40b48ab3aab0")]
  15. [ClassInterface(ClassInterfaceType.None)]
  16. [ProgId("GraticuleCustomLayers.GDA94GraticuleCustomLayer")]
  17. public class GDA94GraticuleCustomLayer : ILayer, IGeoDataset, IPersistVariant
  18. {
  19. #region Module Level Variables and Constants
  20. // The following intervals are whole degree, minute and seconds values (converted to DD).
  21. // Whole DMS values must be used to ensure the graticule line coordinates and labels match.
  22. private const string GraticuleIntervals = "100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2," +
  23. "1,0.833333333,0.666666667,0.5,0.333333333,0.166666667,0.133333333,0.1,0.066666667,0.033333333,0.016666667," +
  24. "0.013888889,0.011111111,0.008333333,0.005555556,0.002777778,0.002222222,0.001666667,0.001111111,0.000555556,0.000277778";
  25. // The default (approximate) number of graticule lines to be drawn on the map
  26. private const int DefaultMaxNumberOfGraticuleLines = 4;
  27. // The default densify value used when densifying lines prior to projecting a line
  28. private const int DensifySegmentCount = 50;
  29. /// <summary>
  30. /// Name of the layer
  31. /// </summary>
  32. public static readonly string LayerName = "GDA94 Graticule";
  33. /// <summary>
  34. /// Indicates if the layer needs its own display cache.
  35. /// </summary>
  36. private bool m_isCached = false;
  37. /// <summary>
  38. /// Indicates if the layer is currently visible.
  39. /// </summary>
  40. private bool m_visible = true;
  41. /// <summary>
  42. /// Describes the area of interest of the layer.
  43. /// </summary>
  44. private IEnvelope m_areaOfInterest = SpatialReferenceStore.Instance.ExtentGeographic;
  45. #endregion
  46. #region Constructors
  47. // None
  48. #endregion
  49. #region ILayer Members
  50. /// <summary>
  51. /// The default area of interest for the layer.
  52. /// </summary>
  53. public IEnvelope AreaOfInterest
  54. {
  55. get
  56. {
  57. return m_areaOfInterest;
  58. }
  59. }
  60. /// <summary>
  61. /// Indicates if the layer needs its own display cache.
  62. /// </summary>
  63. public bool Cached
  64. {
  65. get
  66. {
  67. return m_isCached;
  68. }
  69. set
  70. {
  71. m_isCached = value;
  72. }
  73. }
  74. /// <summary>
  75. /// Draws the layer to the specified display for the given draw phase.
  76. /// </summary>
  77. /// <param name="DrawPhase"></param>
  78. /// <param name="Display"></param>
  79. /// <param name="TrackCancel"></param>
  80. public void Draw(esriDrawPhase DrawPhase, IDisplay Display, ITrackCancel TrackCancel)
  81. {
  82. System.Diagnostics.Debug.WriteLine("GraticuleDrawEvent");
  83. using (ComReleaser comReleaser = new ComReleaser())
  84. {
  85. // Make sure we can proceed, if not exit
  86. if (!Valid || !Visible) { return; }
  87. // Get the display transformation and spatial references
  88. IDisplayTransformation displayTranformation = Display.DisplayTransformation;
  89. ISpatialReference displaySpatialReference = displayTranformation.SpatialReference;
  90. comReleaser.ManageLifetime(displaySpatialReference);
  91. if (SpatialReferenceStore.IsUnknownSpatialReference(displaySpatialReference)) { return; }
  92. ISpatialReference graticuleSpatialReference = displayTranformation.SpatialReference;
  93. comReleaser.ManageLifetime(graticuleSpatialReference);
  94. if ((displaySpatialReference as IProjectedCoordinateSystem) != null)
  95. {
  96. graticuleSpatialReference = (ISpatialReference)((IProjectedCoordinateSystem)displaySpatialReference).GeographicCoordinateSystem;
  97. comReleaser.ManageLifetime(graticuleSpatialReference);
  98. }
  99. // Get the bounds of the map.
  100. IEnvelope mapBounds = displayTranformation.FittedBounds;
  101. // Get the list of lines and label points to be displayed (calculated in graticule coords, returned in display coords)
  102. List<GraticuleLine> graticuleLines = CalculateGraticuleLines(mapBounds, displaySpatialReference, graticuleSpatialReference);
  103. // Draw the lines
  104. Display.SetSymbol((ISymbol)GraticuleGraphics.GDA94GraticuleLineSymbol);
  105. foreach (GraticuleLine graticuleLine in graticuleLines)
  106. {
  107. Display.DrawPolyline((IGeometry)graticuleLine.Line);
  108. }
  109. // Draw the labels
  110. ITextSymbol textSymbol = GraticuleGraphics.GDA94GraticuleTextSymbol;
  111. foreach (GraticuleLine graticuleLine in graticuleLines)
  112. {
  113. foreach (GraticuleLabelPoint graticuleLabelPoint in graticuleLine.LabelPoints)
  114. {
  115. // Set the properties of the text symbol based on the properties of the label point
  116. textSymbol.HorizontalAlignment = graticuleLabelPoint.HorizontalAlignment;
  117. textSymbol.VerticalAlignment = graticuleLabelPoint.VerticalAlignment;
  118. textSymbol.Text = graticuleLabelPoint.Text;
  119. // Work out the extent of the label to be drawn
  120. IEnvelope boundsEnv = new EnvelopeClass();
  121. comReleaser.ManageLifetime(boundsEnv);
  122. ((IQueryGeometry)textSymbol).QueryEnvelope(Display.hDC, (ITransformation)displayTranformation, (IGeometry)graticuleLabelPoint.AnchorPoint, boundsEnv);
  123. // Do some calcs to make sure we only draw lables that not too close to the corners of the display.
  124. bool draw = false;
  125. if (textSymbol.VerticalAlignment == esriTextVerticalAlignment.esriTVATop ||
  126. textSymbol.VerticalAlignment == esriTextVerticalAlignment.esriTVABottom) // Longiture labels
  127. {
  128. if (boundsEnv.XMin > mapBounds.XMin && boundsEnv.XMax < mapBounds.XMax)
  129. {
  130. draw = true;
  131. }
  132. }
  133. else // Latitude labels
  134. {
  135. if ((mapBounds.YMax - boundsEnv.YMax) > boundsEnv.Height &&
  136. (boundsEnv.YMin - mapBounds.YMin) > boundsEnv.Height)
  137. {
  138. draw = true;
  139. }
  140. }
  141. // If the label is to be drawn, the draw it
  142. if (draw)
  143. {
  144. Display.SetSymbol((ISymbol)textSymbol);
  145. Display.DrawText((IGeometry)graticuleLabelPoint.AnchorPoint, graticuleLabelPoint.Text);
  146. }
  147. ComReleaser.ReleaseCOMObject(graticuleLabelPoint.AnchorPoint);
  148. }
  149. ComReleaser.ReleaseCOMObject(graticuleLine.Line);
  150. }
  151. }
  152. }
  153. /// <summary>
  154. /// Maximum scale (representative fraction) at which the layer will display.
  155. /// </summary>
  156. public double MaximumScale
  157. {
  158. get
  159. {
  160. return default(double);
  161. }
  162. set
  163. {
  164. // Setting MaximumScale does nothing
  165. }
  166. }
  167. /// <summary>
  168. /// Minimum scale (representative fraction) at which the layer will display.
  169. /// </summary>
  170. public double MinimumScale
  171. {
  172. get
  173. {
  174. return default(double);
  175. }
  176. set
  177. {
  178. // Setting MinimumScale does nothing
  179. }
  180. }
  181. /// <summary>
  182. /// Layer name.
  183. /// </summary>
  184. public string Name
  185. {
  186. get
  187. {
  188. return LayerName;
  189. }
  190. set
  191. {
  192. // Setting Name does nothing
  193. }
  194. }
  195. /// <summary>
  196. /// Indicates if the layer shows map tips.
  197. /// </summary>
  198. public bool ShowTips
  199. {
  200. get
  201. {
  202. return default(bool);
  203. }
  204. set
  205. {
  206. // Setting ShowTips does nothing
  207. }
  208. }
  209. /// <summary>
  210. /// Spatial reference for the layer.
  211. /// </summary>
  212. public ISpatialReference SpatialReference
  213. {
  214. set
  215. {
  216. // Setting SpatialReference does nothing
  217. }
  218. }
  219. /// <summary>
  220. /// Supported draw phases.
  221. /// </summary>
  222. public int SupportedDrawPhases
  223. {
  224. get
  225. {
  226. return (int)esriDrawPhase.esriDPGeography;
  227. }
  228. }
  229. /// <summary>
  230. /// Indicates if the layer is currently valid.
  231. /// </summary>
  232. public bool Valid
  233. {
  234. get
  235. {
  236. return true;
  237. }
  238. }
  239. /// <summary>
  240. /// Indicates if the layer is currently visible.
  241. /// </summary>
  242. public bool Visible
  243. {
  244. get
  245. {
  246. return m_visible;
  247. }
  248. set
  249. {
  250. m_visible = value;
  251. }
  252. }
  253. /// <summary>
  254. /// Get_s the tip text.
  255. /// </summary>
  256. /// <param name="x">The x.</param>
  257. /// <param name="y">The y.</param>
  258. /// <param name="Tolerance">The tolerance.</param>
  259. public string get_TipText(double x, double y, double Tolerance)
  260. {
  261. return default(string);
  262. }
  263. #endregion
  264. #region IGeoDataset Members
  265. IEnvelope IGeoDataset.Extent
  266. {
  267. get { return m_areaOfInterest; }
  268. }
  269. ISpatialReference IGeoDataset.SpatialReference
  270. {
  271. get { return m_areaOfInterest.SpatialReference; }
  272. }
  273. #endregion
  274. #region IPersistVariant Members
  275. public ESRI.ArcGIS.esriSystem.UID ID
  276. {
  277. get
  278. {
  279. UID typeID = new UIDClass();
  280. typeID.Value = GetType().GUID.ToString("B");
  281. return typeID;
  282. }
  283. }
  284. public void Load(ESRI.ArcGIS.esriSystem.IVariantStream Stream)
  285. {
  286. // TODO: Add ArcGISClass1.Load implementation
  287. }
  288. public void Save(ESRI.ArcGIS.esriSystem.IVariantStream Stream)
  289. {
  290. // TODO: Add ArcGISClass1.Save implementation
  291. }
  292. #endregion
  293. #region Static Helper Methods
  294. /// <summary>
  295. /// Calculates the graticule lines.
  296. /// </summary>
  297. /// <param name="displayBounds">The display bounds.</param>
  298. /// <param name="displaySpatialReference">The display spatial reference.</param>
  299. /// <param name="graticuleSpatialReference">The graticule spatial reference.</param>
  300. /// <returns>A list of GraticuleLine DTOs</returns>
  301. private static List<GraticuleLine> CalculateGraticuleLines(IEnvelope displayBounds, ISpatialReference displaySpatialReference, ISpatialReference graticuleSpatialReference)
  302. {
  303. using (ComReleaser comReleaser = new ComReleaser())
  304. {
  305. // Project the display bounds and slightly expanded display bounds into graticule coordinates
  306. IEnvelope graticuleBounds = (IEnvelope)ProjectionMethods.ProjectCopy(displayBounds, graticuleSpatialReference);
  307. comReleaser.ManageLifetime(graticuleBounds);
  308. IEnvelope graticuleBoundsExpanded = (IEnvelope)ProjectionMethods.ProjectCopy(displayBounds, graticuleSpatialReference);
  309. comReleaser.ManageLifetime(graticuleBoundsExpanded);
  310. graticuleBoundsExpanded.Expand(1.25, 1.25, true);
  311. // Get the edges of the display bounds in display coordinates
  312. object missing = Type.Missing;
  313. IPointCollection displayBoundsTopEdge = new PolylineClass();
  314. comReleaser.ManageLifetime(displayBoundsTopEdge);
  315. ((IPolyline)displayBoundsTopEdge).SpatialReference = displaySpatialReference;
  316. displayBoundsTopEdge.AddPoint(displayBounds.UpperLeft, ref missing, ref missing);
  317. displayBoundsTopEdge.AddPoint(displayBounds.UpperRight, ref missing, ref missing);
  318. IPointCollection displayBoundsBottomEdge = new PolylineClass();
  319. comReleaser.ManageLifetime(displayBoundsBottomEdge);
  320. ((IPolyline)displayBoundsBottomEdge).SpatialReference = displaySpatialReference;
  321. displayBoundsBottomEdge.AddPoint(displayBounds.LowerLeft, ref missing, ref missing);
  322. displayBoundsBottomEdge.AddPoint(displayBounds.LowerRight, ref missing, ref missing);
  323. IPointCollection displayBoundsLeftEdge = new PolylineClass();
  324. comReleaser.ManageLifetime(displayBoundsLeftEdge);
  325. ((IPolyline)displayBoundsLeftEdge).SpatialReference = displaySpatialReference;
  326. displayBoundsLeftEdge.AddPoint(displayBounds.LowerLeft, ref missing, ref missing);
  327. displayBoundsLeftEdge.AddPoint(displayBounds.UpperLeft, ref missing, ref missing);
  328. IPointCollection displayBoundsRightEdge = new PolylineClass();
  329. comReleaser.ManageLifetime(displayBoundsRightEdge);
  330. ((IPolyline)displayBoundsRightEdge).SpatialReference = displaySpatialReference;
  331. displayBoundsRightEdge.AddPoint(displayBounds.LowerRight, ref missing, ref missing);
  332. displayBoundsRightEdge.AddPoint(displayBounds.UpperRight, ref missing, ref missing);
  333. // Work out the display intervals of the graticule lines in graticule coordinates
  334. double[] intervals = System.Array.ConvertAll<string, double>(GDA94GraticuleCustomLayer.GraticuleIntervals.Split(Convert.ToChar(",")),
  335. delegate(string str) { return double.Parse(str); });
  336. double longitudeActualInterval = (graticuleBounds.Width / Convert.ToDouble(DefaultMaxNumberOfGraticuleLines));
  337. double latitudeActualInterval = (graticuleBounds.Height / Convert.ToDouble(DefaultMaxNumberOfGraticuleLines));
  338. double longitudeDisplayInterval = intervals.OrderBy(n => Math.Abs(longitudeActualInterval - n)).ElementAt(0); // Finds closest value in the interval array
  339. double latitudeDisplayInterval = intervals.OrderBy(n => Math.Abs(latitudeActualInterval - n)).ElementAt(0); // Finds closest value in the interval array
  340. // Work out the start positions of the graticule lines in graticule coordinates
  341. double longitudeLeft = (Math.Ceiling(graticuleBounds.XMin / longitudeDisplayInterval) * longitudeDisplayInterval);
  342. double latitudeBottom = (Math.Ceiling(graticuleBounds.YMin / latitudeDisplayInterval) * latitudeDisplayInterval);
  343. // Create the graticule lines (extend to expanded bounds), project back to the display coordinates and calculate label points
  344. List<GraticuleLine> graticuleLines = new List<GraticuleLine>();
  345. for (double i = longitudeLeft; i <= graticuleBounds.XMax; i += longitudeDisplayInterval)
  346. {
  347. if (i >= -180D && i <= 180D && graticuleBounds.YMin <= 90D && graticuleBounds.YMax >= -90D)
  348. {
  349. IPoint longitudeLineStart = new PointClass();
  350. comReleaser.ManageLifetime(longitudeLineStart);
  351. IPoint longitudeLineEnd = new PointClass();
  352. comReleaser.ManageLifetime(longitudeLineEnd);
  353. longitudeLineStart.PutCoords(i, graticuleBoundsExpanded.YMin);
  354. longitudeLineEnd.PutCoords(i, graticuleBoundsExpanded.YMax);
  355. IPolyline longitudeLine = new PolylineClass();
  356. longitudeLine.SpatialReference = graticuleSpatialReference;
  357. longitudeLine.FromPoint = longitudeLineStart;
  358. longitudeLine.ToPoint = longitudeLineEnd;
  359. ((IPolycurve)longitudeLine).Densify(longitudeLine.Length / Convert.ToDouble(GDA94GraticuleCustomLayer.DensifySegmentCount), 0);
  360. longitudeLine = (IPolyline)ProjectionMethods.Project((IGeometry)longitudeLine, displaySpatialReference);
  361. // Intersect the lines with the display bounds (top and bottom)
  362. List<GraticuleLabelPoint> graticuleLabelPoints = new List<GraticuleLabelPoint>();
  363. IGeometry topLabelPoint = ((ITopologicalOperator)longitudeLine).Intersect((IGeometry)displayBoundsTopEdge, esriGeometryDimension.esriGeometry0Dimension);
  364. if ((topLabelPoint as IMultipoint) != null && ((IPointCollection)topLabelPoint).PointCount == 1)
  365. {
  366. graticuleLabelPoints.Add(new GraticuleLabelPoint(((IPointCollection)topLabelPoint).get_Point(0),
  367. esriTextHorizontalAlignment.esriTHACenter, esriTextVerticalAlignment.esriTVATop, LatLongCoordinateFormatter.ConvertLongitudeDDtoDMS(i)));
  368. }
  369. IGeometry bottomLabelPoint = ((ITopologicalOperator)longitudeLine).Intersect((IGeometry)displayBoundsBottomEdge, esriGeometryDimension.esriGeometry0Dimension);
  370. if ((bottomLabelPoint as IMultipoint) != null && ((IPointCollection)bottomLabelPoint).PointCount == 1)
  371. {
  372. graticuleLabelPoints.Add(new GraticuleLabelPoint(((IPointCollection)bottomLabelPoint).get_Point(0),
  373. esriTextHorizontalAlignment.esriTHACenter, esriTextVerticalAlignment.esriTVABottom, LatLongCoordinateFormatter.ConvertLongitudeDDtoDMS(i)));
  374. }
  375. graticuleLines.Add(new GraticuleLine(longitudeLine, graticuleLabelPoints));
  376. }
  377. }
  378. for (double i = latitudeBottom; i <= graticuleBounds.YMax; i += latitudeDisplayInterval)
  379. {
  380. if (i >= -90D && i <= 90D && graticuleBounds.XMin <= 180D && graticuleBounds.XMax >= -180D)
  381. {
  382. IPoint latitudeLineStart = new PointClass();
  383. comReleaser.ManageLifetime(latitudeLineStart);
  384. IPoint latitudeLineEnd = new PointClass();
  385. comReleaser.ManageLifetime(latitudeLineEnd);
  386. latitudeLineStart.PutCoords(graticuleBoundsExpanded.XMin, i);
  387. latitudeLineEnd.PutCoords(graticuleBoundsExpanded.XMax, i);
  388. IPolyline latitudeLine = new PolylineClass();
  389. latitudeLine.SpatialReference = graticuleSpatialReference;
  390. latitudeLine.FromPoint = latitudeLineStart;
  391. latitudeLine.ToPoint = latitudeLineEnd;
  392. ((IPolycurve)latitudeLine).Densify(latitudeLine.Length / Convert.ToDouble(GDA94GraticuleCustomLayer.DensifySegmentCount), 0);
  393. latitudeLine = (IPolyline)ProjectionMethods.Project((IGeometry)latitudeLine, displaySpatialReference);
  394. // Intersect the lines with the display bounds (top and bottom)
  395. List<GraticuleLabelPoint> graticuleLabelPoints = new List<GraticuleLabelPoint>();
  396. IGeometry leftLabelPoint = ((ITopologicalOperator)latitudeLine).Intersect((IGeometry)displayBoundsLeftEdge, esriGeometryDimension.esriGeometry0Dimension);
  397. if ((leftLabelPoint as IMultipoint) != null && ((IPointCollection)leftLabelPoint).PointCount == 1)
  398. {
  399. graticuleLabelPoints.Add(new GraticuleLabelPoint(((IPointCollection)leftLabelPoint).get_Point(0),
  400. esriTextHorizontalAlignment.esriTHALeft, esriTextVerticalAlignment.esriTVACenter, LatLongCoordinateFormatter.ConvertLatitudeDDtoDMS(i)));
  401. }
  402. IGeometry rightLabelPoint = ((ITopologicalOperator)latitudeLine).Intersect((IGeometry)displayBoundsRightEdge, esriGeometryDimension.esriGeometry0Dimension);
  403. if ((rightLabelPoint as IMultipoint) != null && ((IPointCollection)rightLabelPoint).PointCount == 1)
  404. {
  405. graticuleLabelPoints.Add(new GraticuleLabelPoint(((IPointCollection)rightLabelPoint).get_Point(0),
  406. esriTextHorizontalAlignment.esriTHARight, esriTextVerticalAlignment.esriTVACenter, LatLongCoordinateFormatter.ConvertLatitudeDDtoDMS(i)));
  407. }
  408. graticuleLines.Add(new GraticuleLine(latitudeLine, graticuleLabelPoints));
  409. }
  410. }
  411. return graticuleLines;
  412. }
  413. }
  414. #endregion
  415. #region Data Transfer Objects
  416. /// <summary>
  417. /// Class to hold details of a graticule line
  418. /// </summary>
  419. private class GraticuleLine
  420. {
  421. #region Module Level Variables
  422. private IPolyline _line;
  423. private List<GraticuleLabelPoint> _labelPoints;
  424. #endregion
  425. #region Constructors
  426. /// <summary>
  427. /// Initializes a new instance of the <see cref="GraticuleLine"/> class.
  428. /// </summary>
  429. /// <param name="line">The line.</param>
  430. /// <param name="labelPoints">The label points.</param>
  431. public GraticuleLine(IPolyline line, List<GraticuleLabelPoint> labelPoints)
  432. {
  433. _line = line;
  434. _labelPoints = labelPoints;
  435. }
  436. #endregion
  437. #region Properties
  438. /// <summary>
  439. /// Gets the line.
  440. /// </summary>
  441. /// <value>The line.</value>
  442. public IPolyline Line
  443. {
  444. get { return _line; }
  445. }
  446. /// <summary>
  447. /// Gets the label points.
  448. /// </summary>
  449. /// <value>The label points.</value>
  450. public List<GraticuleLabelPoint> LabelPoints
  451. {
  452. get { return _labelPoints; }
  453. }
  454. #endregion
  455. }
  456. /// <summary>
  457. /// Class to hold details of a graticule label point
  458. /// </summary>
  459. private class GraticuleLabelPoint
  460. {
  461. #region Module Level Variables
  462. private IPoint _anchorPoint;
  463. private esriTextHorizontalAlignment _horizontalAlignment;
  464. private esriTextVerticalAlignment _verticalAlignment;
  465. private string _text;
  466. #endregion
  467. #region Constructors
  468. /// <summary>
  469. /// Initializes a new instance of the <see cref="GraticuleLabelPoint"/> class.
  470. /// </summary>
  471. /// <param name="anchorPoint">The anchor point.</param>
  472. /// <param name="horizontalAlignment">The horizontal alignment.</param>
  473. /// <param name="verticalAlignment">The vertical alignment.</param>
  474. /// <param name="text">The text.</param>
  475. public GraticuleLabelPoint(IPoint anchorPoint, esriTextHorizontalAlignment horizontalAlignment,
  476. esriTextVerticalAlignment verticalAlignment, string text)
  477. {
  478. _anchorPoint = anchorPoint;
  479. _horizontalAlignment = horizontalAlignment;
  480. _verticalAlignment = verticalAlignment;
  481. _text = text;
  482. }
  483. #endregion
  484. #region Properties
  485. /// <summary>
  486. /// Gets the anchor point.
  487. /// </summary>
  488. /// <value>The anchor point.</value>
  489. public IPoint AnchorPoint
  490. {
  491. get { return _anchorPoint; }
  492. }
  493. /// <summary>
  494. /// Gets the horizontal alignment.
  495. /// </summary>
  496. /// <value>The horizontal alignment.</value>
  497. public esriTextHorizontalAlignment HorizontalAlignment
  498. {
  499. get { return _horizontalAlignment; }
  500. }
  501. /// <summary>
  502. /// Gets the vertical alignment.
  503. /// </summary>
  504. /// <value>The vertical alignment.</value>
  505. public esriTextVerticalAlignment VerticalAlignment
  506. {
  507. get { return _verticalAlignment; }
  508. }
  509. /// <summary>
  510. /// Gets the text.
  511. /// </summary>
  512. /// <value>The text.</value>
  513. public string Text
  514. {
  515. get { return _text; }
  516. }
  517. #endregion
  518. }
  519. #endregion
  520. }
  521. }