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.
Don't want to build libtouchvg.so and jar ?
touchvg_libs
in the zip package to vgandroid/TouchVG/libs
or yourapp/libs
.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.
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:
python addlog.py
in jni/build.sh../build.sh -swig
to add log in all JNI entry functions, or remove touchvg_java_wrap.cpp
and type ./build.sh
.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.git
cd DemoCmds
python newproj.py MyCmds
This is an open source BSD licensed project. It uses the following open source projects:
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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型