Hi,
I draw an triangle using these piece of code
CGPoint center;
center = CGPointMake(x1, x2);
CGContextMoveToPoint(context, center.x, center.y);
for(int i = 0; i < 3; i++)
{
switch (i) {
case 0:
CGContextAddLineToPoint(context, y1, y2);
break;
case 1:
CGContextAddLineToPoint(context, z1, z2);
break;
case 2:
CGContextAddLineToPoint(context, x1, x2);
break;
default:
break;
}
}
Now the triangle has drawn in my uiview.I have an image size should be (420*300).I want to load this image in the triangle region . (Not out of this triangle region).
Can anyone help me ?
Thanks in advance.....