Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
MigrateToVersion6.cpp
1 #include "MigrateToVersion6.h"
2 
4 {
5 }
6 
7 ColorPalette MigrateToVersion6::colorPalette (int preVersion6) const
8 {
9  switch (preVersion6) {
10  case 0:
11  return COLOR_PALETTE_BLACK;
12 
13  case 1:
14  return COLOR_PALETTE_BLUE;
15 
16  case 2:
17  return COLOR_PALETTE_CYAN;
18 
19  case 3:
20  return COLOR_PALETTE_GOLD;
21 
22  case 4:
23  return COLOR_PALETTE_GREEN;
24 
25  case 5:
26  return COLOR_PALETTE_MAGENTA;
27 
28  case 6:
29  return COLOR_PALETTE_RED;
30 
31  case 7:
32  return COLOR_PALETTE_TRANSPARENT;
33 
34  case 8:
35  return COLOR_PALETTE_YELLOW;
36 
37  default:
38  return COLOR_PALETTE_BLACK;
39  }
40 }
41 
42 CurveConnectAs MigrateToVersion6::curveConnectAs (int preVersion6) const
43 {
44  switch (preVersion6) {
45  case 0:
46  return CONNECT_AS_FUNCTION_STRAIGHT;
47 
48  case 1:
49  return CONNECT_AS_RELATION_STRAIGHT;
50 
51  default:
52  return CONNECT_AS_FUNCTION_STRAIGHT;
53  }
54 }
55 
56 PointShape MigrateToVersion6::pointShape (int preVersion6) const
57 {
58  switch (preVersion6) {
59  case 0:
60  return POINT_SHAPE_CROSS;
61 
62  case 1:
63  return POINT_SHAPE_X;
64 
65  case 2:
66  return POINT_SHAPE_DIAMOND;
67 
68  case 3:
69  return POINT_SHAPE_SQUARE;
70 
71  case 4:
72  return POINT_SHAPE_TRIANGLE;
73 
74  default:
75  return POINT_SHAPE_CROSS;
76  }
77 }
78 
79 int MigrateToVersion6::pointRadius (int preVersion6) const
80 {
81  // From pointsetstyles.h
82  return 2 * (preVersion6 + 1);
83 }
int pointRadius(int preVersion6) const
Point radius.
ColorPalette colorPalette(int preVersion6) const
Color from color palette.
PointShape pointShape(int preVersion6) const
Point shape.
MigrateToVersion6()
Single constructor.
CurveConnectAs curveConnectAs(int preVersion6) const
Line drawn between points.