Code Monkey home page Code Monkey logo

vgios's Introduction

TouchVG for iOS

A lightweight 2D vector drawing framework using vgcore for iOS. It uses the CoreGraphics and UIKit frameworks to render shapes and handle gestures.

Version Platform License

Features described in Online document. Please visit demo projects (vgios-demo, vgios_examples and iOSColorPad to see more examples.

arch

iphone1 | iphone2

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++.
  • SVGKit (MIT): Display and interact with SVG Images with CoreAnimation on iOS.
  • iOS-Universal-Library-Template: Use it to create static library project.

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

How to Compile

Compile TouchVG with CocoaPods

Type pod install or pod update --no-repo-update, then open TouchVG.xcworkspace in Xcode, then build the TouchVG or TouchVG-SVG target.

  • Remove libPods-TouchVG-TouchVG-SVG.a and libPods-TouchVG.a from Link Binary With Libraries.
  • libTouchVG.a does not support SVG display.
  • libTouchVG-SVG.a can display SVG shapes using SVGKit.

Compile TouchVG without CocoaPods

Alternatively, you can build as one of the following methods:

  • Open TouchVG/TouchVG.xcodeproj in Xcode, then build the TouchVG or TouchVG-SVG target.

    • libTouchVG.a does not support SVG display.
    • libTouchVG-SVG.a can display SVG shapes using SVGKit.
  • Or type ./build.sh to compile static libraries to the output directory.

    • Type ./build.sh -arch arm64 to make for iOS 64-bit.
    • Type ./build.sh clean to remove object files.it).

Use TouchVG with CocoaPods

TouchVG is available on CocoaPods. Just add the following to your project Podfile:

pod 'TouchVG'

Or use the develop version:

pod 'TouchVG', :podspec => 'https://raw.githubusercontent.com/touchvg/vgios/develop/podspec/TouchVG.podspec'

Or add the following to use SVG rendering feature with SVGKit:

pod 'TouchVG-SVG', :podspec => 'https://raw.githubusercontent.com/touchvg/vgios/develop/podspec/TouchVG-SVG.podspec'

Then type pod install or pod update --no-repo-update. Need to copy podspec/SVGKit.podspec to ~/.cocoapods/repos/master/Specs/SVGKit/2.0/ to use the lastest version of SVGKit.

Use TouchVG without CocoaPods

  • Add libTouchVG.a and libTouchVGCore.a to your project, or set OTHER_LDFLAGS as -lTouchVGCore -lTouchVG.

  • If the error Undefined symbols for architecture ...in libTouchVGCore.a occurs, then change the source file which uses TouchVG as *.mm rather than *.m to link with C++ classes.

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.git
      cd DemoCmds
      python newproj.py MyCmds

vgios's People

Contributors

rhcad avatar ljlin avatar lileichuan avatar

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.