sp-mesh-array.h revision 214a2dca4418a9937d7142e42ed91fdfdb86ae16
1N/A * Tavmjong Bah <tavmjong@free.fr> 1N/A * Copyrigt (C) 2012 Tavmjong Bah 1N/A * Released under GNU GPL, read the file 'COPYING' for more information 1N/A A group of classes and functions for manipulating mesh gradients. 1N/A A mesh is made up of an array of patches. Each patch has four sides and four corners. The sides can 1N/A be shared between two patches and the corners between up to four. 1N/A The order of the points for each side always goes from left to right or top to bottom. 1N/A For sides 2 and 3 the points must be reversed when used (as in calls to cairo functions). 1N/A Two patches: (C=corner, S=side, H=handle, T=tensor) 1N/A C0 H1 H2 C1 C0 H1 H2 C1 1N/A + ---------- + ---------- + 1N/A H1 | T0 T1 |H1 T0 T1 | H1 1N/A H2 | T3 T2 |H2 T3 T2 | H2 1N/A + ---------- + ---------- + 1N/A C3 H1 H2 C2 C3 H1 H2 C2 1N/A The mesh is stored internally as an array of nodes that includes the tensor nodes. 1N/A Note: This code uses tensor points which are not part of the SVG2 plan at the moment. 1N/A Including tensor points was motivated by a desire to experiment with their usefulness 1N/A in smoothing color transitions. There doesn't seem to be much advantage for that 1N/A purpose. However including them internally allows for storing all the points in 1N/A an array which simplifies things like inserting new rows or columns. 1N/A// Is a node along an edge? 1N/A// I for Internal to distinguish it from the Object class 1N/A// This is a convenience class... 1N/A// An array of mesh nodes. 1N/A // Draggables to nodes 1N/A // Fill 'smooth' with a smoothed version by subdividing each patch. 1N/A // Get size of patch 1N/A // Operations on corners 1N/A // Update other nodes in response to a node move. 1N/A#
endif /* !SEEN_SP_MESH_ARRAY_H */ 1N/A c-file-style:"stroustrup" 1N/A c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) 1N/A indent-tabs-mode:nil 1N/A// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :