Package 

Class SideOptimizationPointAccepter

  • All Implemented Interfaces:
    org.osmdroid.util.PointAccepter

    
    public class SideOptimizationPointAccepter
     implements PointAccepter
                        

    PointAccepter that simplifies the list of consecutive points with the same X or Y. One goal is to have faster Path rendering. As we clip the Path with a rectangle, additional segments are created by SegmentClipper. When most of the Polygon is out of the screen, many consecutive segments are on the same side of the clip rectangle (e.g. same X or same Y). Do we need to render all those segments? No. We can simplify this list of consecutive segments into a tiny list of maximum 3 segments. And that makes the Path rendering much faster.

    • Method Summary

      Modifier and Type Method Description
      void init()
      void add(long pX, long pY)
      void end()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SideOptimizationPointAccepter

        SideOptimizationPointAccepter(PointAccepter pPointAccepter)
        We optimize on top of another PointAccepter
    • Method Detail

      • add

         void add(long pX, long pY)
      • end

         void end()