TouchDraw icon indicating copy to clipboard operation
TouchDraw copied to clipboard

Lines not smooth

Open kidvicious opened this issue 6 years ago • 19 comments

Curved lines appear angular..Can you make it smooth?

kidvicious avatar Apr 01 '18 10:04 kidvicious

Hi @kidvicious, thanks for the comment. Can you explain what you mean? From the README's image they don't look angular to me. Is that not what you're seeing? Can you show an example? Thanks!

test

dehli avatar Apr 03 '18 01:04 dehli

i mean the curves are not rounded like here. Can it not be a perfect curve because this is what I require in my app. screen shot 2018-04-03 at 2 55 09 pm

kidvicious avatar Apr 03 '18 09:04 kidvicious

Gotcha. Thanks for the post! When I get time I will investigate this, however if you figure out a way to fix it I welcome PRs :)

dehli avatar Apr 10 '18 12:04 dehli

@dehli Hey, have you cleared curve issue. Can you please update it soon. It will be more helpful..

Parameshvadivel avatar Apr 11 '18 11:04 Parameshvadivel

I haven't yet. Like I said, I will investigate this when I have time. Feel free to open a PR if you fix it though. Cheers!

dehli avatar Apr 16 '18 15:04 dehli

I started investigating this last night. Should have a solution shortly :)

dehli avatar Apr 18 '18 11:04 dehli

Thanks for reply.. Can you make it little bit fast. Pls..

Parameshvadivel avatar Apr 18 '18 13:04 Parameshvadivel

I pushed up a solution to issue/#19-smooth-lines. If you want to test out the new branch, you can update your CocoaPods so it looks like:

pod 'TouchDraw', :git => 'https://github.com/dehli/TouchDraw.git', :branch => 'issue/#19-smooth-lines'

Let me know how it works for you.

dehli avatar Apr 18 '18 13:04 dehli

Thanks updates.. https://drive.google.com/file/d/1APE2l-nSCIDIr5tHKkp5s2hh7_7RJuZ0/view?usp=sharing Still line curve are breaking.. can you use context?.addQuadCurve(to: <#T##CGPoint#>, control: <#T##CGPoint#>) instead of context!.addLine(to: CGPoint(x: toPoint.x, y: toPoint.y))

addQuadCurve brings smooth curve can check it out that pls...

Parameshvadivel avatar Apr 18 '18 13:04 Parameshvadivel

@dehli Any updates bro...

Parameshvadivel avatar Apr 19 '18 05:04 Parameshvadivel

Hi @Parameshvadivel, I haven't been able to work on it any more since yesterday. Feel free to submit a pull request with your solution if you've tested that it works and I'll review it. When there are any updates, I will post them here though. Cheers.

dehli avatar Apr 19 '18 13:04 dehli

ok sure. thanks!!


Sincerely, Parameswaran V

“It is hard to fail, but it is worse never to have tried to succeed.” ― Theodore Roosevelt


From: c.p. [email protected] Sent: 19 April 2018 18:54:05 To: dehli/TouchDraw Cc: Parameswaran Vadivel; Mention Subject: Re: [dehli/TouchDraw] Lines not smooth (#29)

Hi @Parameshvadivelhttps://github.com/Parameshvadivel, I haven't been able to work on it any more since yesterday. Feel free to submit a pull request with your solution if you've tested that it works and I'll review it. When there are any updates, I will post them here though. Cheers.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/dehli/TouchDraw/issues/29#issuecomment-382733557, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVaFxyc2CP0mZ4N8IjLvo-jh2DfZq6HTks5tqI_1gaJpZM4TCyhf.

Parameshvadivel avatar Apr 20 '18 02:04 Parameshvadivel

Looks good. Will this be merged to master and released?

matthiasnagel avatar Aug 23 '18 09:08 matthiasnagel

Hi @matthiasnagel, if you notice improvements with it I will go ahead and merge it! I was under the impression that it didn't help. Thanks for the feedback!

dehli avatar Aug 23 '18 11:08 dehli

I just noticed it today when I was following this article
https://medium.com/@rajejones/add-a-signature-to-pdf-using-pdfkit-with-swift-7f13f7faad3e

did you fixed it ?

X901 avatar Jan 10 '19 12:01 X901

Hey @X901, thanks for reaching out! What did you notice today?

dehli avatar Jan 10 '19 12:01 dehli

The cerves is not smooth See this picture https://cl.ly/a47f9457442c

X901 avatar Jan 10 '19 12:01 X901

Before and after using the smooth-lines branch

I didn't notice any different

The same issue the lines doesn't smooth

X901 avatar Jan 10 '19 13:01 X901

Thanks @X901! I haven't had time to address this but it's on my radar. Definitely open to PRs though if you come up with a solution!

dehli avatar Jan 10 '19 14:01 dehli