All Projects → Asana → Drawsana

Asana / Drawsana

Licence: mit
An open source library that lets your users draw on things - mark up images with text, shapes, etc.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Drawsana

Luxor.jl
Simple drawings using vector graphics; Cairo "for tourists!"
Stars: ✭ 293 (-39.21%)
Mutual labels:  drawing
Canvas
Canvas is a Go drawing library based on OpenGL or using software rendering that is very similar to the HTML5 canvas API
Stars: ✭ 358 (-25.73%)
Mutual labels:  drawing
Tui.image Editor
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
Stars: ✭ 4,761 (+887.76%)
Mutual labels:  drawing
Drawkit
Vector and illustration framework for macOS
Stars: ✭ 299 (-37.97%)
Mutual labels:  drawing
Anyimagekit
A toolbox for pick/edit/capture photo or video. Written in Swift.
Stars: ✭ 324 (-32.78%)
Mutual labels:  drawing
Openvg
Tools for exploring OpenVG
Stars: ✭ 371 (-23.03%)
Mutual labels:  drawing
Gromit Mpx
Gromit-MPX is an on-screen annotation tool that works with any Unix desktop environment under X11 as well as Wayland.
Stars: ✭ 287 (-40.46%)
Mutual labels:  drawing
Breakdance
It's time for your markup to get down! HTML to markdown converter. Breakdance is a highly pluggable, flexible and easy to use.
Stars: ✭ 418 (-13.28%)
Mutual labels:  markup
Markup.rocks
Pandoc based document editor and converter in your browser.
Stars: ✭ 348 (-27.8%)
Mutual labels:  markup
Linedraw
Convert images to vectorized line drawings for plotters.
Stars: ✭ 393 (-18.46%)
Mutual labels:  drawing
Ferris Wheel
Simple android library to present an animated ferris wheel
Stars: ✭ 308 (-36.1%)
Mutual labels:  drawing
Slime
Minimalistic HTML templates for Elixir, inspired by Slim.
Stars: ✭ 315 (-34.65%)
Mutual labels:  markup
Excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
Stars: ✭ 25,509 (+5192.32%)
Mutual labels:  drawing
Pandoc Ruby
Ruby wrapper for Pandoc
Stars: ✭ 299 (-37.97%)
Mutual labels:  markup
React Canvas Draw
React Component for drawing in canvas
Stars: ✭ 412 (-14.52%)
Mutual labels:  drawing
Tart
Tart - draw ASCII art in the terminal with your mouse!
Stars: ✭ 296 (-38.59%)
Mutual labels:  drawing
Csharp Data Visualization
Code examples and notes for displaying data with C#
Stars: ✭ 355 (-26.35%)
Mutual labels:  drawing
Azure Design
Here you will find my complete Azure Visio Stencil and bonus SVG and PNG versions for all of the Azure Service and configuration items.
Stars: ✭ 470 (-2.49%)
Mutual labels:  drawing
React Sketch
Sketch Tool for React-based applications, backed up by FabricJS
Stars: ✭ 414 (-14.11%)
Mutual labels:  drawing
Drawing
A drawing application for the GNOME desktop.
Stars: ✭ 386 (-19.92%)
Mutual labels:  drawing

Drawsana 0.12.0

Drawsana is a generalized framework for making freehand drawing views on iOS. You can let users scribble over images, add shapes and text, and even make your own tools.

Do you want to let your users mark up images? Are you writing a simple painting app? Drawsana might work for you!

Demo source code

Docs

Blog post: Let your users mark up images on iOS with Drawsana

Like what you see? Come work with us!

Features

  • Built-in tools
    • Pen with line smoothing
    • Eraser
    • Ellipse, rect, line, arrow
    • Selection
    • Text
  • Undo/redo
  • Drawings are Codable, so you can save and load them
  • Extensible—make your own shapes and tools without forking the library

screenshot

Installation

Add Asana/Drawsana to your Cartfile and update your project like you would for any other Carthage framework, or clone the source code and add the project to your workspace.

github "Asana/Drawsana" == 0.12.0

Usage

import Drawsana

class MyViewController: UIViewController {
  let drawsanaView = DrawsanaView()
  let penTool = PenTool()
  
  func viewDidLoad() {
    /* ... */
    drawsanaView.set(tool: penTool)
    drawsanaView.userSettings.strokeWidth = 5
    drawsanaView.userSettings.strokeColor = .blue
    drawsanaView.userSettings.fillColor = .yellow
    drawsanaView.userSettings.fontSize = 24
    drawsanaView.userSettings.fontName = "Marker Felt"
  }
  
  func save() {
    let jsonEncoder = JSONEncoder()
    jsonEncoder.outputFormatting = [.prettyPrinted, .sortedKeys]
    let jsonData = try! jsonEncoder.encode(drawingView.drawing)
    // store jsonData somewhere
  }
  
  func load() {
    let data = // load data from somewhere
    let jsonDecoder = JSONDecoder()
    let drawing = try! jsonDecoder.decode(Drawing.self, from: jsonData)
    drawsanaView.drawing = drawing
  }
  
  func showFinalImage() {
    imageView.image = drawsanaView.render() 
  }
}

Background images

Drawsana does not currently have a way to automatically show an image under your drawing. We recommend that, like in the example class, you add a UIImageView underneath your DrawsanaView and make sure your DrawsanaView's frame matches the image frame. When it's time to get the final image, use DrawsanaView.render(over: myImage).

Building docs

sudo gem install jazzy
make docs
open .docs/index.html

pip install ghp-import
make publish-docs
open https://asana.github.io/Drawsana

Changelog

0.12.0

  • Undo operations are now accessible outside the framework to enable you to make undoable changes with your own UI.
    • AddShapeOperation
    • RemoveShapeOperation
    • ChangeTransformOperation
    • EditTextOperation
    • ChangeExplicitWidthOperation
  • Fix drawing view not being redrawn after being resized.
  • Fix bugs related to color serialization.
  • Fix bugs related to text entry.

0.11.0

  • DrawingOperationStack.clearRedoStack() clears all redo operations from the redo stack.
  • DrawingToolForShapeWithThreePoints and DrawingToolForShapeWithTwoPoints are declared open instead of public so they can be subclassed.
  • PenShape now works with the selection tool.
  • DrawsanaView.selectionIndicatorAnchorPointOffset allows Drawsana to keep working when you change the anchorPoint.
  • Shape.id is now settable.
  • Fix bug that prevented character input of some languages, including Chinese.
  • Fix bugs in gesture recognizer.

0.10.0

  • Convert to Swift 5
  • Fix NgonShape and TextShape serialization bugs. Old data can't be fixed, but new data will be correct.
  • Deserialization error reporting is more detailed. Shapes that find a JSON object with the correct type will now throw errors instead of causing the whole operation to silently fail, as long as you enable Drawing.debugSerialization.
  • Replacing DrawingView.drawing now behaves correctly instead of being unusably buggy.
  • PenLineSegment's members are now public.
  • ShapeTransform and PenLineSegment are now Equatable.

0.9.4

  • Star, triangle, pentagon, and angle tools
  • DrawsanaView.render() accepts a scale parameter instead of always using zero

0.9.2

  • Convert to Swift 4.2
  • CocoaPods support

0.9.1

  • DrawsanaView.selectionIndicatorViewShapeLayer is exposed, allowing you to more easily customize the appearance of the selection indicator
  • Changes to DrawsanaView.selectionIndicatorView's style are animated in fewer cases, which more closely matches user intent
  • Improved text tool use in the demo app

0.9.0

Initial release

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].