Pregunta

quiero mi función de droche,

-(void)drawRect{
    NSBezierPath * path = [NSBezierPath bezierPath];
    [path setLineWidth:4];
    NSPoint center = {ycord,xcord};
    [path moveToPoint: center];
    [path appendBezierPathWithArcWithCenter:center 
                                     radius:plyr_size 
                                 startAngle:0 
                                   endAngle:360]; 
    [[NSColor blackColor] set];
    [path fill];
    [[NSColor blackColor] set];
    [path stroke];
}

estar dentro de una subclase de NSVIEW, sin agregar otra @olvementation y @Interface. Esto es para lograr el recorte. Alternativamente, ¿hay otras opciones para recortar?Si me dice "Nsbezierpath's Drawclip", entonces tienes que explicarte a ti mismo.

¿Fue útil?

Solución

[NSBezierPath clipRect:myClipRect];
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top