mirror of
https://github.com/elliotnunn/sys7.1-doc-wip.git
synced 2024-12-12 04:29:09 +00:00
121 lines
2.7 KiB
Plaintext
121 lines
2.7 KiB
Plaintext
;
|
||
; File: Picker.a
|
||
;
|
||
; Copyright: © 1991-1992 by Apple Computer, Inc., all rights reserved.
|
||
;
|
||
; Change History (most recent first):
|
||
;
|
||
; <7> 7/1/92 DCL This file is the replacement for the now obsolete PickerEqu.a.
|
||
; Changed the 'including' name to match the new file name.
|
||
; <6> 1/30/91 gbm sab, #38: Change the ‘already including this file’ variable to
|
||
; all uppercase (for security reasons)
|
||
|
||
; 1.0 CCH 11/ 9/1988 Adding to EASE.
|
||
; END EASE MODIFICATION HISTORY
|
||
;•1.1 CCH 9/14/1988 Updated EASE with the current rev of this file.
|
||
;--------------------------------------------------------------------
|
||
|
||
IF &TYPE('__INCLUDINGPICKER__') = 'UNDEFINED' THEN
|
||
__INCLUDINGPICKER__ SET 1
|
||
|
||
MaxSmallFract EQU $0000FFFF ; Maximum small fract value, as LONGINT
|
||
|
||
; For developmental simplicity in switching between the HLS and HSV
|
||
; models, HLS is reordered into HSL. Thus both models start with
|
||
; hue and saturation values; value/lightness/brightness is last.
|
||
|
||
HSVColor RECORD 0
|
||
hue DS.W 1 ; Fraction of circle, red at 0
|
||
saturation DS.W 1 ; 0-1, 0 for gray, 1 for pure color
|
||
value DS.W 1 ; 0-1, 0 for black, 1 for max intensity
|
||
ENDR
|
||
|
||
HSLColor RECORD 0
|
||
hue DS.W 1 ; Fraction of circle, red at 0
|
||
saturation DS.W 1 ; 0-1, 0 for gray, 1 for pure color
|
||
lightness DS.W 1 ; 0-1, 0 for black, 1 for white
|
||
ENDR
|
||
|
||
|
||
|
||
|
||
|
||
CMYColor RECORD 0
|
||
cyan DS.W 1
|
||
magenta DS.W 1
|
||
yellow DS.W 1
|
||
ENDR
|
||
|
||
|
||
|
||
|
||
|
||
|
||
; Selectors for color picker macros:
|
||
|
||
fix2SmallFract EQU 1
|
||
smallFract2Fix EQU 2
|
||
cmy2RGB EQU 3
|
||
rgb2CMY EQU 4
|
||
hsl2RGB EQU 5
|
||
rgb2HSL EQU 6
|
||
hsv2RGB EQU 7
|
||
rgb2HSV EQU 8
|
||
getColor EQU 9
|
||
|
||
|
||
MACRO
|
||
_Fix2SmallFract
|
||
MOVE.W #fix2SmallFract,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_SmallFract2Fix
|
||
MOVE.W #smallFract2Fix,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_CMY2RGB
|
||
MOVE.W #cmy2RGB,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_RGB2CMY
|
||
MOVE.W #rgb2CMY,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_HSL2RGB
|
||
MOVE.W #hsl2RGB,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_RGB2HSL
|
||
MOVE.W #rgb2HSL,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_HSV2RGB
|
||
MOVE.W #hsv2RGB,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_RGB2HSV
|
||
MOVE.W #rgb2HSV,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
MACRO
|
||
_GetColor
|
||
MOVE.W #getColor,-(SP)
|
||
DC.W $A82E ; _Pack12
|
||
ENDM
|
||
|
||
ENDIF ; ...already included |