-
Notifications
You must be signed in to change notification settings - Fork 74
/
UCommands.p
188 lines (131 loc) · 4.37 KB
/
UCommands.p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{Photoshop version 1.0.1, file: UCommands.p
Computer History Museum, www.computerhistory.org
This material is (C)Copyright 1990 Adobe Systems Inc.
It may not be distributed to third parties.
It is licensed for non-commercial use according to
www.computerhistory.org/softwarelicense/photoshop/ }
UNIT UCommands;
INTERFACE
USES
{$LOAD MacIntf.LOAD}
MemTypes, QuickDraw, OSIntf, ToolIntf, PackIntf,
{$LOAD UMacApp.LOAD}
UObject, UList, UMacApp,
{$LOAD UPhotoshop.LOAD}
PaletteMgr, UConstants, UVMemory, UPhotoshop,
{$LOAD}
UProgress;
CONST
kFileNameLength = 31;
TYPE
TFileName = STRING [kFileNameLength];
PFileName = ^TFileName;
PPlugInInfo = ^TPlugInInfo;
HPlugInInfo = ^PPlugInInfo;
TPlugInInfo = RECORD
fName : Str255;
fFileName : TFileName;
fKind : ResType;
fResourceID: INTEGER;
fVersion : INTEGER;
fData : LONGINT;
fParameters: Handle;
fNext : HPlugInInfo
END;
TPasteMode = (PasteNormal, PasteColorOnly,
PasteDarkenOnly, PasteLightenOnly);
TPasteControls = RECORD
fSrcMin: ARRAY [0..3] OF INTEGER;
fSrcMax: ARRAY [0..3] OF INTEGER;
fDstMin: ARRAY [0..3] OF INTEGER;
fDstMax: ARRAY [0..3] OF INTEGER;
fMode : TPasteMode;
fBlend : INTEGER;
fFuzz : INTEGER;
fMat : INTEGER
END;
PPasteControls = ^TPasteControls;
HPasteControls = ^PPasteControls;
TBufferCommand = OBJECT (TCommand)
fView: TImageView;
fDoc : TImageDocument;
fBuffer: TChannelArrayList;
PROCEDURE TBufferCommand.IBufferCommand (itsCommand: INTEGER;
view: TImageView);
PROCEDURE TBufferCommand.Free; OVERRIDE;
PROCEDURE TBufferCommand.SwapAllChannels;
END;
TFloatCommand = OBJECT (TBufferCommand)
fWasFloating: BOOLEAN;
fSwapMask: BOOLEAN;
fExactFloat: BOOLEAN;
fFloatRect: Rect;
fFloatMask: TVMArray;
fFloatData: TRGBArrayList;
fFloatBelow: TRGBArrayList;
PROCEDURE TFloatCommand.IFloatCommand (itsCommand: INTEGER;
view: TImageView);
PROCEDURE TFloatCommand.Free; OVERRIDE;
PROCEDURE TFloatCommand.SwapFloat;
PROCEDURE TFloatCommand.MakeMapLegal (VAR map: TLookUpTable);
PROCEDURE TFloatCommand.FloatSelection (duplicate: BOOLEAN);
PROCEDURE TFloatCommand.ComputeOverlap (VAR r: Rect);
PROCEDURE TFloatCommand.CopyOverlapArea (into: BOOLEAN;
buffer: TVMArray;
image: TVMArray);
PROCEDURE TFloatCommand.CopyOverlapAreas (into: BOOLEAN;
buffer0: TVMArray;
buffer1: TVMArray;
buffer2: TVMArray);
PROCEDURE TFloatCommand.CopyBelow (into: BOOLEAN);
PROCEDURE TFloatCommand.BlendFloatSingle (srcArray: TVMArray;
dstArray: TVMArray;
maskArray: TVMArray;
alphaArray: TVMArray;
r1: Rect;
r2: Rect;
canAbort: BOOLEAN);
PROCEDURE TFloatCommand.BlendFloatRGB (src1Array: TVMArray;
src2Array: TVMArray;
src3Array: TVMArray;
dst1Array: TVMArray;
dst2Array: TVMArray;
dst3Array: TVMArray;
maskArray: TVMArray;
alphaArray: TVMArray;
r1: Rect;
r2: Rect;
canAbort: BOOLEAN);
PROCEDURE TFloatCommand.BlendFloat (canAbort: BOOLEAN);
FUNCTION TFloatCommand.CanSelect (VAR r: Rect;
VAR mask: TVMArray): OSErr;
PROCEDURE TFloatCommand.SelectFloat;
PROCEDURE TFloatCommand.UpdateRects (r1, r2: Rect; highlight: BOOLEAN);
END;
VAR
gFirstPSAcquire: HPlugInInfo;
gFirstDDAcquire: HPlugInInfo;
gFirstBWAcquire: HPlugInInfo;
gFirstPSExport : HPlugInInfo;
gFirstPSFilter : HPlugInInfo;
gFirstDDFilter : HPlugInInfo;
PROCEDURE InitPlugInList (kind: ResType;
loVersion, hiVersion: INTEGER;
VAR first: HPlugInInfo;
command: INTEGER);
PROCEDURE CheckForNoPlugIns (command: INTEGER);
FUNCTION IsPlugIn (name: Str255;
first: HPlugInInfo;
VAR info: HPlugInInfo): BOOLEAN;
PROCEDURE GetCenterPoint (view: TImageView; VAR center: Point);
PROCEDURE SetTopLeft (view: TImageView; top, left: INTEGER);
PROCEDURE SetCenterPoint (view: TImageView; center: Point);
FUNCTION MakeMonochromeArray (rArray, gArray, bArray: TVMArray): TVMArray;
FUNCTION CopyHalftoneRect (srcBuffer: TVMArray;
r: Rect;
depth: INTEGER): TVMArray;
PROCEDURE GetPasteControls (doc: TImageDocument;
VAR controls: TPasteControls);
IMPLEMENTATION
{$I UCommands.inc1.p}
END.