[docs] Updated TODO.xml
[adg.git] / docs / gnu / TODO.xml
blobc15fd1f736f581e93cb78370369ef149da865ce9
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>Hide the CPML APIs accessible from the CpmlPrimitive interface: use
21    a private struct of function pointers to delegate the job to the
22    different primitives.</listitem>
23    <listitem>Check if the decentralization of the quote is applicable to the angular
24    dimensions too and if it is worth the effort.</listitem>
25    <listitem>The ARROW and TRIANGLE markers should follow the director path that
26    could be a curve. Use the METAPOST solution suggested by John Hobby
27    I don't remember where, that is given <parameter>angle</parameter> and <parameter>size</parameter>, rotate the
28    path by half <parameter>angle</parameter> in both directions, look for intersection with a
29    circle centered at the end of the director path with radius <parameter>size</parameter> and
30    close the resulting path.</listitem>
31    <listitem>Add connectivity feature to AdgModel: enable dependencies of models to
32    external data. Use libgda as sample data provider.</listitem>
33    <listitem>Implement AdgText, a generic text management, using pango.</listitem>
34    <listitem>Add self-intersection API for CPML segments.</listitem>
35    <listitem>Add datum support: for implementation ideas checkout this
36    <ulink url="http://nvl.nist.gov/pub/nistpubs/jres/104/4/html/j44mac.htm">draft</ulink>.</listitem>
37    <listitem>Add a CpmlArc primitive and some API to CpmlCurve to be able to check
38    if a curve is an arc approximation. This gives additional information
39    to do some operation, such as a proper radial quote on a Bézier curve.</listitem>
40    <listitem>Hunt the TODOs in CPML and fill the missing logic.</listitem>
41    <listitem>Improve Bézier offset approximation enabling the choice of approximate
42    a single curve with multiple offset curves.</listitem>
43 </itemizedlist>
45 </simplesect>
47 <simplesect id="TODO.1.0.0">
48 <title>Road to adg-1.0.0</title>
50 <para>The commits in the 0.7 branch should be atomics, that is a succesfull
51 built will be added as a prerequisite for each commit, so bisecting
52 with "git bisect" is usable. The API should be considered almost
53 frozen, new additions are still accepted tough. This is a testing
54 branch: the target is to reach a sufficient quality level to make
55 a 1.0.0 release.</para>
57 <para>These releases should reach the wider audience, accordling to a niche
58 project such as the ADG canvas. This means to build releases also
59 for different platforms, such as *BSD, OpenSolaris and Windows.</para>
61 </simplesect>
63 <simplesect id="TODO.0.7.0">
64 <title>Road to adg-0.7.0</title>
66 <para>The target of the 0.6 branch is to clean up the code and stabilize the
67 API: the 0.7.0 release will probably be a beta release.</para>
69 <itemizedlist mark="circle">
70    <listitem>Resolve the TODOs in the adg/ directory: the only missing logic
71    should come from the CPML library (and there the TODO items are
72    bound to the less common use cases).</listitem>
73    <listitem>Create a separate project called lua-adg to host the lua bindings for
74    the ADG project. Provide a demo similar to adg-demo in lua.</listitem>
75    <listitem>Add italian localization.</listitem>
76    <listitem>Try to cross compile and build a windows binary package. Check out
77    <ulink url="http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/">Allin suggestions</ulink>
78    for hints.</listitem>
79    <listitem>Implement a decent "make check" target, basing the check programs on
80    the test framework of glib. Make this an optional feature, as this
81    framework is based on the too young glib-2.16.0.</listitem>
82 </itemizedlist>
84 </simplesect>
86 <simplesect id="TODO.0.6.0">
87 <title>Road to adg-0.6.0</title>
89 <para>The target of the 0.5 branch is to provide a usable canvas: with usable
90 it is meant a canvas that can generate fairly completed drawings. The
91 0.5.x releases leading up to 0.6.0 should add all the missing features
92 needed to generate this drawing.</para>
94 <itemizedlist mark="circle">
95    <listitem override="disc">Implement adg_matrix_normalize() to get rid of the scaling component
96    of a matrix: consider the point (0,0) and (1,1) on the identity matrix
97    and force on the matrix to normalize a distance of 1.4142... between
98    the same points by modifying only the xx and yy components.</listitem>
99    <listitem override="disc">Move the custom get_local_matrix() inside AdgEntity and implement a
100    common way to manage local matrix - entity interaction: for instance,
101    if the model is rotated an AdgToyText should rotate accordling but not
102    scale (usually, at least if it is not a text written on the model).</listitem>
103    <listitem override="disc">Implement AdgMarker as an abstract entity: it will be the base class
104    for arrows, ticks, squares, dots and so on.</listitem>
105    <listitem override="disc">Implement AdgArrow as AdgMarker derived entity.</listitem>
106    <listitem override="disc">Implement AdgArrowStyle directly inside the AdgDimStyle class and
107    provides a way to customize the markers.</listitem>
108    <listitem override="disc">Rework the style approach by detaching the slot and type concepts:
109    rename slot to dress and let the door opened to future expansion by
110    breaking the one style = one dress equation.</listitem>
111    <listitem override="disc">Rewrite AdgLDim to use the new marker APIs instead of hardcoding the
112    arrows and calling the deprecated rendering callbacks.</listitem>
113    <listitem override="disc">Implement the extents infrastructure that computes the bounding box
114    of the entities without rendering them.</listitem>
115    <listitem override="disc">Implement the outside arrows in AdgLDim.</listitem>
116    <listitem override="disc">Add AdgADim, the angular dimension.</listitem>
117    <listitem override="disc">Implement AdgEdges, a model that computes the edges of an AdgTrail
118    model and build a CpmlPath containing all the vertical edges.</listitem>
119    <listitem override="disc">Add AdgRDim, the radial dimension.</listitem>
120    <listitem override="disc">Rework styles by using GObject and properties.</listitem>
121    <listitem override="disc">Implement an abstract AdgFillStyle, abstracting the cairo_pattern_t
122    APIs and providing a way to customize filling, similar to what
123    AdgLineStyle does for stroking.</listitem>
124    <listitem override="disc">Add AdgRuledFill, an AdgFillStyle implementation that allows to fill
125    with a serie of parallel lines with customizable angle and distance.</listitem>
126    <listitem override="disc">Add AdgHatch, an entity very similar to AdgStroke but that uses
127    cairo_fill() instead of cairo_stroke().</listitem>
128    <listitem override="disc">Implement the extents also for the path so the AdgHatch entity can work
129    reliable: check if it is better to add new code in CPML or to directly
130    use the functions provided by cairo. (Implemented in CPML as the arc
131    primitive is not native in cairo and it is the only one with some quirks
132    in the extents computation)</listitem>
133    <listitem>Add labeling feature to the models and let AdgDim and children points
134    be expressed as references to those labeled points instead of using
135    explicit coordinates.</listitem>
136    <listitem>Add AdgToyTable, a container for AdgToyText in a framed environment.</listitem>
137    <listitem>Add AdgTitleBlock, a complex entity in global space used to frame the
138    sheet and show the general drawing data (title, scale, date and so on).</listitem>
139    <listitem override="disc">The dressing feature needs more attention: they are still not well
140    polished and always using the "dress" property will likely give name
141    conflicts: a basic mangling is required.</listitem>
142    <listitem>Allow the linear dimension to be decentralized by using the pos point
143    as reference and using a dedicated enum instead of a three-state.</listitem>
144    <listitem>Provide a decent demo program to show the progresses so far, including
145    title block, hatches and various dimensions types: update the website
146    with new (and hopefully more impressive) screenshots.</listitem>
147 </itemizedlist>
149 </simplesect>
151 <simplesect id="TODO.0.5.0">
152 <title>Road to adg-0.5.0</title>
154 <para>The target of the 0.4 branch is to build the base of the canvas:
155 few user visible changes but a quite stable base code. All the
156 main infrastructures should be in place.</para>
158 <itemizedlist mark="circle">
159    <listitem override="disc">Develop a basic demo CPML program to visually check the results.</listitem>
160    <listitem override="disc">Provide CPML APIs for accessing cairo paths and browse their segments
161    (a contiguous line segment).</listitem>
162    <listitem override="disc">Provide CPML APIs for accessing segments and browse their primitives
163    (a single line / curve / close path).</listitem>
164    <listitem override="disc">CPML APIs to offset cairo paths: specifically, a decent
165    approximation for single Bézier curves must be implemented.</listitem>
166    <listitem override="disc">Implement APIs to get intersection points between different primitives.</listitem>
167    <listitem override="disc">Provide an abstract API (cpml_segment_intersection?) to compute the
168    intersection points between two segments. To be evaluated the way to
169    return the results (maybe using an argument to specify the maximum
170    number of intersections to return).</listitem>
171    <listitem override="disc">Generate documentation for CPML.</listitem>
172    <listitem override="disc">Merge ldim and adg-demo into a single demo program, basing the user
173    interface on GtkBuilder.</listitem>
174    <listitem override="disc">Implement AdgModel as a bare empty class. Move the actual stuff in
175    AdgTitleBlock.</listitem>
176    <listitem override="disc">Add model-view interaction by providing signal propagation from AdgModel
177    to the dependent entities, so when a data changes the entities will be
178    automatically updated.</listitem>
179    <listitem override="disc">Rename AdgPath to AdgStroke, being the latter a stroke representation
180    of a single AdgPath.</listitem>
181    <listitem override="disc">Implement AdgPath as an AdgModel derived class of a conceptual path.
182    Any AdgPath instance could be referenced by one or more entities.</listitem>
183    <listitem override="disc">Add arcs in CPML to transparently support, whenever possible, the
184    conversion between arcs and Bézier curves.</listitem>
185    <listitem override="disc">Add to AdgPath the basic functionality to build a path: basically a
186    bunch of methods emulating the cairo path API but without the need of
187    a yet instantiated cairo context.</listitem>
188    <listitem override="disc">Add support for the CPML arc feature in AdgPath.</listitem>
189    <listitem override="disc">Update the demo using the newly implemented AdgPath to deeply test the
190    model/entity interaction.</listitem>
191    <listitem override="disc">Add a chamfer operation to AdgPath.</listitem>
192    <listitem override="disc">Add a fillet operation to AdgPath.</listitem>
193    <listitem override="disc">Change the matrix entity API, using a cleaner approach.</listitem>
194    <listitem override="disc">Move AdgTranslatable and AdgRotable directly inside AdgEntity.</listitem>
195    <listitem override="disc">Ensure there are no bitfield flags, as they are not binding friendly.</listitem>
196    <listitem override="disc">Change building scripts to get the GTK+ dependency optional.</listitem>
197    <listitem override="disc">Add AdgWidget, a GtkDrawingArea that can accept an AdgCanvas.</listitem>
198    <listitem override="disc">Optimize the implemented entities applying the 0.4 ADG infractrusture
199    and enable caching where applicable.</listitem>
200    <listitem override="disc">Use AdgToyText to draw dimenstion quote where applicable.</listitem>
201    <listitem override="disc">Add a "beyond" property to AdgDimStyle to be used when extending the
202    baseline beyond the extension lines. If not specified, it must default
203    to 3 x arrow size.</listitem>
204    <listitem override="disc">Add a three-state enum to adg-enums.h: ADG_THREE_STATE_OFF,
205    ADG_THREE_STATE_ON and ADG_THREE_STATE_UNKNOWN.</listitem>
206    <listitem override="disc">Add the three-state "outside" property to allow forcing an outside quote.
207    In the default state, the outside must be decided by the space between
208    the extension lines: if greather than 3 x arrow size => inside arrows.</listitem>
209 </itemizedlist>
211 </simplesect>
213 <simplesect id="TODO.0.4.0">
214 <title>Road to adg-0.4.0</title>
216 <para>The target for the 0.3 branch is to give a shape to the project: build
217 system, docs and a bunch of (probably temporary) basic classes should
218 be enough to give a direction.</para>
220 <itemizedlist mark="circle">
221    <listitem override="disc">Split mathematic stuff in its own library. It will be called CPML,
222    that is Cairo Path Manipulation Library.</listitem>
223    <listitem override="disc">Avoid wrapping of cairo APIs in AdgPath.</listitem>
224    <listitem override="disc">Implement AdgToyText, a basic text entity using the cairo "toy" text API.</listitem>
225    <listitem override="disc">Implement AdgTranslatable, a shared interface for entities that
226    can be translated.</listitem>
227    <listitem override="disc">Implement AdgRotable, a shared interface for entities that can be rotated.</listitem>
228 </itemizedlist>
230 </simplesect>
232 </chapter>