b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | #ifndef PLOTMGT_FILL_HEADER |
19 | #define PLOTMGT_FILL_HEADER |
20 | |
21 | //---------------------------------------------------- |
22 | struct mpo_one_line |
23 | { |
24 | double X1, X2, X3, X4; |
25 | double Y1, Y2, Y3, Y4; |
26 | int type; // =0 then *---* *---* |
27 | // =1 then * *--* * |
28 | // =2 then *-------* * |
29 | // =3 then * *-----* |
30 | // =4 then * * |
31 | // =5 then *----------* |
32 | }; |
33 | |
34 | //!!!!!!!!!!!!!!!!!!! POLYARCS |
35 | // X, Y -- coordinates of ellipse |
36 | // a, b -- radiuses of ellipse |
37 | // alpha -- start angle of fill, beta -- add angle of filling |
38 | // gamma -- rotation angle of filling (non-dependent of delta) |
39 | // delta -- rotation angle of ellipse |
40 | // step -- filling step |
41 | int __InitFillArc(double X, double Y, double a, double b, double alpha, |
42 | double beta, double gamma, double delta, double step); |
43 | |
44 | // Get another line of fill |
45 | // n -- number of line |
46 | // data -- structure for retrieving coordinates of points |
47 | // data->n -- number of lines = {0, 1, 2} |
48 | // data->n = 1 line is (data->X1, data->Y1, data->X2, data->Y2) |
49 | // data->n = 2 line is (data->X1, data->Y1, data->X2, data->Y2) |
50 | // and (data->X3, data->Y3, data->X4, data->Y4) |
51 | int __GetLineOfFilledArc(int n, mpo_one_line &data); |
52 | |
53 | //Ending job with filler |
54 | void __DoneFillArc(void); |
55 | |
56 | //!!!!!!!!!!!!!!!!!!! POLYGONS |
57 | // double *X, *Y - coordinates of a points of a polygon |
58 | // n = count of points |
59 | // Point(X[0],Y[0]) = Point(X[n-1],Y[n-1]) (if no return 0) |
60 | // step - step of filling |
61 | // gamma -- angle of rotating filling |
62 | // Returns 0 if failts |
63 | // else return number of lines |
64 | int __InitFillPolygon(double* X, double* Y, int n, double step, double gamma = 0.); |
65 | |
66 | // Input: n = n-th point 0 <= n < number_of_lines |
67 | // Output: coordinates of a lines |
68 | // N - number of lines |
69 | // (X[2*i],Y[2*i+1]) - the i-th line , 0 <= i < N |
70 | // Return 0 if error |
71 | int __GetLineOfFilledPolygon (int n, int &N, double* &X, double* &Y); |
72 | |
73 | void __DoneFillPolygon(void); // Use it if you need |
74 | |
75 | #endif // PLOTMGT_FILL_HEADER |