ITMonkeys / Isometric

Isometric drawing library for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Isometric

Isometric drawing library for Android

Drawing a simple cube

isometricView.add(new Prism(new Point(0, 0, 0)), new Color(33, 150, 243));

Image

Drawing multiple Shapes

There are 3 basic components: points, paths and shapes. A shape needs an origin point and 3 measurements for the x, y and z axes. The default Prism constructor is setting all measurements to 1.

isometricView.add(new Prism(new Point(0, 0, 0)), new Color(33, 150, 243));
isometricView.add(new Prism(new Point(-1, 1, 0), 1, 2, 1), new Color(33, 150, 243));
isometricView.add(new Prism(new Point(1, -1, 0), 2, 1, 1), new Color(33, 150, 243));

Image

Drawing multiple Paths

Paths are two dimensional. You can draw and color paths the same as shapes.

isometricView.add(new Prism(Point.ORIGIN, 3, 3, 1), new Color(50, 60, 160));
isometricView.add(new Path(new Point[]{
    new Point(1, 1, 1),
    new Point(2, 1, 1),
    new Point(2, 2, 1),
    new Point(1, 2, 1)
}), new Color(50, 160, 60));

Image

The grid

Here you can see how the grid looks like. The blue grid is the xy-plane. The z-line is the z-axis.

Image

Supports complex structures

Image

Include in your project

Using JCenter

compile 'io.fabianterhorst:Isometric:0.0.3'

Translate

Traslate is translating an point, path and shape to the given x, y and z distance. Translate is returning a new point, path or shape.

Prism prism = new Prism(new Point(0, 0, 0));
isometricView.add(prism, new Color(33, 150, 243));
isometricView.add(prism.translate(0, 0, 1.1), new Color(33, 150, 243));

Image

About

Isometric drawing library for Android

License:Apache License 2.0


Languages

Language:Java 99.9%Language:Shell 0.1%