diff options
author | joye <joye> | 2014-03-31 19:27:50 (GMT) |
---|---|---|
committer | joye <joye> | 2014-03-31 19:27:50 (GMT) |
commit | e3566638279b7f54da2fbc4308319293e6b0f85d (patch) | |
tree | db5f9902b2273d167a43e665475f60aced9dd68e | |
parent | 6664ce18fa1f2b78f926c05f62ff276a8d5abe5c (diff) | |
download | blt-e3566638279b7f54da2fbc4308319293e6b0f85d.zip blt-e3566638279b7f54da2fbc4308319293e6b0f85d.tar.gz blt-e3566638279b7f54da2fbc4308319293e6b0f85d.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGrElem.h | 16 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 1 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 1 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 3 | ||||
-rw-r--r-- | src/bltGrElemOp.h | 6 | ||||
-rw-r--r-- | src/bltGrElemOption.h | 39 |
6 files changed, 60 insertions, 6 deletions
diff --git a/src/bltGrElem.h b/src/bltGrElem.h index b4fb797..5c81573 100644 --- a/src/bltGrElem.h +++ b/src/bltGrElem.h @@ -41,6 +41,22 @@ extern "C" { #include <bltVector.h> }; +#define SHOW_NONE 0 +#define SHOW_X 1 +#define SHOW_Y 2 +#define SHOW_BOTH 3 + +#define LABEL_ACTIVE (1<<9) /* Non-zero indicates that the element's entry + * in the legend should be drawn in its active + * foreground and background colors. */ + +#define NUMBEROFPOINTS(e) MIN( \ + (e)->coords.x ? (e)->coords.x->nValues : 0, \ + (e)->coords.y ? (e)->coords.y->nValues : 0 \ + ) + +#define NORMALPEN(e) ((((e)->normalPenPtr == NULL) ? (e)->builtinPenPtr : (e)->normalPenPtr)) + typedef struct _Element Element; typedef struct { diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 02177f6..75339b5 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -38,6 +38,7 @@ extern "C" { #include "bltGraph.h" }; +#include "bltGrElemOption.h" #include "bltGrElemBar.h" #include "bltConfig.h" diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index e950d5c..0bf826e 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -39,6 +39,7 @@ extern "C" { #include "bltGraph.h" } +#include "bltGrElemOption.h" #include "bltGrElemLine.h" #include "bltGrPenLine.h" #include "bltConfig.h" diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index ab56db2..01444e4 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -46,6 +46,9 @@ extern "C" { #define ELEM_SOURCE_VALUES 0 #define ELEM_SOURCE_VECTOR 1 +#define SetRange(l) ((l).range = ((l).max > (l).min) ? ((l).max - (l).min) : DBL_EPSILON) +#define SetWeight(l, lo, hi) ((l).min = (lo), (l).max = (hi), SetRange(l)) + // Defs extern int Blt_GetPenFromObj(Tcl_Interp* interp, Graph* graphPtr, diff --git a/src/bltGrElemOp.h b/src/bltGrElemOp.h index b329d07..2090e48 100644 --- a/src/bltGrElemOp.h +++ b/src/bltGrElemOp.h @@ -35,12 +35,6 @@ extern void Blt_FreePen(Pen* penPtr); -extern const char* fillObjOption[]; -extern Tk_CustomOptionSetProc StyleSetProc; -extern Tk_CustomOptionGetProc StyleGetProc; -extern Tk_CustomOptionRestoreProc StyleRestoreProc; -extern Tk_CustomOptionFreeProc StyleFreeProc; - extern int Blt_GetElement(Tcl_Interp* interp, Graph *graphPtr, Tcl_Obj *objPtr, Element **elemPtrPtr); #endif diff --git a/src/bltGrElemOption.h b/src/bltGrElemOption.h new file mode 100644 index 0000000..947e11c --- /dev/null +++ b/src/bltGrElemOption.h @@ -0,0 +1,39 @@ +/* + * Smithsonian Astrophysical Observatory, Cambridge, MA, USA + * This code has been modified under the terms listed below and is made + * available under the same terms. + */ + +/* + * Copyright 1993-2004 George A Howlett. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef __bltgrelemoption_h__ +#define __bltgrelemoption_h__ + +extern const char* fillObjOption[]; +extern Tk_CustomOptionSetProc StyleSetProc; +extern Tk_CustomOptionGetProc StyleGetProc; +extern Tk_CustomOptionRestoreProc StyleRestoreProc; +extern Tk_CustomOptionFreeProc StyleFreeProc; + +#endif |