• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

vgandroid: A lightweight 2D vector drawing framework for Android.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

vgandroid

开源软件地址:

https://gitee.com/vg/vgandroid

开源软件介绍:

TouchVG for Android

This is a lightweight 2D vector drawing framework using vgcore for Android.It uses android.graphics and android.view packages to render shapes and handle touches.

Features described in Online document. Please visit vgandroid-demo to see more examples.

archandroid1

How to Compile

  • Don't want to build libtouchvg.so and jar ?

    • Download the prebuilt libraries.
    • Extract touchvg_libs in the zip package to vgandroid/TouchVG/libs or yourapp/libs.
    • Import this project in eclipse. Android SDK version in the project.properties may need to modify according to your installation.
  • Enter the directory of this project, then type ./build.sh to clone and build libraries needed.

    • Need to add the NDK installation location to PATH.

    • If the error build/gmsl/__gmsl:512: *** non-numeric second argument to wordlist function occurs, then open the build/gmsl/__gmsl file in the NDK installation directory, and change line 512 to:int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))

    • MSYS is recommended on Windows to run UNIX commands such as rm, sh and make. MinGW and Cygwin are not necessary for TouchVG.

  • Import this project in eclipse, then build touchvg project.

    • Android SDK version in the project.properties may need to modify according to your installation.

    • Recommend using the newer ADT Bundle to avoid complex configuration.

  • Regenerate libtouchvg.so and JNI classes:

    • Type ./build.sh -B to rebuild the native libraries.

    • Type ./build.sh APP_ABI=x86 to build for the x86 (Intel Atom) Emulator.

    • Type ./build.sh -swig to regenerate the kernel JNI classes.

    • Need to install the lastest version of SWIG 3.0, and add the location to PATH on Windows. SWIG 2.x may can't parse UTF-8 header files on Windows.

How to Debug native code

  • Add #include "mglog.h" and use LOGD("your message %d", someint) in the C++ files needed to debug.

  • Set LogCat filter in Eclipse: tag:dalvikvm|AndroidRuntime|vgjni|touchvg|vgstack|libc|DEBUG.

  • Print JNI functions to locate problems of libc crash:

    1. Add python addlog.py in jni/build.sh.
    2. Type ./build.sh -swig to add log in all JNI entry functions, or remove touchvg_java_wrap.cpp and type ./build.sh.

Add more shapes and commands

  • You can use newproj.py to create library project containing your own shapes and commands. So the TouchVG and TouchVGCore libraries does not require changes.

    • Checkout and enter DemoCmds directory, then type python newproj.py YourCmds:

      git clone https://github.com/rhcad/DemoCmds.gitcd DemoCmdspython newproj.py MyCmds

License

This is an open source BSD licensed project. It uses the following open source projects:

  • vgcore (BSD): Cross-platform vector drawing libraries using C++.
  • AndroidSVG (Apache): SVG rendering library for Android.
  • x3py (Apache): Compile script files.
  • SWIG (GPL): Use the tool to generate the glue code for Java and C#.

How to Contribute

Contributors and sponsors are welcome. You may translate, commit issues or pull requests on this Github site.To contribute, please follow the branching model outlined here: A successful Git branching model.

Contributors


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap