-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMapColorChanger.h
More file actions
67 lines (56 loc) · 2.48 KB
/
Copy pathMapColorChanger.h
File metadata and controls
67 lines (56 loc) · 2.48 KB
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
//========================================================================================
//
// $File: //ai/ai18/devtech/sdk/public/samplecode/MapColorChanger/Source/MapColorChanger.h $
//
// $Revision: #1 $
//
// Copyright 1987 Adobe Systems Incorporated. All rights reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
// with the terms of the Adobe license agreement accompanying it. If you have received
// this file from a source other than Adobe, then your use, modification, or
// distribution of it requires the prior written permission of Adobe.
//
//========================================================================================
#ifndef __MapColorChanger_H__
#define __MapColorChanger_H__
#include "IllustratorSDK.h"
#include "MapColorChangerID.h"
#include "CSVData.h"
#define DEFAULT_ANGLE _ShortToAIReal(50)
#define kBadSelectionErr '!sel'
// This structure will be passed back to Illustrator, so you can store
// information here that you will use next time the filter is called.
// This is different from the global variables block of the plug-in.
// Since a plug-in might have multiple filters, each one can have parameter
// block with different values, and the correct parameter block will be
// passed to the filter when it is called. This is easier than storing all
// possible parameters in the globals block. The structure is allocated using
// the MDMemory suite functions.
typedef struct
{
AIReal angle;
AIReal twirl;
AIRealPoint center;
AIReal diagonal;
}
parms_t;
class MapColorChanger
{
public:
// ASErr TwirlGetParms(AIFilterMessage* pb);
// ASErr TwirlGetParms(AILiveEffectEditParamMessage* pb);
// ASErr GoTwirl(AIFilterMessage* pb);
ASErr GoRecolor(AIMenuMessage* pb);
// ASErr GoTwirl(AILiveEffectGoMessage* pb);
// ASErr GetSelection(AIArtHandle*** matches, ai::int32* numMatches, ai::int32* totalSegments);
// void ReleaseSelection(AIArtHandle **matches);
ASErr RecolorMap(MapData *mapObject, AIArtHandle *mesh);
// creates sphere at every mesh vertex
ASErr CreateReferenceSpheres(AIArtHandle mesh);
boolean DoesDataFitMesh(MapData *mapObject, AIArtHandle *mesh);
ASErr TwirlPath(parms_t &pb, AIArtHandle art, ai::int32 progress_current, ai::int32 progress_total);
ASErr TwirlPath(AIFilterMessage *pb, AIArtHandle path, ai::int32 progress_current, ai::int32 progress_total);
ASErr DoTwirl(parms_t parms, AIArtHandle art, ai::int16 &progress_increment);
};
#endif // End MapColorChanger.h