afpdev / alpheusafpparser

Library & parser for IBM Advanced Function Presentation (AFP) document/print stream format
GNU General Public License v3.0
16 stars 11 forks source link

GOCA : Window Specification. XLWIND, XRWIND, YBWIND and YTWIND should be short type #19

Open RaphC opened 7 years ago

RaphC commented 7 years ago

Hi,

The XLWIND, XRWIND, YBWIND and YTWIND Window Specification attributes are int typed. If we looked at spec it seems to be short typed rather.

12–13|SBIN|XLWIND|X'8000'–X'7FFF', see note| Xg coordinate for left edge of GPS window 14–15|SBIN|XRWIND|X'8000'–X'7FFF',see note| Xg coordinate for right edge of GPS window 16–17|SBIN|YBWIND|X'8000'–X'7FFF', see note| Yg coordinate for bottom edge of GPS window 18–19|SBIN|YTWIND|X'8000'–X'7FFF', see note| Yg coordinate for top edge of GPS window

Note: The complete range is valid, and assumes a measurement unit of 1/1440 inch. That is, the measurement base is ten inches, and the Xg, Yg units per unit base are 14400.

GOCA (http://afpcinc.org/wp-content/uploads/2016/08/AFP-GOCA-Reference-Graphics-Object-Content-Architecture-for-AFP-Reference.pdf) p. 158

afpdev commented 7 years ago

Hi, thank you again. You are right. It is in fact one of this rare cases where AFP is using signed short(-32768 to 32767). I will fix this bug and include it in the next update on 2nd of July.