Draw image in triangle region iphone
<p>I draw an triangle using these piece of code</p>

<pre><code>CGPoint center;

center = CGPointMake(x1, x2);
CGContextMoveToPoint(context, center.x, center.y);
for(int i = 0; i &lt; 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;
    }

}
</code></pre>

<p>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).</p>

<p>Can anyone help me ? </p>

<p>Thanks in advance.....</p>
