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