Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
294 lines (253 loc) · 24.8 KB

cp.apple.finalcutpro.inspector.color.ColorPuck.md

File metadata and controls

294 lines (253 loc) · 24.8 KB

docs » cp.apple.finalcutpro.inspector.color.ColorPuck


Color ColorPuck Module.

API Overview

API Documentation

Constants

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.DEFAULT_ANGLES -> table
Type Constant
Description The table of default angles for the various pucks (1-4).
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.ELASTICITY -> number
Type Constant
Description Elasticity as number.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.NATURAL_LENGTH -> number
Type Constant
Description Natural Length as number.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.RANGE -> table
Type Constant
Description Table of puck ranges.

Functions

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.matches(element) -> boolean
Type Function
Description Checks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false

Constructors

Signature cp.apple.finalcutpro.inspector.color.ColorPuck(parent, puckNumber, labelKeys, hasAngle) -> ColorPuck
Type Constructor
Description Creates a new ColorPuck object
Parameters
  • parent - The parent
  • puckNumber - The puck number
  • labelKeys - Label Keys
  • hasAngle - If true, the puck has an angle parameter.
Returns
  • A ColorInspector object

Fields

Signature cp.apple.finalcutpro.inspector.color.ColorPuck.angle <cp.ui.TextField>
Type Field
Description The 'angle' text field (only present for the 'color' aspect).
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.label <cp.prop: string; read-only>
Type Field
Description The human-readable label for the puck, in FCPX's current language.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.percent <cp.prop: TextField>
Type Field
Description The 'percent' text field.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.row <cp.prop: PropertyRow>
Type Field
Description Finds the 'row' for the property type.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck.skimming <cp.prop: boolean>
Type Field
Description The Skimming Preferences value.

Methods

Signature cp.apple.finalcutpro.inspector.color.ColorPuck:accumulate() -> none
Type Method
Description Accumulate's the Shift Values.
Parameters
  • xShift - x value as number
  • yShift - y value as number
Returns
  • x - Accumulated x value as number
  • y - Accumulated y value as number
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:cleanup() -> none
Type Method
Description Cleans up the Color ColorPuck drawings.
Parameters
  • None
Returns
  • None
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:colorMarker(pct, angle) -> none
Type Method
Description Draws a Color Marker.
Parameters
  • pct - Percentage
Returns
  • None
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:contentUI() -> axuielementObject
Type Method
Description Returns the Content Accessibility Object
Parameters
  • None
Returns
  • An axuielementObject or nil
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doReset() -> cp.rx.go.Statement
Type Method
Description A Statement that resets the puck to its default settings.
Parameters
  • None
Returns
  • The Statement, resolving to true if successful, or throwing an error if not.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doSelect() -> cp.rx.go.Statement
Type Method
Description A Statement that selects this puck.
Parameters
  • None
Returns
  • The Statement, resolving to true if successful or throwing an error if no.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doShiftPercent(amount) -> cp.rx.go.Statement
Type Method
Description A Statement that shifts the percent value by the provide amount.
Parameters
  • amount - The amount to shift the percent value.
Returns
  • The Statement, resolving to the updated percent value, or throwing an error if there is a problem.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:doShow() -> cp.rx.go.Statement
Type Method
Description A Statement that shows the Color ColorPuck.
Parameters
  • None
Returns
  • The Statement, resolving to true if successful or sending an error if not.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:drawMarker() -> none
Type Method
Description Draws a marker.
Parameters
  • None
Returns
  • None
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:getArc() -> number
Type Method
Description Gets the arc value.
Parameters
  • None
Returns
  • The arc value as number.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:getBrightness() -> number
Type Method
Description Gets the brightness value.
Parameters
  • None
Returns
  • The brightness value as number.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:hasAngle() -> boolean
Type Method
Description Indicates if the puck has an angle parameter. The angle cp.prop will always
Parameters
  • None
Returns
  • true if the puck has an angle.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:index() -> number
Type Method
Description Returns the puck number (1 through 4).
Parameters
  • None
Returns
  • The puck number.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:loop() -> none
Type Method
Description Loops the Color ColorPuck function.
Parameters
  • None
Returns
  • None
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:reset() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Resets the puck to its default settings.
Parameters
  • None
Returns
  • The ColorPuck instance.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:select() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Selects this puck.
Parameters
  • None
Returns
  • The ColorPuck instance.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:shiftAngle(amount) -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Shifts the angle value by the provide amount.
Parameters
  • amount - The amount to shift the angle value.
Returns
  • The ColorPuck instance.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:shiftPercent(amount) -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Shifts the percent value by the provide amount.
Parameters
  • amount - The amount to shift the percent value.
Returns
  • The updated value.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:show() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Shows the Color ColorPuck
Parameters
  • None
Returns
  • The cp.apple.finalcutpro.inspector.color.ColorPuck object for method chaining.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:start() -> cp.apple.finalcutpro.inspector.color.ColorPuck
Type Method
Description Starts a Color ColorPuck.
Parameters
  • None
Returns
  • The ColorPuck instance.
Signature cp.apple.finalcutpro.inspector.color.ColorPuck:stop() -> none
Type Method
Description Stops a Color ColorPuck.
Parameters
  • None
Returns
  • None