yy1717
2020-08-25 263442d45dfa1a1975fc622d04fa1a5e60c62f6e
app/src/main/java/safeluck/drive/evaluation/fragment/RoadDriveMapFragmentaa.java
@@ -874,7 +874,7 @@
        Log.d(TAG, String.format("DrawMapAll scale_x = %d 车头据 = %f", scale_x, Math.sqrt(Math.pow(car[0][0], 2) + Math.pow(car[0][1], 2))));
        canvas2.drawColor(Color.WHITE);
        canvas2.drawColor(Color.BLACK);
        // 画车轮
        paint.setStyle(Paint.Style.FILL_AND_STROKE);
@@ -889,20 +889,22 @@
        canvas2.drawCircle((float) (base_x + (car[tire.get(3)][0] - min_x) * scale_x), (float) (base_y + (car[tire.get(3)][1] - min_y) * scale_y), 2.5f, paint);
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(Color.BLACK);
        paint.setStrokeWidth(1.5f);
        paint.setColor(Color.GREEN);
        paint.setStrokeWidth(2.0f);
        Path path = new Path();
        Path carpath = new Path();
        // 画车体
        path.moveTo((float) (base_x + (car[body.get(0)][0] - min_x) * scale_x), (float) (base_y + (car[body.get(0)][1] - min_y) * scale_y));
        carpath.moveTo((float) (base_x + (car[body.get(0)][0] - min_x) * scale_x), (float) (base_y + (car[body.get(0)][1] - min_y) * scale_y));
        for (int i = 1; i < body.size(); i++){
//            Log.d(TAG, "for 循环 DrawMap to X = " + (float) (base_x + (car[body.get(i)][0] - min_x) * scale_x)+ " Y = " + (float) (base_y + (car[body.get(i)][1] - min_y) * scale_y));
            path.lineTo((float) (base_x + (car[body.get(i)][0] - min_x) * scale_x), (float) (base_y + (car[body.get(i)][1] - min_y) * scale_y));
            carpath.lineTo((float) (base_x + (car[body.get(i)][0] - min_x) * scale_x), (float) (base_y + (car[body.get(i)][1] - min_y) * scale_y));
        }
        path.close();
        carpath.close();
        canvas2.drawPath(path, paint);
        canvas2.drawPath(carpath, paint);
        Path path = new Path();
        // 画地图
        if (roadBeanList != null) {
@@ -915,8 +917,8 @@
                if (leftEdge != null) {
                    Log.d(TAG, "绘制左路沿");
                    paint.setStrokeWidth(2.0f);
                    paint.setColor(Color.BLUE);
                    paint.setStrokeWidth(3.0f);
                    paint.setColor(Color.YELLOW);
                    for (int y = 0; y < leftEdge.size(); y++) {
                        RoadExamMap2.RoadBean.EdgeBean edgeBean = leftEdge.get(y);
@@ -981,7 +983,7 @@
                if (rightEdge != null) {
                    Log.d(TAG, "绘制右路沿");
                    paint.setStrokeWidth(2.0f);
                    paint.setStrokeWidth(3.0f);
                    paint.setColor(Color.YELLOW);
                    for (int y = 0; y < rightEdge.size(); y++) {
@@ -1047,8 +1049,8 @@
                }
                List<List<List<RoadExamMap2.RoadBean.SeparateBean>>> separate = road.getSeparate();
                paint.setStrokeWidth(1.0f);
                paint.setColor(Color.BLACK);
                paint.setStrokeWidth(2.0f);
                paint.setColor(Color.WHITE);
                if (separate != null) {
                    Log.d(TAG, "绘制道路分割线 段数量 = " + separate.size());
@@ -1151,7 +1153,7 @@
            Paint mPaint = new Paint();
            mPaint.setTextSize(20);
            mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
            mPaint.setColor(Color.WHITE);
            for (x = 0; x < specialAreaBeanList.size(); x++) {
                RoadExamMap2.SpecialAreaBean specialArea = specialAreaBeanList.get(x);