• 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Internal: Draw paths
#1
The path for a freehand annotation (draw or highlight) consists of a series of X,Y points.
I notice that:
  • The first and second point always are identical, and several other points are (also) duplicated. Is this due to the way the digitizer sends data?
  • Occasionally and out-of-band value occurs (IEEE 32-bitf MAX_FLOAT, or 0xFFFFFFFFFFFFFFFF) apparently to denote the end of a stroke, however, this is always followed by another point. Does this mean that 0xFFFFFFFFFFFFFFFF indicates to end the stroke at the next point?
Thanks,
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#2
If the first and second points are the same, that's just the result of what the digitizer sent me. As a side note, I go through the points array and remove redundant points, but I believe I only start doing that from the 2nd point on (which will make sense after the end of my explanation). MAX_FLOAT does denote the end of the stroke, but the point after it also belongs to the same stroke. Why did I do it this way? I'm currently using a Path object, and I have to do a moveTo and lineTo with the first point and a lineTo with the last point, but everything in between is a quadTo. It just made it simpler to do moveTo on the first point, read until MAX_FLOAT, and then do a lineTo on the last point to complete the stroke in the Path object. From there, I can draw the next stroke if the array happens to contain more than one.
Reply
#3
Thanks for the explanation.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.