[AdgTransformationMode] Renamed to AdgTransformMode
[adg.git] / docs / gnu / TODO.xml
blob1f558bf333a3fe64100aa3f889a864033b8e8fb2
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>Provide a document with API guidelines take it as the holy bible!
71    All the APIs must comply with the rules of this document.</listitem>
72    <listitem>Resolve the TODOs in the adg/ directory: the only missing logic
73    should come from the CPML library (and there the TODO items are
74    bound to the less common use cases).</listitem>
75    <listitem>Create a separate project called lua-adg to host the lua bindings for
76    the ADG project. Provide a demo similar to adg-demo in lua.</listitem>
77    <listitem>Add italian localization.</listitem>
78    <listitem>Try to cross compile and build a windows binary package. Check out
79    <ulink url="http://ricardo.ecn.wfu.edu/~cottrell/cross-gtk/">Allin suggestions</ulink>
80    for hints.</listitem>
81    <listitem>Implement a decent "make check" target, basing the check programs on
82    the test framework of glib. Make this an optional feature, as this
83    framework is based on the too young glib-2.16.0.</listitem>
84 </itemizedlist>
86 </simplesect>
88 <simplesect id="TODO.0.6.0">
89 <title>Road to adg-0.6.0</title>
91 <para>The target of the 0.5 branch is to provide a usable canvas: with usable
92 it is meant a canvas that can generate fairly completed drawings. The
93 0.5.x releases leading up to 0.6.0 should add all the missing features
94 needed to generate this drawing.</para>
96 <itemizedlist mark="circle">
97    <listitem override="disc">Implement adg_matrix_normalize() to get rid of the scaling component
98    of a matrix: consider the point (0,0) and (1,1) on the identity matrix
99    and force on the matrix to normalize a distance of 1.4142... between
100    the same points by modifying only the xx and yy components.</listitem>
101    <listitem override="disc">Move the custom get_local_matrix() inside AdgEntity and implement a
102    common way to manage local matrix - entity interaction: for instance,
103    if the model is rotated an AdgToyText should rotate accordling but not
104    scale (usually, at least if it is not a text written on the model).</listitem>
105    <listitem override="disc">Implement AdgMarker as an abstract entity: it will be the base class
106    for arrows, ticks, squares, dots and so on.</listitem>
107    <listitem override="disc">Implement AdgArrow as AdgMarker derived entity.</listitem>
108    <listitem override="disc">Implement AdgArrowStyle directly inside the AdgDimStyle class and
109    provides a way to customize the markers.</listitem>
110    <listitem override="disc">Rework the style approach by detaching the slot and type concepts:
111    rename slot to dress and let the door opened to future expansion by
112    breaking the one style = one dress equation.</listitem>
113    <listitem override="disc">Rewrite AdgLDim to use the new marker APIs instead of hardcoding the
114    arrows and calling the deprecated rendering callbacks.</listitem>
115    <listitem override="disc">Implement the extents infrastructure that computes the bounding box
116    of the entities without rendering them.</listitem>
117    <listitem override="disc">Implement the outside arrows in AdgLDim.</listitem>
118    <listitem override="disc">Add AdgADim, the angular dimension.</listitem>
119    <listitem override="disc">Implement AdgEdges, a model that computes the edges of an AdgTrail
120    model and build a CpmlPath containing all the vertical edges.</listitem>
121    <listitem override="disc">Add AdgRDim, the radial dimension.</listitem>
122    <listitem override="disc">Rework styles by using GObject and properties.</listitem>
123    <listitem override="disc">Implement an abstract AdgFillStyle, abstracting the cairo_pattern_t
124    APIs and providing a way to customize filling, similar to what
125    AdgLineStyle does for stroking.</listitem>
126    <listitem override="disc">Add AdgRuledFill, an AdgFillStyle implementation that allows to fill
127    with a serie of parallel lines with customizable angle and distance.</listitem>
128    <listitem override="disc">Add AdgHatch, an entity very similar to AdgStroke but that uses
129    cairo_fill() instead of cairo_stroke().</listitem>
130    <listitem override="disc">Implement the extents also for the path so the AdgHatch entity can work
131    reliable: check if it is better to add new code in CPML or to directly
132    use the functions provided by cairo. (Implemented in CPML as the arc
133    primitive is not native in cairo and it is the only one with some quirks
134    in the extents computation)</listitem>
135    <listitem override="disc">Add labeling feature to the models and let AdgDim and children points
136    be expressed as references to those labeled points instead of using
137    explicit coordinates.</listitem>
138    <listitem>Add AdgToyTable, a container for AdgToyText in a framed environment.</listitem>
139    <listitem>Add AdgTitleBlock, a complex entity in global space used to frame the
140    sheet and show the general drawing data (title, scale, date and so on).</listitem>
141    <listitem override="disc">The dressing feature needs more attention: they are still not well
142    polished and always using the "dress" property will likely give name
143    conflicts: a basic mangling is required.</listitem>
144    <listitem>Allow the linear dimension to be decentralized by using the pos point
145    as reference and using a dedicated enum instead of a three-state.</listitem>
146    <listitem>Provide a decent demo program to show the progresses so far, including
147    title block, hatches and various dimensions types: update the website
148    with new (and hopefully more impressive) screenshots.</listitem>
149 </itemizedlist>
151 </simplesect>
153 <simplesect id="TODO.0.5.0">
154 <title>Road to adg-0.5.0</title>
156 <para>The target of the 0.4 branch is to build the base of the canvas:
157 few user visible changes but a quite stable base code. All the
158 main infrastructures should be in place.</para>
160 <itemizedlist mark="circle">
161    <listitem override="disc">Develop a basic demo CPML program to visually check the results.</listitem>
162    <listitem override="disc">Provide CPML APIs for accessing cairo paths and browse their segments
163    (a contiguous line segment).</listitem>
164    <listitem override="disc">Provide CPML APIs for accessing segments and browse their primitives
165    (a single line / curve / close path).</listitem>
166    <listitem override="disc">CPML APIs to offset cairo paths: specifically, a decent
167    approximation for single Bézier curves must be implemented.</listitem>
168    <listitem override="disc">Implement APIs to get intersection points between different primitives.</listitem>
169    <listitem override="disc">Provide an abstract API (cpml_segment_intersection?) to compute the
170    intersection points between two segments. To be evaluated the way to
171    return the results (maybe using an argument to specify the maximum
172    number of intersections to return).</listitem>
173    <listitem override="disc">Generate documentation for CPML.</listitem>
174    <listitem override="disc">Merge ldim and adg-demo into a single demo program, basing the user
175    interface on GtkBuilder.</listitem>
176    <listitem override="disc">Implement AdgModel as a bare empty class. Move the actual stuff in
177    AdgTitleBlock.</listitem>
178    <listitem override="disc">Add model-view interaction by providing signal propagation from AdgModel
179    to the dependent entities, so when a data changes the entities will be
180    automatically updated.</listitem>
181    <listitem override="disc">Rename AdgPath to AdgStroke, being the latter a stroke representation
182    of a single AdgPath.</listitem>
183    <listitem override="disc">Implement AdgPath as an AdgModel derived class of a conceptual path.
184    Any AdgPath instance could be referenced by one or more entities.</listitem>
185    <listitem override="disc">Add arcs in CPML to transparently support, whenever possible, the
186    conversion between arcs and Bézier curves.</listitem>
187    <listitem override="disc">Add to AdgPath the basic functionality to build a path: basically a
188    bunch of methods emulating the cairo path API but without the need of
189    a yet instantiated cairo context.</listitem>
190    <listitem override="disc">Add support for the CPML arc feature in AdgPath.</listitem>
191    <listitem override="disc">Update the demo using the newly implemented AdgPath to deeply test the
192    model/entity interaction.</listitem>
193    <listitem override="disc">Add a chamfer operation to AdgPath.</listitem>
194    <listitem override="disc">Add a fillet operation to AdgPath.</listitem>
195    <listitem override="disc">Change the matrix entity API, using a cleaner approach.</listitem>
196    <listitem override="disc">Move AdgTranslatable and AdgRotable directly inside AdgEntity.</listitem>
197    <listitem override="disc">Ensure there are no bitfield flags, as they are not binding friendly.</listitem>
198    <listitem override="disc">Change building scripts to get the GTK+ dependency optional.</listitem>
199    <listitem override="disc">Add AdgWidget, a GtkDrawingArea that can accept an AdgCanvas.</listitem>
200    <listitem override="disc">Optimize the implemented entities applying the 0.4 ADG infractrusture
201    and enable caching where applicable.</listitem>
202    <listitem override="disc">Use AdgToyText to draw dimenstion quote where applicable.</listitem>
203    <listitem override="disc">Add a "beyond" property to AdgDimStyle to be used when extending the
204    baseline beyond the extension lines. If not specified, it must default
205    to 3 x arrow size.</listitem>
206    <listitem override="disc">Add a three-state enum to adg-enums.h: ADG_THREE_STATE_OFF,
207    ADG_THREE_STATE_ON and ADG_THREE_STATE_UNKNOWN.</listitem>
208    <listitem override="disc">Add the three-state "outside" property to allow forcing an outside quote.
209    In the default state, the outside must be decided by the space between
210    the extension lines: if greather than 3 x arrow size => inside arrows.</listitem>
211 </itemizedlist>
213 </simplesect>
215 <simplesect id="TODO.0.4.0">
216 <title>Road to adg-0.4.0</title>
218 <para>The target for the 0.3 branch is to give a shape to the project: build
219 system, docs and a bunch of (probably temporary) basic classes should
220 be enough to give a direction.</para>
222 <itemizedlist mark="circle">
223    <listitem override="disc">Split mathematic stuff in its own library. It will be called CPML,
224    that is Cairo Path Manipulation Library.</listitem>
225    <listitem override="disc">Avoid wrapping of cairo APIs in AdgPath.</listitem>
226    <listitem override="disc">Implement AdgToyText, a basic text entity using the cairo "toy" text API.</listitem>
227    <listitem override="disc">Implement AdgTranslatable, a shared interface for entities that
228    can be translated.</listitem>
229    <listitem override="disc">Implement AdgRotable, a shared interface for entities that can be rotated.</listitem>
230 </itemizedlist>
232 </simplesect>
234 </chapter>