TouchVG is a lightweight 2D vector drawing framework for iOS, Android and Windows.
Features described in Online document.
This is an open source LGPL 2.1 licensed project. It uses the following open source projects:
- TouchVGCore (LGPL): Cross-platform vector drawing libraries using C++.
- svg-android (Apache): Vector graphics support for Android.
- SVGKit (MIT): Display and interact with SVG Images with CoreAnimation on iOS.
- simple-svg (BSD): A C++ header file for creating SVG files.
- rapidjson (MIT): A fast JSON parser/generator for C++ with both SAX/DOM style API.
- x3py (Apache): Compile script files.
- SWIG (GPL): Use the tool to generate the glue code for Java and C#.
- iOS-Universal-Library-Template: Use it to create static library project.
- Algorithms: NearestPoint.c, Bezier's bound box, The intersection of two circles, Position judgment and Fitting digitized curves.
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.
Welcome to the Chinese QQ group 192093613 to discuss and share.
- Zhang Yungui
- Archer
- ljlin
- Pengjun / Line and triangle commands
- Proteas
-
Import all projects under
./androiddirectory of TouchVG in eclipse, then buildtouchvgproject.- Android SDK version of the projects may need to modify according to your installation.
- Recommend using the newer ADT Bundle to avoid complex configuration.
-
To regenerate libtouchvg.so, please enter
androiddirectory of TouchVG, then type./build.sh(Need to add the NDK installation location to your PATH environment variable).-
Type
./build.sh -Bto rebuild the native libraries. -
Type
./build.sh APP_ABI=x86to build for the x86 (Intel Atom) Emulator. -
If the error
build/gmsl/__gmsl:512: *** non-numeric second argument to wordlist functionoccurs, then open thebuild/gmsl/__gmslfile in the NDK installation directory, and change line 512 to:int_encode = $(__gmsl_tr1)$(wordlist 1,$(words 1ドル),$(__gmsl_input_int)) -
MSYS and TDM-GCC(a MinGW distribution) are recommended on Windows.
-
To regenerate the kernel JNI classes, type
./build.sh-swig(Need to install SWIG, and add the location to PATH).
-
-
Type
pod installorpod install --no-repo-update(Need to install CocoaPods). -
Open
TouchVG.xcworkspacein Xcode, then build theTouchVGorTouchVG-SVGtarget.libTouchVG.adoes not support SVG display.libTouchVG-SVG.acan display SVG shapes using SVGKit.
-
Or enter
iosdirectory and type./build.shto compile static libraries to theios/outputdirectory.- Type
./build.sh -arch arm64to make for iOS 64-bit. - Type
./build.sh cleanto remove object files.
- Type
-
Open
wpf/Test_cs10.slnin Visual Studio 2010 (Need VC++ and C#). Or openwpf/Test_cs9.slnin VS2008. -
To regenerate
wpf/touchvglib/core/*.cs, please enterwpfdirectory and type./build.sh(Need to install SWIG, and add the location to PATH).
-
You can compile TouchVG for Python, Perl or Java applications on Linux, MinGW or Mac OS X.
-
Enter
coredirectory which contains Makefile, then type the following make command:Make all install: compile C + + static library .Make java: Jar package and generate dynamic libraries for Java programs.Make python,make perl: namely Python, Perl , etc. to generate class files and dynamic libraries.Make clean java.clean python.clean: delete these temporary files compiled out .
-
MSYS and TDM-GCC(a MinGW distribution) are recommended on Windows.
-
-
You can use newproj.py to create library project (Recommended as GIT submodule) containing your own shapes and commands. So the TouchVG and TouchVGCore libraries does not require changes.
-
Enter
thirdpartydirectory and typepython newproj.py YourCmds. -
Need to install python to run the script.
-