DrawKit
Vector and illustration framework for Mac OS X
Instance Methods | Class Methods | List of all members
DKStyle(TextAdditions) Category Reference

This adds text attributes to the DKStyle object. More...

Instance Methods

(NSString *) - actionNameForTextAttribute:
 
(void) - adoptFromText:
 
(NSTextAlignment) - alignment
 
(void) - applyToText:
 
(void) - changeTextAttribute:toValue:
 
(DKStyle *) - drawingStyleFromTextAttributes
 
(NSFont *) - font
 
(CGFloat- fontSize
 
(NSParagraphStyle *) - paragraphStyle
 
(void) - setAlignment:
 
(void) - setFont:
 
(void) - setFontSize:
 
(void) - setParagraphStyle:
 
(void) - setTextColour:
 
(void) - setUnderlined:
 
(NSColor *) - textColour
 
(void) - toggleUnderlined
 
(NSInteger- underlined
 

Class Methods

(DKStyle *) + defaultTextStyle
 
(NSString *) + styleNameForFont:
 Returns the name and size of the font in a form that can be used as a style name. More...
 
(DKStyle *) + textStyleWithFont:
 

Detailed Description

This adds text attributes to the DKStyle object.

Author
Contributions from the community; see CONTRIBUTORS.md
Date
2005-2015

This adds text attributes to the DKStyle object. A DKTextShape makes use of styles with attached text attributes to style the text it displays. Other objects that use text can make use of this as they wish.

Method Documentation

- (NSString*) actionNameForTextAttribute: (NSString *)  attribute

Extends class DKStyle.

- (void) adoptFromText: (NSAttributedString *)  text

Extends class DKStyle.

- (NSTextAlignment) alignment

Extends class DKStyle.

- (void) applyToText: (NSMutableAttributedString *)  text

Extends class DKStyle.

- (void) changeTextAttribute: (NSString *)  attribute
toValue: (id val 

Extends class DKStyle.

+ (DKStyle*) defaultTextStyle

Extends class DKStyle.

- (DKStyle*) drawingStyleFromTextAttributes

Extends class DKStyle.

- (NSFont*) font

Extends class DKStyle.

- (CGFloat) fontSize

Extends class DKStyle.

- (NSParagraphStyle*) paragraphStyle

Extends class DKStyle.

- (void) setAlignment: (NSTextAlignment)  align

Extends class DKStyle.

- (void) setFont: (NSFont *)  font

Extends class DKStyle.

- (void) setFontSize: (CGFloat size

Extends class DKStyle.

- (void) setParagraphStyle: (NSParagraphStyle *)  style

Extends class DKStyle.

- (void) setTextColour: (NSColor *)  aColour

Extends class DKStyle.

- (void) setUnderlined: (NSInteger uval

Extends class DKStyle.

+ (NSString*) styleNameForFont: (NSFont *)  font

Returns the name and size of the font in a form that can be used as a style name.

Parameters
fonta font
Returns
a string, such as "Helvetica Bold 18pt"

Extends class DKStyle.

- (NSColor*) textColour

Extends class DKStyle.

+ (DKStyle*) textStyleWithFont: (NSFont *)  font

Extends class DKStyle.

- (void) toggleUnderlined

Extends class DKStyle.

- (NSInteger) underlined

Extends class DKStyle.