Mahlzeit,
ich zeichne auf einem NSImageView mit folgender Draw-Methode einen String:
Alles anzeigen
Ergebnis ist folgendes:
osxentwicklerforum.de/index.ph…8f45ac42853f1441f4c8b7653
Wobei das für mein Auge so ausschaut, als hätten die Buchstaben alle unterschiedliche Positionen und sind nicht aneinander gereiht.
Weiß jemand woran das liegen könnte?
LG,
Lukas
ich zeichne auf einem NSImageView mit folgender Draw-Methode einen String:
Quellcode
- - (void)drawRect:(NSRect)dirtyRect {
- [super drawRect:dirtyRect];
- [[NSGraphicsContext currentContext] saveGraphicsState];
- NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
- NSFont *currentFont = [NSFont fontWithName:@"HelveticaNeue-Bold" size:16.0];
- [attributes setObject:currentFont forKey:NSFontAttributeName];
- [attributes setObject:[NSColor whiteColor] forKey:NSForegroundColorAttributeName];
- NSAffineTransform *rotateTransform =[NSAffineTransform transform];
- [rotateTransform rotateByDegrees:45.0];
- [rotateTransform concat];
- [@"Bug" drawAtPoint:NSMakePoint(90, 60) withAttributes:attributes];
- [[NSGraphicsContext currentContext] restoreGraphicsState];
- }
Ergebnis ist folgendes:
osxentwicklerforum.de/index.ph…8f45ac42853f1441f4c8b7653
Wobei das für mein Auge so ausschaut, als hätten die Buchstaben alle unterschiedliche Positionen und sind nicht aneinander gereiht.
Weiß jemand woran das liegen könnte?
LG,
Lukas
-Carpe Diem-