-
Notifications
You must be signed in to change notification settings - Fork 0
/
Notes.txt
164 lines (121 loc) · 6.54 KB
/
Notes.txt
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
0001.0 10 February 2012 - Friday
0001.1 Working on the positional relationships between the various parts of
the two right panels (XZ and YZ). They really should look identical
to the left (XY) panel.
From the Object Inspector
The PRIMARY XY drawing controls:
Panel3 { The underlying panel for XY - needed to handle Splitter1 }
Panel5 { The bottom caption panel "X" }
Panel6 { The right caption panel "Y" }
Panel7 { The intermediate panel for XY - see contents below }
ScrollBarXY_X { bottom of Panel 7 }
ScrollBarXY_Y { right of Panel 7 }
Panel12 { Contains the X and Y rulers ( X first }
XYRuler_XPB { X ruler's paint box }
XYRuler_YPB { Y ruler's paint box }
XYDrawingPB { The drawing paint box }
The lower right ZY drawing controls (as of 10:20 AM)
Panel2 { The underlying panel fo YZ - needed to handle Splitter2 }
Panel9 { The bottom caption panel "Y" }
Panel11 { The right caption panel "Z" } <== Need intermediate panel
YZRuler_YPB { Y ruler's paint box } <== Should be child of paint-box panel
YZRuler_ZPB { Z ruler's paint box }
ScrollBarYZ_Z
ScrollBarYZ_Y
The lower right YZ drawing controls as they should be.
Panel2 { The underlying panel fo YZ - needed to handle Splitter2 }
Panel9 { The bottom caption panel "Y" }
Panel11 { The right caption panel "Z" }
Panel13
ScrollBarYZ_Y
ScrollBarYZ_Y
Panel12
YZRuler_YPB { Y ruler's paint box }
YZRuler_ZPB { Z ruler's paint box }
YZDrawing
0002.0 25 February 2012 - Sunday
0002.1 Did total redesign of the drawing controls - Created a single frame
containing the drawing box and two rulers - eliminated the scroll bars
because they had insufficient resolution even at the pixel level.
Changed the scrolling capability to use the rulers. Just click on ruler
and drag in the direction you want to move and the ruler (and drawing)
follows the cursor. Much better design. Also eliminates the need to
know the exact extents (minX, maxX, etc.) of the drawing.
Once I got the single frame working, I created a DrawingSetFrame that
has three DrawingFrames separated by splitters for XY, XZ and YZ axes.
Handled the resize event to keep the relative sizes of the DrawingFrames
constant.
0002.2 Started working on the implementation of Layers. Original concept was to
allow the user to generate his own layer labels and re-order them according
to the order in which he wanted to render them.
Decided to start off with a pre-defined set of layers with a fixed order
of rendering as in (in this list, the top layers are rendered first, the
lowest layers are rendered last. This way the track layers have higher
priority than anything else. Need to worry about rendering tunnels):
Building/Room
Framework
Scenery (elevation and vegetation).
Structures
Track 3
Track 2
Track 1
Layers themselves will be Objects with differing drawing abilities.
As in:
TLayer = class(TPersistentz)
TBuildingLayer = class(TLayer) ...
*
*
*
TTrack = class(TLayer).
Track rendering will be best effort based on Track Gauge, Scale (e.g. HO,
N, Z) and Drawing Zoom. At highest zoom ratios they will be rendered as
single pixel lines.
Available thrack gauges will be:
5'0". (Eastern European, Russia, etc.)
4'8.5" (Standard Gauge)
3 m. (Xnm)
3'0" (Xn3)
2'6" (Xn2.5)
2'0" (Xn2 Maine 2 footers).
Make provisions for eventual dual gauge track rendering.
0003.0 April 27, 2012
0003.1 Did a lot of work without entering in these notes.
Notes about Drawing editing:
Mouse Down: Selects individual objects.
Ctrl Mouse Down selects multiple objects.
Not on object - deselects all objects.
On Selected Object but NOT on handle, sets move-object flag
(Worry about handle selection when multiple objects are
selected).
Mouse Up: Stops move of selected objects. clears move object flag.
Mouse Move: Moves all selected objects if move-object flag is set.
After implementing the above and combining the Invalidate calls to
one at the end of the method (if needed) the move-object functionality
works like a charm!!!!!
0004.0 April 28, 2012 Saturday
0004.1 Now need to work on moving handles - specific to the individual
object kind (e.g., straight line, ellipsoid, ... ).
Ran into problem with assignment of objects (specifically deep
copying). After some research I found that:
1) Freepascal/Delphi now has generics - I can improve
the type safety of the lists significantly.
2) With the latest versions of RTTI I can create
a really compact object factory.
0005.0 April 30, 2012 - Monday
Since the generic capablility allows generation of libraries
that are common to multiple projects, I am going to return the
common1 and persistent1 units to the MagicLibraries folder and
make sure I can compile them before I start using generic types.
Got it done.
0006.0 May 9, 2012 - Wednesday
0006.1 Got the new persists1 and generic1 units to compile and test
properly. Tried to integrate them with the MagicTracks app but
ran into problems with the creation of objects by the Object Factory.
Not sure that I got the integration correct so here is the
data design for the Drawing:
Drawing1 TDrawing
TPreferences
TLayers == specialize TMagicList<TLayer>->TDrawingObjectList->TLayers { rename TDrawingObjectList to TLayerList - crash with DrawingObject1 use of same type name }
TLayer ==
specialize TMagicList<TDrawingObject>->TDrawingObjectList->TDrawingObjects
{ the two guides should be changed to use T3Point }