Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During free hand drawing some of the place in stroke color is empty #1

Open
tikamsingh opened this issue Aug 25, 2020 · 1 comment
Open

Comments

@tikamsingh
Copy link

Please see screenshot
Stroke

for more detail

Sorce Code I am using:

pointArry comes from free hand drawing.

             CGContextBeginPath(context);
            float width=[_widthLine floatValue];
             UIBezierPath *_curve = [self getDrawBeizerPath:pointArray];;
             CGContextAddPath(context, _curve.CGPath);
            
            CGContextSetStrokeColorWithColor(context,[_color CGColor]);
            CGContextSetLineWidth(context, width);
            CGContextSetFillColorWithColor(context, [[UIColor yellowColor] CGColor]);
            CGContextStrokePath(context);

-(UIBezierPath *) getDrawBeizerPath:(NSArray *)pointArray {

UIBezierPath *path = [UIBezierPath bezierPath];
path.contractionFactor = 0.7;

CGPoint myStartPoint= [[pointArray objectAtIndex:0] CGPointValue];
[path moveToPoint:myStartPoint];
[path addBezierThroughPoints:pointArray];
return path;

}

@GKWenBo
Copy link

GKWenBo commented Aug 29, 2024

Have you solved the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants