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

This category on DKStyle provides some simple accessors if your app only has the most basic use of styles in mind, e. More...

Instance Methods

(DKFill *) - fill
 
(NSColor *) - fillColour
 
(BOOL- hasImageComponent
 
(NSImage *) - imageComponent
 
(void) - setFillColour:
 
(void) - setImageComponent:
 
(void) - setString:
 
(void) - setStrokeColour:
 
(void) - setStrokeDash:
 
(void) - setStrokeLineCapStyle:
 
(void) - setStrokeLineJoinStyle:
 
(void) - setStrokeWidth:
 
(NSString *) - string
 
(DKStroke *) - stroke
 
(NSColor *) - strokeColour
 
(DKStrokeDash *) - strokeDash
 
(NSLineCapStyle) - strokeLineCapStyle
 
(NSLineJoinStyle) - strokeLineJoinStyle
 
(CGFloat- strokeWidth
 

Class Methods

(DKStyle *) + styleWithDotDensity:foreColour:backColour:
 

Detailed Description

This category on DKStyle provides some simple accessors if your app only has the most basic use of styles in mind, e.

This category on DKStyle provides some simple accessors if your app only has the most basic use of styles in mind, e.g. one solid fill and a single simple solid or dashed stroke.

This operates on the topmost DKStroke/DKFill rasterizers in a style's list, and does not touch any others. By passing a colour of nil, the associated rasterizer is disabled. If a non-nil colour is passed, and there is no suitable rasterizer, one is created and added. If the rasterizer has to be created for both properies, the stroke will be placed in front of the fill.

Note that this does not require or use and specially created style. It is recommended that if using these accessors, style sharing is turned off so that every object has its own style - then these accessors effectively operate on the graphic object's stroke and fill properties.

The string setter sets or creates a DKTextAdornment component having the default text parameters and the string as its label.

If the style is locked these do nothing.

Method Documentation

- (DKFill*) fill

Extends class DKStyle.

- (NSColor*) fillColour

Extends class DKStyle.

- (BOOL) hasImageComponent

Extends class DKStyle.

- (NSImage*) imageComponent

Extends class DKStyle.

- (void) setFillColour: (NSColor *)  fillColour

Extends class DKStyle.

- (void) setImageComponent: (NSImage *)  anImage

Extends class DKStyle.

- (void) setString: (NSString *)  aString

Extends class DKStyle.

- (void) setStrokeColour: (NSColor *)  strokeColour

Extends class DKStyle.

- (void) setStrokeDash: (DKStrokeDash *)  aDash

Extends class DKStyle.

- (void) setStrokeLineCapStyle: (NSLineCapStyle)  capStyle

Extends class DKStyle.

- (void) setStrokeLineJoinStyle: (NSLineJoinStyle)  joinStyle

Extends class DKStyle.

- (void) setStrokeWidth: (CGFloat strokeWidth

Extends class DKStyle.

- (NSString*) string

Extends class DKStyle.

- (DKStroke*) stroke

Extends class DKStyle.

- (NSColor*) strokeColour

Extends class DKStyle.

- (DKStrokeDash*) strokeDash

Extends class DKStyle.

- (NSLineCapStyle) strokeLineCapStyle

Extends class DKStyle.

- (NSLineJoinStyle) strokeLineJoinStyle

Extends class DKStyle.

- (CGFloat) strokeWidth

Extends class DKStyle.

+ (DKStyle*) styleWithDotDensity: (CGFloat percent
foreColour: (NSColor *)  fore
backColour: (NSColor *)  back 

Extends class DKStyle.