adamwulf / JotUI

OpenGL based drawing view built for and used by Loose Leaf for iPad
http://getlooseleaf.com/opensource/
MIT License
268 stars 28 forks source link

Not getting desired result for brush stroke #18

Open KrLikeblue opened 7 years ago

KrLikeblue commented 7 years ago

Hello Adam,

It's me again. How are you ? It's been long time since I have posted an issue :)

I'm facing one issue and I am writing down.

I have taken 1 brush texture image of 64*64 pixels. Now I am drawing using that brush image, but I am not getting desired result.

It draws like all brushes, in effect all the brush images which I have used so far has same result while drawing.

I am attaching 3 images here. 1st image of what I am getting while drawing, 2nd image of result which I want and 3rd image of brush texture image.

1) image of what I am getting while drawing current_result

2) image of result which I want desired_result

3) image of brush texture using which I am drawing brush_26

Right now I am making clone of this App: https://itunes.apple.com/us/app/drawing-desk-draw-paint-doodle-sketch-board/id588358613?mt=8

Please Please Please Please Please help me through with this, I am working on this issue for last couple of weeks but not getting anything. Your help would be really appreciated.

Waiting for your answer very very eagerly Thanks.

adamwulf commented 7 years ago

One thing to try is to use a larger step width for your pen. The default Pen.m uses a step width of .5, but increasing that to 2 or 3 will soften the stroke and make it more transparent. Look at the stepWidthForStroke: delegate method.

That, combined with alpha between .5 and .8 should give you an effect much closer to what you're after.

KrLikeblue commented 7 years ago

Thanks Adam,

I will try it..

ghost commented 7 years ago

did it work?

ghost commented 7 years ago

@KrLikeblue did you get it? I want the same but cannot get it...