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>Investigate the use of <ulink url="http://www.gnome-db.org">libgda</ulink> as a sample
36 data provider and check if it is worth to add custom methods to
37 AdgModel to improve the interoperatibility between adg and libgda.</listitem>
38 <listitem override="disc">Implement AdgText, a generic text management, using pango.</listitem>
39 <listitem>Add a specialized GTK+ widget that allows the customization of the
40 rendering process. This should be a tree widget that provides
41 hierarchical access to AdgStyle and derived <emphasis>instances</emphasis> by
42 inspecting an AdgCanvas object, in a way similar to what
43 <ulink url="http://glade.gnome.org">glade</ulink> does with a GtkWindow. Add this
44 widget to a new tab in the edit dialog of adg-demo to expose and
45 test this new feature.</listitem>
46 <listitem>Add self-intersection API for CPML segments.</listitem>
47 <listitem>Add datum support: for implementation ideas checkout this
48 <ulink url="http://nvlpubs.nist.gov/nistpubs/jres/104/4/html/j44mac.htm">draft</ulink>.</listitem>
49 <listitem>The cairo library does not handle arcs natively. Actually the CPML
50 library is able to transparently convert them to Bézier curves
51 when needed. Add more logic to do the same in the reverse side,
52 that is to automatically convert curves to arcs when a curve is
53 close enough to an arc approximation. This will bring in a new
54 information that can be used in some operation, such as getting
55 the value to put in the quote of a radial dimension or offsetting
56 a curved segment in a precise way.</listitem>
57 <listitem>Improve Bézier offset approximation algorithm, possibly enabling
58 the feature of splitting the offset curve in more than one Bézier
59 arc when the error is not acceptable.</listitem>
64 <simplesect id="TODO.1.0.0">
65 <title>Road to adg-1.0.0</title>
67 <para>The commits in the 0.7 branch should be atomics, that is a succesfull
68 built will be added as a prerequisite for each commit, so bisecting
69 with "git bisect" is usable. The API should be considered almost
70 frozen, new additions are still accepted tough. This is a testing
71 branch: the target is to reach a sufficient quality level to make
72 a 1.0.0 release.</para>
74 <para>These releases should reach the wider audience, according to a niche
75 project such as the ADG canvas. This means to build releases also
76 for different platforms, such as *BSD, OpenSolaris and Windows.</para>
78 <itemizedlist mark="circle">
79 <listitem>A binary action after a close-path primitive leaves the shape opened:
80 closing and filleting results in a non-closed original shape.</listitem>
81 <listitem>Add internationalization support to the installer: this includes also
82 the possibility to select the installation of language packs.</listitem>
87 <simplesect id="TODO.0.7.0">
88 <title>Road to adg-0.7.0</title>
90 <para>The target of the 0.6 branch is to clean up the code and stabilize the
91 API: the 0.7.0 release will probably be a beta release.</para>
93 <itemizedlist mark="disc">
94 <listitem>Add autoscaling to AdgCanvas. In other words, there must be a way
95 to select a specific scale from a finite set of predefined factors
96 depending on the current extents of the canvas.</listitem>
97 <listitem>Actually AdgLineStyle can change color, width, cap, join, miter
98 limit and antialiasing of a line. The only thing remaining is
99 the possibility to customize the dashing of a dashed line.</listitem>
100 <listitem>Provide a Windows installer (32 and 64 platforms) for the demo
101 program to show what can be accomplished with the ADG canvas.</listitem>
102 <listitem>Provide a document with API guidelines take it as the holy bible!
103 All the APIs must comply with the rules of this document.</listitem>
104 <listitem>Try to cross compile and build a windows binary package. Check out
105 <ulink url="http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/">Allin suggestions</ulink>
106 for hints.</listitem>
107 <listitem>Add printing support with page setup based on GtkPrintOperation provided
108 by GTK+ 2.10 (hence, always available if GTK+ support is enable).</listitem>
109 <listitem>Uncomplete entities should fail gracefully instead of complaining for
110 insufficient data. For example, a linear dimension without the
111 needed pairs should simply not be rendered without warnings.
112 This provides an easy way to implement optional machinings.</listitem>
113 <listitem>Expose conventions used by ADG APIs: this is mainly needed to make clear
114 getters must be considered read-only, also when returning non-const
115 values (because object referencing is always allowed).</listitem>
116 <listitem>Add italian localization.</listitem>
117 <listitem>Implement AdgGtkLayout, a new GTK+ widget that adds scrolling
118 capabilities to AdgGtkArea.</listitem>
119 <listitem>Add a new tab to the edit dialog of adg-demo to change the content
120 of the title block with custom labels.</listitem>
121 <listitem>Implement a decent "make check" target, basing the check programs on
122 the test framework of glib. Make this an optional feature, as this
123 framework is based on the too young glib-2.16.0.</listitem>
124 <listitem>Resolve the TODOs in the adg/ directory: the only missing logic
125 should come from the CPML library (and there the TODO items are
126 bound to the less common use cases).</listitem>
127 <listitem>Add support for GTK+3, possibly adding an optional check at configure
128 time and trying to keep the same codebase.</listitem>
129 <listitem>Enhance the AdgRDim class by adding an alternative rendering when the
130 "outside" property is enabled.</listitem>
131 <listitem>Create a separate project called adg-lua to host the lua bindings for
132 the ADG project. Provide a demo similar to adg-demo in lua.</listitem>
137 <simplesect id="TODO.0.6.0">
138 <title>Road to adg-0.6.0</title>
140 <para>The target of the 0.5 branch is to provide a usable canvas: with usable
141 it is meant a canvas that can generate fairly completed drawings. The
142 0.5.x releases leading up to 0.6.0 should add all the missing features
143 needed to generate this drawing.</para>
145 <itemizedlist mark="disc">
146 <listitem>Implement adg_matrix_normalize() to get rid of the scaling component
147 of a matrix: consider the point (0,0) and (1,1) on the identity matrix
148 and force on the matrix to normalize a distance of 1.4142... between
149 the same points by modifying only the xx and yy components.</listitem>
150 <listitem>Move the custom get_local_matrix() inside AdgEntity and implement a
151 common way to manage local matrix - entity interaction: for instance,
152 if the model is rotated an AdgToyText should rotate accordling but not
153 scale (usually, at least if it is not a text written on the model).</listitem>
154 <listitem>Implement AdgMarker as an abstract entity: it will be the base class
155 for arrows, ticks, squares, dots and so on.</listitem>
156 <listitem>Implement AdgArrow as AdgMarker derived entity.</listitem>
157 <listitem>Implement AdgArrowStyle directly inside the AdgDimStyle class and
158 provides a way to customize the markers.</listitem>
159 <listitem>Rework the style approach by detaching the slot and type concepts:
160 rename slot to dress and let the door opened to future expansion by
161 breaking the one style = one dress equation.</listitem>
162 <listitem>Rewrite AdgLDim to use the new marker APIs instead of hardcoding the
163 arrows and calling the deprecated rendering callbacks.</listitem>
164 <listitem>Implement the extents infrastructure that computes the bounding box
165 of the entities without rendering them.</listitem>
166 <listitem>Implement the outside arrows in AdgLDim.</listitem>
167 <listitem>Add AdgADim, the angular dimension.</listitem>
168 <listitem>Implement AdgEdges, a model that computes the edges of an AdgTrail
169 model and build a CpmlPath containing all the vertical edges.</listitem>
170 <listitem>Add AdgRDim, the radial dimension.</listitem>
171 <listitem>Rework styles by using GObject and properties.</listitem>
172 <listitem>Implement an abstract AdgFillStyle, abstracting the cairo_pattern_t
173 APIs and providing a way to customize filling, similar to what
174 AdgLineStyle does for stroking.</listitem>
175 <listitem>Add AdgRuledFill, an AdgFillStyle implementation that allows to fill
176 with a serie of parallel lines with customizable angle and distance.</listitem>
177 <listitem>Add AdgHatch, an entity very similar to AdgStroke but that uses
178 cairo_fill() instead of cairo_stroke().</listitem>
179 <listitem>Implement the extents also for the path so the AdgHatch entity can work
180 reliable: check if it is better to add new code in CPML or to directly
181 use the functions provided by cairo. (Implemented in CPML as the arc
182 primitive is not native in cairo and it is the only one with some quirks
183 in the extents computation)</listitem>
184 <listitem>Add labeling feature to the models and let AdgDim and children points
185 be expressed as references to those labeled points instead of using
186 explicit coordinates.</listitem>
187 <listitem>Add AdgTable, a container for AdgToyText in a framed environment.</listitem>
188 <listitem>Add AdgTitleBlock, a complex entity in global space used to frame the
189 sheet and show the general drawing data (title, scale, date and so on).</listitem>
190 <listitem>The dressing feature needs more attention: they are still not well
191 polished and always using the "dress" property will likely give name
192 conflicts: a basic mangling is required.</listitem>
193 <listitem>Allow the linear dimension to be decentralized by using the pos point
194 as reference and using a dedicated enum instead of a three-state.</listitem>
195 <listitem>Sanitize the ADG APIs: the public functions must cope with invalid
196 arguments without segmentation faults (without crossing the limits of
197 the C language and of the common sense).</listitem>
198 <listitem>Provide a decent demo program to show the progress so far, including
199 title block, hatches and various dimensions types: update the website
200 with new (and hopefully more impressive) screenshots.</listitem>
205 <simplesect id="TODO.0.5.0">
206 <title>Road to adg-0.5.0</title>
208 <para>The target of the 0.4 branch is to build the base of the canvas:
209 few user visible changes but a quite stable base code. All the
210 main infrastructures should be in place.</para>
212 <itemizedlist mark="disc">
213 <listitem>Develop a basic demo CPML program to visually check the results.</listitem>
214 <listitem>Provide CPML APIs for accessing cairo paths and browse their segments
215 (a contiguous line segment).</listitem>
216 <listitem>Provide CPML APIs for accessing segments and browse their primitives
217 (a single line / curve / close path).</listitem>
218 <listitem>CPML APIs to offset cairo paths: specifically, a decent
219 approximation for single Bézier curves must be implemented.</listitem>
220 <listitem>Implement APIs to get intersection points between different primitives.</listitem>
221 <listitem>Provide an abstract API (cpml_segment_intersection?) to compute the
222 intersection points between two segments. To be evaluated the way to
223 return the results (maybe using an argument to specify the maximum
224 number of intersections to return).</listitem>
225 <listitem>Generate documentation for CPML.</listitem>
226 <listitem>Merge ldim and adg-demo into a single demo program, basing the user
227 interface on GtkBuilder.</listitem>
228 <listitem>Implement AdgModel as a bare empty class. Move the actual stuff in
229 AdgTitleBlock.</listitem>
230 <listitem>Add model-view interaction by providing signal propagation from AdgModel
231 to the dependent entities, so when a data changes the entities will be
232 automatically updated.</listitem>
233 <listitem>Rename AdgPath to AdgStroke, being the latter a stroke representation
234 of a single AdgPath.</listitem>
235 <listitem>Implement AdgPath as an AdgModel derived class of a conceptual path.
236 Any AdgPath instance could be referenced by one or more entities.</listitem>
237 <listitem>Add arcs in CPML to transparently support, whenever possible, the
238 conversion between arcs and Bézier curves.</listitem>
239 <listitem>Add to AdgPath the basic functionality to build a path: basically a
240 bunch of methods emulating the cairo path API but without the need of
241 a yet instantiated cairo context.</listitem>
242 <listitem>Add support for the CPML arc feature in AdgPath.</listitem>
243 <listitem>Update the demo using the newly implemented AdgPath to deeply test the
244 model/entity interaction.</listitem>
245 <listitem>Add a chamfer operation to AdgPath.</listitem>
246 <listitem>Add a fillet operation to AdgPath.</listitem>
247 <listitem>Change the matrix entity API, using a cleaner approach.</listitem>
248 <listitem>Move AdgTranslatable and AdgRotable directly inside AdgEntity.</listitem>
249 <listitem>Ensure there are no bitfield flags, as they are not binding friendly.</listitem>
250 <listitem>Change building scripts to get the GTK+ dependency optional.</listitem>
251 <listitem>Add AdgGtkArea, a GtkDrawingArea that can accept an AdgCanvas.</listitem>
252 <listitem>Optimize the implemented entities applying the 0.4 ADG infractrusture
253 and enable caching where applicable.</listitem>
254 <listitem>Use AdgToyText to draw dimenstion quote where applicable.</listitem>
255 <listitem>Add a "beyond" property to AdgDimStyle to be used when extending the
256 baseline beyond the extension lines. If not specified, it must default
257 to 3 x arrow size.</listitem>
258 <listitem>Add a three-state enum to adg-enums.h: ADG_THREE_STATE_OFF,
259 ADG_THREE_STATE_ON and ADG_THREE_STATE_UNKNOWN.</listitem>
260 <listitem>Add the three-state "outside" property to allow forcing an outside quote.
261 In the default state, the outside must be decided by the space between
262 the extension lines: if greather than 3 x arrow size => inside arrows.</listitem>
267 <simplesect id="TODO.0.4.0">
268 <title>Road to adg-0.4.0</title>
270 <para>The target for the 0.3 branch is to give a shape to the project: build
271 system, docs and a bunch of (probably temporary) basic classes should
272 be enough to give a direction.</para>
274 <itemizedlist mark="disc">
275 <listitem>Split mathematic stuff in its own library. It will be called CPML,
276 that is Cairo Path Manipulation Library.</listitem>
277 <listitem>Avoid wrapping of cairo APIs in AdgPath.</listitem>
278 <listitem>Implement AdgToyText, a basic text entity using the cairo "toy" text API.</listitem>
279 <listitem>Implement AdgTranslatable, a shared interface for entities that
280 can be translated.</listitem>
281 <listitem>Implement AdgRotable, a shared interface for entities that can be rotated.</listitem>