lineWidth method has no effect?


#1

Using the code in the book all is well apart from the lineWidth method which does not affect the width of the line:

[code]- (void)drawRect:(CGRect)rect
{
CGRect bounds = self.bounds;

// Figure out the center of the bounds rectangle
CGPoint centre;
centre.x = bounds.origin.x + bounds.size.width / 2.0;
centre.y = bounds.origin.y + bounds.size.height / 2.0;

// The circle will be the largest that will fit in the view

float radius = (MIN(bounds.size.width, bounds.size.height)/2.0);

UIBezierPath *path = [[UIBezierPath alloc]init];

// Add an arc to the path at centre, with radius of radius, from 0 to 2*PI(a circle).
[path addArcWithCenter:centre radius:radius startAngle:0.0 endAngle:M_PI * 2 clockwise:YES];

// Draw the line!
[path stroke];

// Configure line width to 10 points
path.lineWidth = 10;  <<<<<<< This line does nothing!!??

}[/code]

Anyone?


#2

[quote][code]

// Draw the line!
[path stroke];

// Configure line width to 10 points
path.lineWidth = 10;  <<<<<<< This line does nothing!!??[/code][/quote]

Set it before stroking.


#3

Gotcha :wink:

…jeez I need a break!

Thanks