Skip to content

ruochao/cidrawing

Repository files navigation

CiDrawing

Build Status

CiDrawing is a vector graphics library for Android, it provides a custom view and together with a set of tools to manage vector graphics drawing.

Supported Features

Elements

  • Stroke element (Pen)
  • Group element (Group/Ungroup)
  • Shape element
    • Line
    • Arc
    • Rectangle
    • Square
    • Oval
    • Circle
    • Triangle (Isosceles triangle, Right triangle)
  • Photo element
  • Text element

Functions

  • Different drawing type
    • Vector mode
    • Painting mode
  • Basic element transformation
    • Move
    • Rotate
    • Resize
    • Skew
    • Re-Shape (Reset transformation without change drawing)
  • Element selection (Single/Multiple)
    • Rectangle select
    • Oval select
    • Lasso select
  • Custom paint (Color, Width, Style, etc)
  • Multiple layer support
  • Unlimited undo/redo
  • Element group/ungroup
  • Eraser (Object eraser)
  • Path operation
    • Union
    • Intersect
    • Different/Reserved Differernt
    • Xor
  • Element alignment
    • Horizontal (Left, Center, Right)
    • Vertical (Top, Middle, Bottom)
  • Element flip (based on reference point)
    • Horizontal
    • Vertical
  • Element arrangement
    • Forward / Backward
    • Bring to Front / Send to Back
  • Import / Export

How to Use

Include view in your layout as:

<com.mocircle.cidrawing.view.CiDrawingView
    android:id="@+id/drawing_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

Create drawing board object and set up the view:

CiDrawingView drawingView = (CiDrawingView) findViewById(R.id.drawing_view);
DrawingBoard drawingBoard = DrawingBoardManager.getInstance().createNewBoard();
drawingBoard.setupDrawingView(drawingView);

Sample Project

Please check out the sample project at [CiDrawing Sample] (https://github.com/mocircle/cidrawing/tree/master/cidrawingsample)

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3

Add to your project

Current CiDrawing is still under developing, not yet published. So please compile source code yourself.

License

CiDrawing is released under version 2.0 of the Apache License.

Releases

No releases published

Packages

No packages published

Languages