Пример #1
0
  /**
   * Draw the tracks to show our previous positions. If tracking is enabled, there is a linked list
   * of gps coordinates attached to this view with the most recent one at the end of that list.
   * Start at the end value to begin the drawing and as soon as we find one that is not in the range
   * of this display, we can assume that we're done.
   *
   * @param canvas
   * @param ctx
   */
  private void drawTracks(Canvas canvas, DrawingContext ctx) {
    /*
     * Some pre-conditions that would prevent us from drawing anything
     */
    if (mPref.isDrawTracks() && (null == mPointProjection)) {

      /*
       *  Set the brush color and width
       */
      mPaint.setColor(Color.CYAN);
      mPaint.setStrokeWidth(6 * mDipToPix);
      mPaint.setStyle(Paint.Style.FILL);

      mService
          .getKMLRecorder()
          .getShape()
          .drawShape(canvas, mOrigin, mScale, mMovement, mPaint, mPref.isNightMode(), true);
    }
  }