SubGlyph.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #region MIT License
  2. /*Copyright (c) 2012 Robert Rouhani <robert.rouhani@gmail.com>
  3. SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team
  4. Permission is hereby granted, free of charge, to any person obtaining a copy of
  5. this software and associated documentation files (the "Software"), to deal in
  6. the Software without restriction, including without limitation the rights to
  7. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  8. of the Software, and to permit persons to whom the Software is furnished to do
  9. so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in all
  11. copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  18. SOFTWARE.*/
  19. #endregion
  20. using System;
  21. using System.Runtime.InteropServices;
  22. namespace SharpFont
  23. {
  24. /// <summary>
  25. /// The subglyph structure is an internal object used to describe subglyphs (for example, in the case of
  26. /// composites).
  27. /// </summary>
  28. /// <remarks><para>
  29. /// The subglyph implementation is not part of the high-level API, hence the forward structure declaration.
  30. /// </para><para>
  31. /// You can however retrieve subglyph information with <see cref="GlyphSlot.GetSubGlyphInfo"/>.
  32. /// </para></remarks>
  33. public sealed class SubGlyph
  34. {
  35. #region Fields
  36. private IntPtr reference;
  37. #endregion
  38. #region Constructors
  39. internal SubGlyph(IntPtr reference)
  40. {
  41. Reference = reference;
  42. }
  43. internal SubGlyph(IntPtr reference, int offset)
  44. {
  45. Reference = new IntPtr(reference.ToInt64() + offset);
  46. }
  47. #endregion
  48. #region Properties
  49. internal IntPtr Reference
  50. {
  51. get
  52. {
  53. return reference;
  54. }
  55. set
  56. {
  57. reference = value;
  58. }
  59. }
  60. #endregion
  61. }
  62. }