Skip navigation.
 
mlRe: drawing text into an NSView
FROM : Douglas Davidson
DATE : Mon Nov 18 10:26:03 2002

On Saturday, November 16, 2002, at 02:31  AM, Benjámin Salánki wrote:

> I am playing around with cocoa graphics, and was looking for a way to
> draw text at a given point of my NSView subclass, but I couldn't find
> anything on this in the docs. The topic Drawing Text reads
> documentation forthcoming.


The AppKit has methods to do this in categories on NSString
(drawAtPoint:withAttributes:, drawInRect:withAttributes:) and
NSAttributedString (drawAtPoint:, drawInRect:) as defined in the header
NSStringDrawing.h.  These are convenience APIs intended to make it
simple to draw small quantities of text; if you are going to be
displaying large quantities of text, you may wish to consider other
means.

Douglas Davidson


Related mailsAuthorDate
mldrawing text into an NSView Benjámin Salánki Nov 16, 02:32
mlRe: drawing text into an NSView Jon Johnson Nov 16, 06:21
mlRe: drawing text into an NSView Douglas Davidson Nov 18, 10:26