GithubHelp home page GithubHelp logo

daihase / sketch Goto Github PK

View Code? Open in Web Editor NEW
319.0 11.0 56.0 822 KB

Sketch have a lot of basic functions to develop a drawing app for iPhone. Anyone can easily create drawing iOS Application.

License: MIT License

Ruby 1.79% Swift 98.21%
swift ios swift-library drawing draw painting paint coloring color doodle

sketch's Introduction

Hi there 👋

Github

I'm daihase. Sometimes as a engineer, I'm writing programs with Swift, Dart and Go.

I ❤

  • Swift
  • Go
  • Flutter
  • Node.js

📫 How to reach me

Top Languages Card

daihase's github stats

trophy

sketch's People

Contributors

bj1024 avatar daihase avatar dependabot[bot] avatar rivera-ernesto avatar tuchangwei avatar ymanya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketch's Issues

Cut, copy and paste

Hello, thanks for this awesome library, is it possible to cut and copy a particular area and paste it at other location ?

For android

Is you have your library support for android or do you have any other library like this for android?

Feature Request: Sketch pen

I love this library. Thank you so much!

One more cool feature could be a pen-type that uses speed to determine the width to give it that hand drawn look.

Realtime cloning

I know this isn't directly related to the project, but is it possible to trigger cloning of what I'm drawing on one view to another?

Is may be useful in situations where you're trying to write something in bigger letters and it duplicates itself in smaller version.

Thank you :)

Add Text feature

Hello a great new feature can be add text to a specific place (touched)

How to reposition/resize elements using sketch ?

Hi daihase,

Thank you very much for such an awsome iOS library for drawing. i am using this in a real application for drawing. One requirement is to move/resize the elements that are currently drawn on sketchView.

Is this possible in this library ? if not, then can you please provide me some hints/guidelines on how i should proceed.

Thanks.

New Feature: Draw on an image with zoom functionality enabled for the image

Thanks for the library as this library has almost all the features that I need. But I have to draw on image with zoom functionality enabled for the image for better editing experience.
Some issues I am facing:

  • How to save an image after editing?
  • Erasing functionality erases the drawing and part of the image as well.

Plz help as I am currently working on my project. Thanks.

How can I create a new public function inside SketchView Class

Sorry, could you please tell me the reason why I put new public function inside SketchView class file, the SketchView will not load image (image will be white blank). Did I miss something? Thanks so much.
(in my sketchView)
public func checkPublic() {

}

(in my viewcontroller)
func setupCanvas() {
let url = URL(string: media.url)
let imageV = UIImageView()
imageV.sd_setImage(with: url, placeholderImage: nil, options: SDWebImageOptions.continueInBackground) { (image, error, cache, url) in
self.sketchView.loadImage(image: imageV.image!)
self.sketchView.drawTool = .pen
self.sketchView.lineWidth = 1.0
}
}

Stamp Resize after added

I need to resize the stamp on the screen so I have add gestures(pinch,pan) and a button to confirm when it completed to remove the gestures and get the location of its.

@objc func onAddStampConfirm(sender: UIButton!) {

        //remove gesture
        for subview in sketchView.subviews {
            for recognizer in subview.gestureRecognizers ?? [] {
                subview.removeGestureRecognizer(recognizer)
            }
        }
        
        sketchView.drawTool = .stamp
        self.sketchView.stampImage = imvStamp.image
        let cgPoint = CGPoint.init(x: imvStamp.frame.origin.x, y: imvStamp.frame.origin.y)
        self.sketchView.addStampComplete(position: cgPoint)
 }

And in sketchView class, I've added this to regconize when add stamp complete

public func addStampComplete(position:CGPoint) {
        currentTool = toolWithCurrentSettings()
        guard let stampTool = currentTool as? StampTool else { return }
        pathArray.add(stampTool)
        stampTool.setStampImage(image: stampImage)
        stampTool.setInitialPoint(position)
        finishDrawing()
    }

in touchbegan (case is StampTool) I let it blank.
Thanks

Originally posted by @longnh2604 in #2 (comment)

Air Brush feature

Hello
a great feature like air brush, is it possible

Thanks in advance

oriantation

when i draw a line and then change the oriantation of the device line goes some where else when i clicked the sketchview how to solve that problem ?

CPU Overload help please

hello, so i have a problem with SketchView, if i set lineWidth more than 75, when i draw more than 8 seconds continuously without touchup finger cpu is overload to 100%, it tested on different devices

Support Privacy Manifests?

Does Sketch SDK support Privacy Manifest?

Quoted Apple official website

Important
Third-party SDKs need to provide their own privacy manifest files that record the types of data they collect. Your app’s privacy manifest file doesn’t need to cover data collected by third-party SDKs that your app links to.

Sketch SDK is not included in the SDKs that are subject to the privacy manifest and signature requirement, but if you are not using the required reason API, we would like to know if you have any plans to address this issue by stating that you are not using the required reason API (i.e., not including anything in the required reason API).


Sketch SDK は Privacy Manifestご対応される予定はありますでしょうか?
Apple公式(日本語): https://developer.apple.com/jp/support/third-party-SDK-requirements/

Sketch SDKはプライバシーマニフェストと署名必須の対象となるSDK には含まれておりませんが、required reason API 等を利用していないようであれば、利用してないことを記載 (何もrequired reason APIに含めない) していただく等の対応のご予定があるかお伺いしたく存じます。

How can i draw when zoom in

Hi
Thanks for the great library. I am not able to draw something when I am zooming any image. If there is any solution. Please help me.

Thanks

I need to create a circle with eraser

First of all thanks for this great library. I have a query regarding the library.

I need to create a circle with an eraser. But touch delegates are not working with sketches.
This is not an issue this is an enhancement

i can't image zoom

Hello,
i am try to zoom image for color but i can't do that ,
plz share code of only image zoom for coloring in swift

Neon effect

Is there any way to increase the shadow area in the neon effect ?

Eraser issue

When i select image and i draw and erase. It leaves white color behind. To fix this i added a separate imageview and on front sketch view. This solved the eraser issue but now when i change orientation the existing drawing do not remain to orignal position. Any idea how to fix this

Screen Shot 2020-03-13 at 4 11 00 PM

Try to put SketchView inside scroll view for better zooming and move

hello, i have a problem at adding SketchView inside scroll view, at the moment when i draw it has a little freeze, and when i want do draw second time (add one more line) it clears all what i draw. and show in console CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. and CGBitmapContextInfoCreate: unable to allocate 355155840 bytes for bitmap data. Someone does this ? like adding sketchView in scroll view, or how you done zoom with 2 fingers and move same with 2 fingers. Thank you

Save images using Sketch

Hey there! Thanks for you awesome job!

I try to build an image editing app using your library. Got a question there: how can I save the image to the gallery after I loaded and edited it in the app?

I tried to somehow get a UIImage object from the SketchView and then save it in a traditional way to the gallery using UIImageWriteToSavedPhotosAlbum, but did not succeed. I don't see any method in SketchView AP for image saving either.

Thank you!

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.