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_F = new float[4];
    private static float[] coord_G = new float[4];
    private static float[] coord_H = new float[4];
    private static float[] coord_I = new float[4];
    private static float[] coord_J = new float[4];

    private static Path drawPaddingRight() {
        //Draw the padding Right
        Path paddingRight = new Path();
        paddingRight.moveTo(coord_A[0], coord_A[1]); /*A*/
        paddingRight.lineTo(coord_F[0], coord_F[1]); /*F*/
        paddingRight.lineTo(coord_G[0], coord_G[1]); /*G*/
        paddingRight.lineTo(coord_H[0], coord_H[1]); /*H*/
        paddingRight.lineTo(coord_I[0], coord_I[1]); /*I*/
        paddingRight.lineTo(coord_J[0], coord_J[1]); /*J*/
        paddingRight.close();

        return paddingRight;
    }
}