InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
icurvefit.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: dstephen
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Purpose:
24 // Given a set of polygonal points, create a bezier which approximates the polygon.
25 //
26 //========================================================================================
27 
28 #ifndef __ICurveFit__
29 #define __ICurveFit__
30 
31 #include "IPMUnknown.h"
32 
33 class IOutlineInfo;
34 class IPathGeometry;
35 class PMReal;
36 
37 class ICurveFit : public IPMUnknown
38 {
39 public:
40 
41  virtual ErrorCode Smooth
42  (
43  const IPathGeometry* pathData, // Input data
44 
45  IPathGeometry* curves, // resulting path(s)
46 
47  const PMReal& pointTolerance, // Fidelity tolerance (in the units of the input data).
48  // The smaller the number the tighter the fit and the more segments you'll have.
49 
50  const PMReal& cornerTolerance, // Corner angle threshold in degrees. 180 turns off corner finding.
51 
52  const PMReal& smoothingTolerance, // controls smoothing. Use 0 to turn smoothing off. Smoothing tolerances
53  // are typically specified in decibels, where the ranges 0 to 40,
54  // 40 to 80 and 80 to 120 dbs correspond to large, moderate and small
55  // amounts of smoothing. For interactive smothing of small bumps or
56  // flat spots on curves, I use about 50 to 60 dbs.
57 
58  int16 noiseFilterLevel // number of passes through a guassian noise filter before smoothing.
59  // For data digitized from the mouse or a tablet, I use 4. This value
60  // is an integer in the range 0 to about 12. 0 turns off denoising. A
61  // value too large will cause the corner finder to fail, because sharp
62  // corners will have a tendency to be seen as noise and be removed.
63  ) const = 0;
64 };
65 
66 #endif