Code Monkey home page Code Monkey logo

drwapp's Introduction

================ Slaaysourcecoders forked this app from Github and it carries the same license as the original license.

The app is renamed as DrwApp (say it as "Drop")

================

Below is the original license text DAScratchPad

Author

David B. Levi (https://github.com/dblapps)

Overview

DAScratchPad is a small UIView subclass that provides a simple drawing interface. It provides both a painting and airbrushing capability. You can put this view anywhere in your UI, and your user can draw in it. You can add UI controls to change drawing color, line width, opacity, select painting or airbrushing, and set airbrush flow. You can also get the current image from the scratch pad, clear the current image, or replace the current image.

An example xcode project is included that demonstrates simple usage.

DAScratchPad is compatible with iOS4.3+.

License

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

How To Use

Copy the contents of the DAScratchPad directory to your xcode project.

Import DAScratchPad.h in appropriate places.

Add the QuartzCore frameworks to your project.

Add instance of DAScratchPad in interface builder, or add them programatically:

DAScratchPad* scratchpad = [[DAScratchPad alloc] initWithFrame:CGRectMake(30.0f, 30.0f, 150.0f, 150.0f)];
[self.view addSubview:scratchpad];

Change properties to control color, line width, and opacity:

scratchpad.drawColor = [UIColor greenColor];
scratchpad.drawWidth = 15.0f;
scratchpad.drawOpacity = 0.5f; // range is 0.0f through 1.0f

Select painting or airbrushing, and set airbrush rate and flow:

scratchpad.toolType = DAScratchPadToolTypePaint;
scratchpad.toolType = DAScratchPadToolTypeAirBrush;
scratchpad.airBrushFlow = 0.7f; // range is 0.0f through 1.0f

Use 'getSketch' to retrieve the current image:

UIImage* sketch = [scratchpad getSketch];

Use 'setSketch:' to replace the current image:

UIImage* image = [UIImage imageNamed:@"SavedImage.jpg"];
[scratchpad setSketch:image];

Use 'clearToColor:' to clear the current image:

[scratchpad clearToColor:[UIColor whiteColor]];

drwapp's People

Contributors

dblapps avatar slaay avatar

Watchers

 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.