LODimmerCurve Class Reference
Defines a dimmer curve.
More...
#import <LODimmerCurve.h>
|
Public Member Functions |
(id) | - init |
| Initilise a new dimmer curve of type LODimmerCurveTypeLinear with a straigh line no change response.
|
(id) | - initWithType: |
| Initilise a new dimmer curve of a given type.
|
(id) | - initWithXML: |
| Initlise the curve from the XML representation of it.
|
(void) | - XMLIntoElement: |
| Get the Dimmer curve details as XML.
|
(LODimmerCurveType) | - type |
| Get the Type for this curve.
|
(void) | - setType: |
| Set the type for this curve.
|
(NSPoint) | - startControlPoint |
| Get the control piint for the start of the curve.
|
(void) | - setStartControlPoint: |
| Set the start control point.
|
(NSPoint) | - controlPoint1 |
| Get the first control point.
|
(void) | - setControlPoint1: |
| Set the first control point.
|
(NSPoint) | - controlPoint2 |
| Get the second control point.
|
(void) | - setControlPoint2: |
| Set the second control point.
|
(NSPoint) | - endControlPoint |
| Get the control piint for the end of the curve.
|
(void) | - setEndControlPoint: |
| Set the end control point.
|
(BOOL) | - isEditable |
| Check is a curve is editable by a user.
|
(void) | - setEditable: |
| Set if the curve is editable by a user.
|
(LODimmerCurve *) | - linkedCurve |
| Get the dimmer curve that is linked to this one, thats is the next curve in the list.
|
(void) | - setLinkedCurve: |
| Set the linked dimmer curve, replacing any existing linked curves.
|
(void) | - addLinkedCurve: |
| Add an adiditonal curve, at the end, to the list of curves.
|
(NSBezierPath *) | - path |
| Return the path that represents this curve.
|
(void) | - render |
| Render the path into the lookup table.
|
(unsigned char) | - lookupFaderValue: |
| Get the modified value for the given fader value.
|
Protected Attributes |
NSPoint | startControlPoint |
| Start control point.
|
NSPoint | controlPoint1 |
| Control point 1.
|
NSPoint | controlPoint2 |
| Control point 2.
|
NSPoint | endControlPoint |
| End control point.
|
LODimmerCurveType | type |
| The curve type.
|
unsigned char | lookup [256] |
| The lookup table that the curve is rasterised into.
|
LODimmerCurve * | linkedCurve |
| The next curve in the link.
|
BOOL | editable |
| Is this curve editable by a user.
|
Detailed Description
Defines a dimmer curve.
There are several types of curve, each getting more complex. In order to make sure the translation of the fader value to actual transmitted value is quick, the curve is rasterised into a simple lookup table.
Multiple curves can be linked together if desired
Member Function Documentation
Add an adiditonal curve, at the end, to the list of curves.
- Parameters:
-
| theCurve | The curve to add to the end of the lined curve |
- See also:
- linkedCurve:
- setLinkedCurve:
Get the control piint for the end of the curve.
- Returns:
- The end control point
- See also:
- - setEndControlPoint:
Initilise a new dimmer curve of type LODimmerCurveTypeLinear with a straigh line no change response.
- Returns:
- The initilised curve
- (id) initWithType: |
|
(LODimmerCurveType) |
theDimmerCurveType |
|
|
Initilise a new dimmer curve of a given type.
- Parameters:
-
| theDimmerCurveType | The type of curve to initilise |
- Returns:
- The initilised curve
- (id) initWithXML: |
|
(NSXMLElement *) |
anXMLElement |
|
|
Initlise the curve from the XML representation of it.
- Parameters:
-
| anXMLElement | the XMLElement of the curve element |
- Returns:
- The initilised curve
Check is a curve is editable by a user.
- Returns:
- YES if the curve is editable
- See also:
- - setEditable:
- (unsigned char) lookupFaderValue: |
|
(unsigned char) |
aFaderValue |
|
|
Get the modified value for the given fader value.
- Parameters:
-
| aFaderValue | The value of the fader |
- Returns:
- The modified value
Return the path that represents this curve.
- Returns:
- The curve path
Render the path into the lookup table.
- (void) setControlPoint1: |
|
(NSPoint) |
thePoint |
|
|
Set the first control point.
- Parameters:
-
| thePoint | The first control point |
- See also:
- controlPoint1:
- (void) setControlPoint2: |
|
(NSPoint) |
thePoint |
|
|
Set the second control point.
- Parameters:
-
| thePoint | The second control point |
- See also:
- controlPoint2:
- (void) setEditable: |
|
(BOOL) |
isEditable |
|
|
Set if the curve is editable by a user.
- Parameters:
-
| isEditable | Editable status |
- See also:
- - isEditable:
- (void) setEndControlPoint: |
|
(NSPoint) |
thePoint |
|
|
Set the end control point.
- Parameters:
-
| thePoint | The end control point |
- See also:
- endControlPoint:
Set the linked dimmer curve, replacing any existing linked curves.
- Parameters:
-
| theCurve | The dimmer curve |
- See also:
- linkedCurve:
- addLinkedCurve:
- (void) setStartControlPoint: |
|
(NSPoint) |
thePoint |
|
|
Set the start control point.
- Parameters:
-
| thePoint | The start control point |
- See also:
- startControlPoint:
- (void) setType: |
|
(LODimmerCurveType) |
theDimmerCurveType |
|
|
Set the type for this curve.
- Parameters:
-
| theDimmerCurveType | The curve type to set |
- See also:
- type:
- (LODimmerCurveType) type |
|
|
|
|
Get the Type for this curve.
- Returns:
- The curve type
- See also:
- - setType:
- (void) XMLIntoElement: |
|
(NSXMLElement *) |
parentElement |
|
|
Get the Dimmer curve details as XML.
<parent element>
<curve type="linear|single|double" name="curve name">
<points>
<point name="start" x="0.00" y="0.00"/>
<point name="poin1" x="0.00" y="0.00"/>
<point name="poin2" x="0.00" y="0.00"/>
<point name="start" x="0.00" y="0.00"/>
</points>
</curve>
</parent element>
Linked curves will simply include multiple curve elements. This is different from most other objects with an XML function. You need to include the parent object, this is because it needs to be passed down to the linked curves
- Parameters:
-
| parentElement | The parent element that the inteface elements are put into |
The documentation for this class was generated from the following files: