Latest 1.1.7
Homepage https://github.com/authman2/Canvas
License MIT
Platforms ios 9.0
Authors

Canvas   +Canvas+

Version
License
Platform

Canvas is an iOS library for drawing lines and other shapes on the screen easily and efficiently.

Docs

Canvas

  • currentBrush: The type of Brush to use when drawing on the Canvas.
  • undo(): Undo the last brush stroke.
  • redo(): Redo the last brush stroke.
  • clear(): Clear the current drawing layer.
  • addDrawingLayer(CanvasLayer): Add and switch to a new layer on top of the current one.
  • switchLayer(to): Switch to the specified layer for drawing.
  • moveLayer(at, to): Moves the layer at the given index to the second paramater index.
  • removeLayer(at): Removes the layer at the given index.
  • hideLayer(at): Hides the layer at the given index.
  • showLayer(at): Shows the layer at the given index.
  • getLayers(): Returns an array of the CanvasLayers on the Canvas.
  • getCurrentLayer(): Returns the current layer object.
  • getCurrentLayer(): Returns the index of the current layer.

CanvasLayer

  • isAntiAliasEnabled: Whether or not the Canvas should have anti-aliasing enabled.

Brush

  • Default: The default brush to use when drawing on the canvas.
  • Eraser: An eraser brush that works out of the box. The user can still define their own eraser brush.

CanvasDelegate

  • didBeginDrawing(canvas): Called when the user starts drawing on the Canvas.
  • isDrawing(canvas): Called (multiple times) while the user is drawing.
  • didEndDrawing(canvas): Called when the user stops drawing on the Canvas.

Installation

Canvas is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod '+Canvas+'

Author

  • Year: 2018
  • Languages/Tools: Swift
  • Programmer: Adeola Uthman

License

Canvas is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "+Canvas+",
    "version": "1.1.7",
    "summary": "Create artistic applications extremely easily.",
    "description": "Canvas provides a simple solution to creating freeform drawings in iOS applications. This means that the user no longer needs to write messy code when trying to create something like a simple painting application.",
    "homepage": "https://github.com/authman2/Canvas",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "authman2": "authm[email protected]"
    },
    "source": {
        "git": "https://github.com/authman2/Canvas.git",
        "tag": "1.1.7"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Canvas/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This