Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 * Copyright 2016 GcsSloop
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Last modified 2016-12-03 22:55:55
 *
 */

import android.graphics.PointF;

public class Main {
    private static int Cap_Axis_Distance = 15;
    private static int Cap_Head_Distance = 30;
    private static float XAxisPosLen_2D = 500;
    private static float XAxisNegLen_2D = 0;
    private static float YAxisPosLen_2D = 700;
    private static float YAxisNegLen_2D = 0;
    private static PointF XHead_2D, XTail_2D, YHead_2D, YTail_2D;
    private static PointF XCap1_2D, XCap2_2D, YCap1_2D, YCap2_2D;

    private static void init2DPoint() {

        XHead_2D = new PointF(+XAxisPosLen_2D, 0);
        XTail_2D = new PointF(-XAxisNegLen_2D, 0);
        XCap1_2D = new PointF(XAxisPosLen_2D - Cap_Head_Distance, +Cap_Axis_Distance);
        XCap2_2D = new PointF(XAxisPosLen_2D - Cap_Head_Distance, -Cap_Axis_Distance);

        YHead_2D = new PointF(0, +YAxisPosLen_2D);
        YTail_2D = new PointF(0, -YAxisNegLen_2D);
        YCap1_2D = new PointF(+Cap_Axis_Distance, YAxisPosLen_2D - Cap_Head_Distance);
        YCap2_2D = new PointF(-Cap_Axis_Distance, YAxisPosLen_2D - Cap_Head_Distance);
    }
}