Giter VIP home page Giter VIP logo

android-trail-drawing's Introduction

Build Status

Trail Drawing library

drawing examples

A gesture trail drawing library for Android and Java applications.

It allows to draw thick and thin strokes as if you were used a felt-tip marker. To achieve this, we first used a polygonal chain in order to approximate the hand-drawing trail and to select the most salient points. Next, we used a quadratic Bezier curve approximation to model a smooth curve in place of the original path. This smooth path serves then to guide a virtual felt-tip modeled by a flattened ellipsoid which orientation remains constant during the entire drawing. The main difficulty of this treatment is to perform it online without perceived latency.

Build the library

It is a maven build, so basically mvn install should do the job. It will install the library in your local repository. You can also retrieve the jar file under the target directory (after the maven build).

The library is published on maven central to ease developers' life. So to use the library in a maven build:

<dependency>
  <groupId>com.orange.dgil.trail</groupId>
  <artifactId>trail-core-lib</artifactId>
  <version>1.2.3</version>
  <scope>compile</scope>
</dependency>

In a gradle build:

dependencies {
  compile "com.orange.dgil.trail:trail-core-lib:1.2.3"
}

Demo applications

Can be found in the "demo" directory: android and javafx apps. Basically the javafx application is used to test and debug algorithms. Above gestures where produced with the android "DroidTest" demo, whose prebuilt apk is here (click on "Raw" to save file): Demo apk

Both demo apps use gradle for the build.

For "DroidTest", ./gradlew assembleDebug will build the apk.

For "JavaFxTest", ./gradlew run will build and launch the application. Be sure to use oracle java 8 jvm here.

Happy testing!

License

Copyright (C) 2014 Orange

The trail drawing library is distributed under the terms and conditions of the Mozilla Public License v2.0, https://www.mozilla.org/MPL/2.0

Authors

The library is born in 2014 at the Orange Labs in Meylan (french Alps). If Christophe Maldivi and Eric Petit practice cliff climbing together, they also sometimes write software together :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.