DrawKit
Vector and illustration framework for Mac OS X
Instance Methods | Class Methods | Protected Attributes | List of all members
DKDistortionTransform Class Reference

This objects performs distortion transformations on points and paths. More...

Inheritance diagram for DKDistortionTransform:
Inheritance graph
[legend]

Instance Methods

(NSRect) - bounds
 
(void) - differentialPerspectiveBy:
 
(void) - getEnvelopePoints:
 
(id) - initWithEnvelope:
 
(id) - initWithRect:
 
(void) - invert
 
(void) - offsetByX:byY:
 
(void) - setEnvelopePoints:
 
(void) - shearHorizontallyBy:
 
(void) - shearVerticallyBy:
 
(NSBezierPath *) - transformBezierPath:
 
(NSPoint) - transformPoint:fromRect:
 
- Instance Methods inherited from NSObject
(NSString *) - address
 
(DKStyleRegistry *) - applicationWillReturnStyleRegistry
 
(BOOL) - canBeUsedWithSelectionTool
 
(id) - categoryManager:shouldReplaceObject:withObject:
 
(Class) - classForCoder
 
(NSColor *) - colorValue
 
(NSColor *) - colourValue
 
(id) - copy
 
(void) - dealloc
 
(id) - deepCopy
 
(NSDictionary *) - dimensionValuesForArrowStroke:
 
(CGFloat) - drawing:convertDistanceToExternalCoordinates:
 
(NSPoint) - drawing:convertLocationToExternalCoordinates:
 
(void) - drawing:didDrawRect:inView:
 
(void) - drawing:willDrawRect:inView:
 
(NSString *) - drawing:willReturnAbbreviationForUnit:
 
(NSString *) - drawing:willReturnFormattedCoordinateForDistance:
 
(CGFloat) - drawingWillReturnUnitToPointsConversonFactor:
 
(void) - finalize
 
(NSString *) - hexString
 
(void) - hotspot:didEndTrackingWithEvent:inView:
 
(void) - hotspot:isTrackingWithEvent:inView:
 
(void) - hotspot:willBeginTrackingWithEvent:inView:
 
(NSData *) - imageData
 
(NSImage *) - imageResourceNamed:
 
(id) - init
 
(id) - initWithExpression:
 
(id) - instantiateObjectWithShortName:parameters:
 
(BOOL) - isLiteralValue
 
(void) - layoutManager:willPlaceGlyphAtIndex:atLocation:pathAngle:yOffset:
 
(void) - menuItem:wasAddedForObject:inCategory:
 
(BOOL) - moveObjectTo:position:slope:userInfo:
 
(id) - mutableCopy
 
(void) - oneShotComplete
 
(void) - oneShotHasReached:
 
(void) - oneShotWillBegin
 
(void) - path:elementIndex:type:points:subPathIndex:subPathClosed:contextInfo:
 
(id) - placeLinkFromPoint:toPoint:onPath:linkNumber:userInfo:
 
(id) - placeObjectAtPoint:onPath:position:slope:userInfo:
 
(NSPoint) - point
 
(NSPoint) - pointForTextLayout
 
(DKStyle *) - registry:shouldReplaceStyle:withStyle:
 
(NSBezierPath *) - renderer:willRenderPath:
 
(void) - routeFinder:progressHasReached:
 
(void) - setValue:forNumericParameter:
 
(NSString *) - stringValue
 
(CGFloat) - taperFactorAtDistance:onPath:ofLength:
 
(void) - toolDidPerformUndoableAction:
 
(void) - toolWillPerformUndoableAction:
 
(NSURL *) - url
 
- Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger) - hash
 
(BOOL) - isEqual:
 
- Instance Methods inherited from <NSKeyValueBindingCreation>
(void) - bind:toObject:withKeyPath:options:
 
(NSArray *) - exposedBindings
 
(NSDictionary *) - infoForBinding:
 
(NSArray *) - optionDescriptionsForBinding:
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
- Instance Methods inherited from <NSCoding>
(void) - encodeWithCoder:
 
(id) - initWithCoder:
 
- Instance Methods inherited from <NSCopying>
(id) - copyWithZone:
 

Class Methods

(DKDistortionTransform *) + transformWithInitialRect:
 
- Class Methods inherited from NSObject
(id) + alloc
 
(Class) + class
 
(void) + initialize
 
(void) + load
 
(id) + new
 
- Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 

Protected Attributes

BOOL m_inverted
 
NSPoint m_q [4]
 

Detailed Description

This objects performs distortion transformations on points and paths.

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

This objects performs distortion transformations on points and paths. The four envelope points define a quadrilateral in a clockwise direction starting at top,left. A point is mapped from its position relative to a given rectangle to this quadrilateral.

This is a non-affine transformation which is why it's not a subclass of NSAffineTransform. However it can be used in a similar way.

Method Documentation

- (NSRect) bounds
- (void) differentialPerspectiveBy: (CGFloat)  delta
- (void) getEnvelopePoints: (NSPoint *)  points
- (id) initWithEnvelope: (NSPoint *)  points
- (id) initWithRect: (NSRect)  rect
- (void) invert
- (void) offsetByX: (CGFloat)  dx
byY: (CGFloat)  dy 
- (void) setEnvelopePoints: (NSPoint *)  points
- (void) shearHorizontallyBy: (CGFloat)  dx
- (void) shearVerticallyBy: (CGFloat)  dy
- (NSBezierPath*) transformBezierPath: (NSBezierPath *)  path
- (NSPoint) transformPoint: (NSPoint)  p
fromRect: (NSRect)  rect 
+ (DKDistortionTransform*) transformWithInitialRect: (NSRect)  rect

Member Data Documentation

- (BOOL) m_inverted
protected
- (NSPoint m_q[4])
protected