Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.graphics.Path;

public class Main {
    /**
     * Coordinates of the Star
        
          A
         / \
        /   \
     C-----B     J-----I
       \             /
     D         H
    /     F     \
       /   /     \   \
      E               G
        
     * */
    //coord_POINT [coordOut_X, coordOut_Y, coordIn_X, coordIn_Y]
    private static float[] coord_A = new float[4];
    private static float[] coord_B = new float[4];
    private static float[] coord_C = new float[4];
    private static float[] coord_D = new float[4];
    private static float[] coord_E = new float[4];
    private static float[] coord_F = new float[4];

    private static Path drawPaddingLeft() {
        //Draw the padding Left
        Path paddingLeft = new Path();
        paddingLeft.moveTo(coord_A[0], coord_A[1]); /*A*/
        paddingLeft.lineTo(coord_B[0], coord_B[1]); /*B*/
        paddingLeft.lineTo(coord_C[0], coord_C[1]); /*C*/
        paddingLeft.lineTo(coord_D[0], coord_D[1]); /*D*/
        paddingLeft.lineTo(coord_E[0], coord_E[1]); /*E*/
        paddingLeft.lineTo(coord_F[0], coord_F[1]); /*F*/
        paddingLeft.close();

        return paddingLeft;
    }
}