Guest User

Untitled

a guest
Dec 12th, 2017
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. Notation
  2.  
  3. +----+ +=========+
  4. | | One Byte | | Multiple bytes
  5. +----+ +=========+
  6.  
  7. 0 1
  8. +--------+--------+
  9. |00001000|00000010|
  10. +--------+--------+
  11. ^ ^
  12. | |
  13. | + less significant byte = 2
  14. + more significant byte = 8 × 256
  15.  
  16. +--.--.--.--.--.--.--.--+
  17. | : : : : : : : | Bits in one byte
  18. +--'--'--'--'--'--'--'--+
  19.  
  20. Contour Layer
  21.  
  22. +---+---+=========+===========+===========+======================+
  23. |nPoints| Flags | XData | YData | Poly Data |
  24. +---+---+=========+===========+===========+======================+
  25.  
  26. Flags array
  27.  
  28. Array of flags for each point in the outline. See below for details
  29. regarding the number of flag array elements.
  30.  
  31. +--.--.--.--.--.--.--.--+ - - - - - - - - - - - - +
  32. |SC:RP: XT : YT : ZT | Repeat Number (RP = 1) |
  33. +--'--'--'--'--'--'--'--+ - - - - - - - - - - - - +
  34.  
  35. + ZT : The type of this point. The valid numbers are:
  36. - 00 : On-curve point
  37. - 01 : Quadratic off-curve point
  38. - 10 : Cubic beginning off-curve point
  39. - 11 : Cubic ending off-curve point
  40. + XT and YT : The type of dX and dY data. The valid numbers are:
  41. - 00 : The dX or dY is zero. No bytes needed.
  42. - 01 : The dX or dY is encoded with two bytes, as a signed short.
  43. - 10 : The dX or dY is encoded with one byte, as a byte, and the sign of
  44. this entry is positive.
  45. - 11 : The dX or dY is encoded with one byte, as a byte, and the sign of
  46. this entry is negative.
  47. + SC : This point is a beginning point of a contour. Only points with
  48. ZT = 00 or ZT = 01 could set this flag to on.
  49. + RP : Repeat this flag for N additional points, while N is provided in the
  50. next byte.
  51.  
  52. XData and YData
  53.  
  54. Contour point X and Y coordinates. See below for details regarding the
  55. number of coordinate array elements. Coordinate for the first point is
  56. relative to (0,0); others are relative to previous point.
  57.  
  58. Poly Data
  59.  
  60. +----+----+===========+==================================+
  61. | Header | Masters | Packed per-master variation data |
  62. +----+----+===========+==================================+
  63.  
  64. + Header : A packed field with:
  65.  
  66. +---.-.-.-.-.-.-.-+-.-.-.-.-.-.-.-+
  67. |LMN: Number of masters |
  68. +---'-'-'-'-'-'-'-+-'-'-'-'-'-'-'-+
  69.  
  70. - LMN : Whether the master indeces in the "Masters" segment being uint32s.
  71. - Number of masters : A 15-bit unsigned integer indicating the number of
  72. masters for this layer.
  73. + Masters : An array of uint16 or uint32s (determined by the LMN field in
  74. the Header), representing master IDs
  75. + Shared points : Optional (determined by SPZ). When present, a PointList is
  76. placed here to indicate the points being affected by variations.
  77. + Packed per-master variation data:
  78.  
  79. +===============+==============+==============+==============+
  80. | Point numbers | X delta data | Y delta data | Link data |
  81. +===============+==============+==============+==============+
  82.  
  83. For "Point numbers", "X delta data" and "Y delta data", See the current
  84. definition in GVAR, however the "Point number" list now indicates the
  85. points that its "whether touch" flag being flipped in this master.
  86.  
  87. The "Link data" is used to represent "early" linking/IPs.
  88.  
  89. +----+----+=======================+
  90. | nTerms | Link/IP Reclord list |
  91. +----+----+=======================+
  92.  
  93. Link/IP Reclord
  94. +-.-.-.-.-.-.-.-+----+----+------+------+...
  95. |0:Y: nFollow-1 | refPtid | followPtId ... (Linking)
  96. +-'-'-'-'-'-'-'-+----+----+------+------+...
  97. ^
  98. |
  99. }-- Link/Interpolate X coordinate (0) or Y coordinate (1)
  100. |
  101. v
  102. +-.-.-.-.-.-.-.-+----+----+----+----+------+------+...
  103. |1:Y: nFollow-1 | rupPtid | rdnPtid | followPtId ... (Interpolate)
  104. +-'-'-'-'-'-'-'-+----+----+----+----+------+------+...
  105.  
  106. An IUP is performed after reading each tuple.
  107.  
  108. Reference Layer
  109.  
  110. |<-- Optional -->|
  111. +----+----+-------+--+--+--+--+--+--+--+--+--+--+--+--+===============+
  112. | GID | Flags | X | Y | a | b | c | d | Ref Poly data |
  113. +----+----+-------+--+--+--+--+--+--+--+--+--+--+--+--+===============+
  114.  
  115. + GID : The index of reference
  116. + Flags :
  117.  
  118. +---.---.---.---.---.---.---.---+
  119. | RESERVED :TFM:RND|
  120. +---'---'---'---'---'---'---'---+
  121.  
  122. - TFM : Whether the transformation terms (a, b, c, d) are provided.
  123. - RND : Whether round this reference to grid.
  124. - Ref Poly data : Identical to contour poly data, excluding:
  125. - IUP mechanism.
  126. - The point numbers entries are useless, since we are always modifying
  127. the point attaches this reference.
Add Comment
Please, Sign In to add comment