diff options
| author | Campbell Barton <ideasman42@gmail.com> | 2012-10-04 02:30:12 +0000 |
|---|---|---|
| committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-04 02:30:12 +0000 |
| commit | aca1914d674a5e81234208248e3c8515a60dd19d (patch) | |
| tree | 6b5aad94dc60e62e571cddc482528f62180e2981 /src/trace/quantize.cpp | |
| parent | code cleanup: make more functions static or include their own headers. (diff) | |
| download | inkscape-aca1914d674a5e81234208248e3c8515a60dd19d.tar.gz inkscape-aca1914d674a5e81234208248e3c8515a60dd19d.zip | |
code cleanup: make more functions static, add includes.
(bzr r11737)
Diffstat (limited to 'src/trace/quantize.cpp')
| -rw-r--r-- | src/trace/quantize.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/trace/quantize.cpp b/src/trace/quantize.cpp index 2db1bbf34..ba9306da8 100644 --- a/src/trace/quantize.cpp +++ b/src/trace/quantize.cpp @@ -16,6 +16,7 @@ #include "pool.h" #include "imagemap.h" +#include "quantize.h" typedef struct Ocnode_def Ocnode; @@ -211,16 +212,19 @@ static void ocnodePrint(Ocnode *node, int indent) ocnodePrint(node->child[i], indent+2); } } + +#if 0 void octreePrint(Ocnode *node) { printf("<<octree>>\n"); if (node) printf("[r:%p] ", node); ocnodePrint(node, 2); } +#endif /** * builds a single <rgb> color leaf at location <ref> */ -void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb) +static void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb) { assert(ref); Ocnode *node = ocnodeNew(pool); @@ -237,7 +241,7 @@ void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb) /** * merge nodes <node1> and <node2> at location <ref> with parent <parent> */ -int octreeMerge(pool<Ocnode> *pool, Ocnode *parent, Ocnode **ref, Ocnode *node1, Ocnode *node2) +static int octreeMerge(pool<Ocnode> *pool, Ocnode *parent, Ocnode **ref, Ocnode *node1, Ocnode *node2) { assert(ref); if (!node1 && !node2) return 0; @@ -415,7 +419,7 @@ static void ocnodeStrip(pool<Ocnode> *pool, Ocnode **ref, int *count, unsigned l /** * reduce the leaves of an octree to a given number */ -void octreePrune(pool<Ocnode> *pool, Ocnode **ref, int ncolor) +static void octreePrune(pool<Ocnode> *pool, Ocnode **ref, int ncolor) { assert(ref); assert(ncolor > 0); @@ -435,8 +439,8 @@ void octreePrune(pool<Ocnode> *pool, Ocnode **ref, int ncolor) * build an octree associated to the area of a color map <rgbmap>, * included in the specified (x1,y1)--(x2,y2) rectangle. */ -void octreeBuildArea(pool<Ocnode> *pool, RgbMap *rgbmap, Ocnode **ref, - int x1, int y1, int x2, int y2, int ncolor) +static void octreeBuildArea(pool<Ocnode> *pool, RgbMap *rgbmap, Ocnode **ref, + int x1, int y1, int x2, int y2, int ncolor) { int dx = x2 - x1, dy = y2 - y1; int xm = x1 + dx/2, ym = y1 + dy/2; @@ -465,7 +469,7 @@ void octreeBuildArea(pool<Ocnode> *pool, RgbMap *rgbmap, Ocnode **ref, * build an octree associated to the <rgbmap> color map, * pruned to <ncolor> colors. */ -Ocnode *octreeBuild(pool<Ocnode> *pool, RgbMap *rgbmap, int ncolor) +static Ocnode *octreeBuild(pool<Ocnode> *pool, RgbMap *rgbmap, int ncolor) { //create the octree Ocnode *node = NULL; |
