2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
6 <title>Planned features</title>
7 <subtitle>Indicative roadmap of ADG features implementation</subtitle>
9 <para>The following list is roughly in reversed implementation order. All the
10 improvements must be reflected in the demo programs, where applicable.</para>
12 <simplesect id="TODO.unknown">
13 <title>Road to unknown</title>
15 <para>This is the collection of TODOs that could be applied also after the
16 1.0.0 version has been released. They are usually non-blocking and hard
19 <itemizedlist mark="circle">
20 <listitem>Actually the AdgPath code is simplified to execute binary actions
21 only when the two operands are properly defined primitives. Anyway
22 those actions could be chained up in a lot of situations. For example,
23 it is quite common to have a chamfer followed by a fillet.</listitem>
24 <listitem override="disc">Hide the CPML APIs accessible from the CpmlPrimitive interface: use
25 a private struct of function pointers to delegate the job to the
26 different primitives.</listitem>
27 <listitem>Check if the decentralization of the quote is applicable to the
28 angular dimensions too and if it is worth the effort.</listitem>
29 <listitem>The ARROW and TRIANGLE markers should follow the director path that
30 could be a curve. Use the METAPOST solution suggested by John Hobby
31 in its METAPOST manual, that is given <parameter>angle</parameter> and <parameter>size</parameter>, rotate the
32 path by half <parameter>angle</parameter> in both directions, cut it with a circle centered
33 at the end of the director path with radius <parameter>size</parameter> and close the
34 resulting path (eventually filling it).</listitem>
35 <listitem override="disc">Implement AdgText, a generic text management, using pango.</listitem>
36 <listitem>Add a specialized GTK+ widget that allows the customization of the
37 rendering process. This should be a tree widget that provides
38 hierarchical access to AdgStyle and derived <emphasis>instances</emphasis> by
39 inspecting an AdgCanvas object, in a way similar to what
40 <ulink url="http://glade.gnome.org">glade</ulink> does with a GtkWindow. Add this
41 widget to a new tab in the edit dialog of adg-demo to expose and
42 test this new feature.</listitem>
43 <listitem>Add self-intersection API for CPML segments.</listitem>
44 <listitem>Add datum support: for implementation ideas checkout this
45 <ulink url="http://nvlpubs.nist.gov/nistpubs/jres/104/4/html/j44mac.htm">draft</ulink>.</listitem>
46 <listitem>The cairo library does not handle arcs natively. Actually the CPML
47 library is able to transparently convert them to Bézier curves
48 when needed. Add more logic to do the same in the reverse side,
49 that is to automatically convert curves to arcs when a curve is
50 close enough to an arc approximation. This will bring in a new
51 information that can be used in some operation, such as getting
52 the value to put in the quote of a radial dimension or offsetting
53 a curved segment in a precise way.</listitem>
54 <listitem>Improve Bézier offset approximation algorithm, possibly enabling
55 the feature of splitting the offset curve in more than one Bézier
56 arc when the error is not acceptable.</listitem>
57 <listitem>Include a Lua shell in the Windows installer for interactively
58 playing with the ADG canvas on that platform.</listitem>
59 <listitem>Add support for DXF format. The best approach would be to implement
60 a new surface type directly into cairo.</listitem>
65 <simplesect id="TODO.1.0.0">
66 <title>Road to adg-1.0.0</title>
68 <para>The tags in the 0.8 branch should be considered beta releases and are
69 supposed to solely improve stability. Addition to the API is still
70 possible though.</para>
72 <para>These releases should reach the wider audience, according to a niche
73 project such as the ADG canvas. This means each release should build
74 cleanly on different platforms such as FreeBSD and must be cross
75 compilable for Windows with MinGW.</para>
77 <itemizedlist mark="circle">
78 <listitem>A binary action after a close-path primitive leaves the shape opened:
79 closing and filleting results in a non-closed original shape.</listitem>
80 <listitem>Remove all warnings generated by newer tools, specifically the ones
81 generated by gtk-doc and by clang.</listitem>
82 <listitem override="disc">Instead of just providing a bunch of HTML file as documentation,
83 include a single PDF file inside the Windows installer. This is also a
84 more common convention in the Windows world.</listitem>
85 <listitem override="disc">The Windows installer needs to include a minimum set of icons
86 to let adg-demo run without warnings (e.g. the the + and - icons of a
87 GtkSpinButton widget).</listitem>
92 <simplesect id="TODO.0.8.0">
93 <title>Road to adg-0.8.0</title>
95 <para>The commits in the 0.7 branch should be atomics, that is a successful
96 build will be added as a prerequisite for each commit, so bisecting
97 with "git bisect" should be usable. The API should be considered almost
98 frozen. This is a testing branch: the target is to reach a sufficient
99 quality level to make beta releases.</para>
101 <itemizedlist mark="disc">
102 <listitem>Add a compilation prerequisite triggered by the commit hook, e.g.
103 leverage the TravisCI service provided by GitHub.</listitem>
104 <listitem>Check the test coverage by using gcov and eventually raise it to
105 at least 90%.</listitem>
106 <listitem>Add internationalization support to the installer: this includes also
107 the possibility to select the installation of language packs.</listitem>
108 <listitem>Improve the current internationalization support of the ADG: merge
109 po-properties/ into po/ and get rid of glib-gettext. Check the gleak
110 project for suggestions.</listitem>
111 <listitem>Provide a complete set of bindings based on GObject introspection and
112 develop a full-fledged adg-demo application with those bindings that
113 does the same job of adg-demo.c, in the same way.</listitem>
114 <listitem>Include a set of custom icons to visually differentiate the different
115 actions triggered by the cpml-demo program.</listitem>
120 <simplesect id="TODO.0.7.0">
121 <title>Road to adg-0.7.0</title>
123 <para>The target of the 0.6 branch is to clean up the code and stabilize the
124 API: the 0.7.0 release will probably be a beta release.</para>
126 <itemizedlist mark="disc">
127 <listitem>Add autoscaling to AdgCanvas. In other words, there must be a way
128 to select a specific scale from a finite set of predefined factors
129 depending on the current extents of the canvas.</listitem>
130 <listitem>Actually AdgLineStyle can change color, width, cap, join, miter
131 limit and antialiasing of a line. The only thing remaining is
132 the possibility to customize the dashing of a dashed line.</listitem>
133 <listitem>Provide a Windows installer (32 and 64 platforms) for the demo
134 program to show what can be accomplished with the ADG canvas.</listitem>
135 <listitem>Provide a document with API guidelines take it as the holy bible!
136 All the APIs must comply with the rules of this document.</listitem>
137 <listitem>Try to cross compile and build a windows binary package. Check out
138 <ulink url="http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/">Allin suggestions</ulink>
139 for hints.</listitem>
140 <listitem>Add printing support with page setup based on GtkPrintOperation provided
141 by GTK+ 2.10 (hence, always available if GTK+ support is enable).</listitem>
142 <listitem>Uncomplete entities should fail gracefully instead of complaining for
143 insufficient data. For example, a linear dimension without the
144 needed pairs should simply not be rendered without warnings.
145 This provides an easy way to implement optional machinings.</listitem>
146 <listitem>Expose conventions used by ADG APIs: this is mainly needed to make clear
147 getters must be considered read-only, also when returning non-const
148 values (because object referencing is always allowed).</listitem>
149 <listitem>Add italian localization.</listitem>
150 <listitem>Implement AdgGtkLayout, a new GTK+ widget that adds scrolling
151 capabilities to AdgGtkArea.</listitem>
152 <listitem>Add a new tab to the edit dialog of adg-demo to change the content
153 of the title block with custom labels.</listitem>
154 <listitem>Implement a decent "make check" target, basing the check programs on
155 the test framework of glib. Make this an optional feature, as this
156 framework is based on the too young glib-2.16.0.</listitem>
157 <listitem>Resolve the TODOs in the adg/ directory: the only missing logic
158 should come from the CPML library (and there the TODO items are
159 bound to the less common use cases).</listitem>
160 <listitem>Add support for GTK+3, possibly adding an optional check at configure
161 time and trying to keep the same codebase.</listitem>
162 <listitem>Enhance the AdgRDim class by adding an alternative rendering when the
163 "outside" property is enabled.</listitem>
164 <listitem>Create a separate project called adg-lua to host the lua bindings for
165 the ADG project. Provide a demo similar to adg-demo in lua.</listitem>
170 <simplesect id="TODO.0.6.0">
171 <title>Road to adg-0.6.0</title>
173 <para>The target of the 0.5 branch is to provide a usable canvas: with usable
174 it is meant a canvas that can generate fairly completed drawings. The
175 0.5.x releases leading up to 0.6.0 should add all the missing features
176 needed to generate this drawing.</para>
178 <itemizedlist mark="disc">
179 <listitem>Implement adg_matrix_normalize() to get rid of the scaling component
180 of a matrix: consider the point (0,0) and (1,1) on the identity matrix
181 and force on the matrix to normalize a distance of 1.4142... between
182 the same points by modifying only the xx and yy components.</listitem>
183 <listitem>Move the custom get_local_matrix() inside AdgEntity and implement a
184 common way to manage local matrix - entity interaction: for instance,
185 if the model is rotated an AdgToyText should rotate accordling but not
186 scale (usually, at least if it is not a text written on the model).</listitem>
187 <listitem>Implement AdgMarker as an abstract entity: it will be the base class
188 for arrows, ticks, squares, dots and so on.</listitem>
189 <listitem>Implement AdgArrow as AdgMarker derived entity.</listitem>
190 <listitem>Implement AdgArrowStyle directly inside the AdgDimStyle class and
191 provides a way to customize the markers.</listitem>
192 <listitem>Rework the style approach by detaching the slot and type concepts:
193 rename slot to dress and let the door opened to future expansion by
194 breaking the one style = one dress equation.</listitem>
195 <listitem>Rewrite AdgLDim to use the new marker APIs instead of hardcoding the
196 arrows and calling the deprecated rendering callbacks.</listitem>
197 <listitem>Implement the extents infrastructure that computes the bounding box
198 of the entities without rendering them.</listitem>
199 <listitem>Implement the outside arrows in AdgLDim.</listitem>
200 <listitem>Add AdgADim, the angular dimension.</listitem>
201 <listitem>Implement AdgEdges, a model that computes the edges of an AdgTrail
202 model and build a CpmlPath containing all the vertical edges.</listitem>
203 <listitem>Add AdgRDim, the radial dimension.</listitem>
204 <listitem>Rework styles by using GObject and properties.</listitem>
205 <listitem>Implement an abstract AdgFillStyle, abstracting the cairo_pattern_t
206 APIs and providing a way to customize filling, similar to what
207 AdgLineStyle does for stroking.</listitem>
208 <listitem>Add AdgRuledFill, an AdgFillStyle implementation that allows to fill
209 with a serie of parallel lines with customizable angle and distance.</listitem>
210 <listitem>Add AdgHatch, an entity very similar to AdgStroke but that uses
211 cairo_fill() instead of cairo_stroke().</listitem>
212 <listitem>Implement the extents also for the path so the AdgHatch entity can work
213 reliable: check if it is better to add new code in CPML or to directly
214 use the functions provided by cairo. (Implemented in CPML as the arc
215 primitive is not native in cairo and it is the only one with some quirks
216 in the extents computation)</listitem>
217 <listitem>Add labeling feature to the models and let AdgDim and children points
218 be expressed as references to those labeled points instead of using
219 explicit coordinates.</listitem>
220 <listitem>Add AdgTable, a container for AdgToyText in a framed environment.</listitem>
221 <listitem>Add AdgTitleBlock, a complex entity in global space used to frame the
222 sheet and show the general drawing data (title, scale, date and so on).</listitem>
223 <listitem>The dressing feature needs more attention: they are still not well
224 polished and always using the "dress" property will likely give name
225 conflicts: a basic mangling is required.</listitem>
226 <listitem>Allow the linear dimension to be decentralized by using the pos point
227 as reference and using a dedicated enum instead of a three-state.</listitem>
228 <listitem>Sanitize the ADG APIs: the public functions must cope with invalid
229 arguments without segmentation faults (without crossing the limits of
230 the C language and of the common sense).</listitem>
231 <listitem>Provide a decent demo program to show the progress so far, including
232 title block, hatches and various dimensions types: update the website
233 with new (and hopefully more impressive) screenshots.</listitem>
238 <simplesect id="TODO.0.5.0">
239 <title>Road to adg-0.5.0</title>
241 <para>The target of the 0.4 branch is to build the base of the canvas:
242 few user visible changes but a quite stable base code. All the
243 main infrastructures should be in place.</para>
245 <itemizedlist mark="disc">
246 <listitem>Develop a basic demo CPML program to visually check the results.</listitem>
247 <listitem>Provide CPML APIs for accessing cairo paths and browse their segments
248 (a contiguous line segment).</listitem>
249 <listitem>Provide CPML APIs for accessing segments and browse their primitives
250 (a single line / curve / close path).</listitem>
251 <listitem>CPML APIs to offset cairo paths: specifically, a decent
252 approximation for single Bézier curves must be implemented.</listitem>
253 <listitem>Implement APIs to get intersection points between different primitives.</listitem>
254 <listitem>Provide an abstract API (cpml_segment_intersection?) to compute the
255 intersection points between two segments. To be evaluated the way to
256 return the results (maybe using an argument to specify the maximum
257 number of intersections to return).</listitem>
258 <listitem>Generate documentation for CPML.</listitem>
259 <listitem>Merge ldim and adg-demo into a single demo program, basing the user
260 interface on GtkBuilder.</listitem>
261 <listitem>Implement AdgModel as a bare empty class. Move the actual stuff in
262 AdgTitleBlock.</listitem>
263 <listitem>Add model-view interaction by providing signal propagation from AdgModel
264 to the dependent entities, so when a data changes the entities will be
265 automatically updated.</listitem>
266 <listitem>Rename AdgPath to AdgStroke, being the latter a stroke representation
267 of a single AdgPath.</listitem>
268 <listitem>Implement AdgPath as an AdgModel derived class of a conceptual path.
269 Any AdgPath instance could be referenced by one or more entities.</listitem>
270 <listitem>Add arcs in CPML to transparently support, whenever possible, the
271 conversion between arcs and Bézier curves.</listitem>
272 <listitem>Add to AdgPath the basic functionality to build a path: basically a
273 bunch of methods emulating the cairo path API but without the need of
274 a yet instantiated cairo context.</listitem>
275 <listitem>Add support for the CPML arc feature in AdgPath.</listitem>
276 <listitem>Update the demo using the newly implemented AdgPath to deeply test the
277 model/entity interaction.</listitem>
278 <listitem>Add a chamfer operation to AdgPath.</listitem>
279 <listitem>Add a fillet operation to AdgPath.</listitem>
280 <listitem>Change the matrix entity API, using a cleaner approach.</listitem>
281 <listitem>Move AdgTranslatable and AdgRotable directly inside AdgEntity.</listitem>
282 <listitem>Ensure there are no bitfield flags, as they are not binding friendly.</listitem>
283 <listitem>Change building scripts to get the GTK+ dependency optional.</listitem>
284 <listitem>Add AdgGtkArea, a GtkDrawingArea that can accept an AdgCanvas.</listitem>
285 <listitem>Optimize the implemented entities applying the 0.4 ADG infractrusture
286 and enable caching where applicable.</listitem>
287 <listitem>Use AdgToyText to draw dimenstion quote where applicable.</listitem>
288 <listitem>Add a "beyond" property to AdgDimStyle to be used when extending the
289 baseline beyond the extension lines. If not specified, it must default
290 to 3 x arrow size.</listitem>
291 <listitem>Add a three-state enum to adg-enums.h: ADG_THREE_STATE_OFF,
292 ADG_THREE_STATE_ON and ADG_THREE_STATE_UNKNOWN.</listitem>
293 <listitem>Add the three-state "outside" property to allow forcing an outside quote.
294 In the default state, the outside must be decided by the space between
295 the extension lines: if greather than 3 x arrow size => inside arrows.</listitem>
300 <simplesect id="TODO.0.4.0">
301 <title>Road to adg-0.4.0</title>
303 <para>The target for the 0.3 branch is to give a shape to the project: build
304 system, docs and a bunch of (probably temporary) basic classes should
305 be enough to give a direction.</para>
307 <itemizedlist mark="disc">
308 <listitem>Split mathematic stuff in its own library. It will be called CPML,
309 that is Cairo Path Manipulation Library.</listitem>
310 <listitem>Avoid wrapping of cairo APIs in AdgPath.</listitem>
311 <listitem>Implement AdgToyText, a basic text entity using the cairo "toy" text API.</listitem>
312 <listitem>Implement AdgTranslatable, a shared interface for entities that
313 can be translated.</listitem>
314 <listitem>Implement AdgRotable, a shared interface for entities that can be rotated.</listitem>