diff options
author | joye <joye> | 2014-03-31 19:20:46 (GMT) |
---|---|---|
committer | joye <joye> | 2014-03-31 19:20:46 (GMT) |
commit | bc51222173efc73d5c71ac5721575dd7d5f96c82 (patch) | |
tree | d1a6e3a8908a95d895c35ceb02c6216e028ba813 | |
parent | 8150f1b6d516c20ed7bef75513d08a32a0c79eb0 (diff) | |
download | blt-bc51222173efc73d5c71ac5721575dd7d5f96c82.zip blt-bc51222173efc73d5c71ac5721575dd7d5f96c82.tar.gz blt-bc51222173efc73d5c71ac5721575dd7d5f96c82.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGrElem.h | 49 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 4 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 3 | ||||
-rw-r--r-- | src/bltGrElemOp.h | 64 |
4 files changed, 56 insertions, 64 deletions
diff --git a/src/bltGrElem.h b/src/bltGrElem.h index 5ceccc9..b4fb797 100644 --- a/src/bltGrElem.h +++ b/src/bltGrElem.h @@ -37,9 +37,17 @@ #include <iomanip> using namespace std; +extern "C" { +#include <bltVector.h> +}; + typedef struct _Element Element; typedef struct { + Blt_VectorId vector; +} VectorDataSource; + +typedef struct { int type; Element* elemPtr; VectorDataSource vectorSource; @@ -54,6 +62,47 @@ typedef struct { ElemValues* y; } ElemCoords; +typedef struct { + double min; + double max; + double range; +} Weight; + +typedef struct { + Weight weight; + Pen* penPtr; +} PenStyle; + +typedef void (ElementDrawProc) (Graph *graphPtr, Drawable drawable, + Element* elemPtr); +typedef void (ElementToPostScriptProc) (Graph *graphPtr, Blt_Ps ps, + Element* elemPtr); +typedef void (ElementDestroyProc) (Graph *graphPtr, Element* elemPtr); +typedef int (ElementConfigProc) (Graph *graphPtr, Element* elemPtr); +typedef void (ElementMapProc) (Graph *graphPtr, Element* elemPtr); +typedef void (ElementExtentsProc) (Element* elemPtr, Region2d *extsPtr); +typedef void (ElementClosestProc) (Graph *graphPtr, Element* elemPtr); +typedef void (ElementDrawSymbolProc) (Graph *graphPtr, Drawable drawable, + Element* elemPtr, int x, int y, + int symbolSize); +typedef void (ElementSymbolToPostScriptProc) (Graph *graphPtr, Blt_Ps ps, + Element* elemPtr, double x, + double y, int symSize); + +typedef struct { + ElementClosestProc *closestProc; + ElementConfigProc *configProc; + ElementDestroyProc *destroyProc; + ElementDrawProc *drawActiveProc; + ElementDrawProc *drawNormalProc; + ElementDrawSymbolProc *drawSymbolProc; + ElementExtentsProc *extentsProc; + ElementToPostScriptProc *printActiveProc; + ElementToPostScriptProc *printNormalProc; + ElementSymbolToPostScriptProc *printSymbolProc; + ElementMapProc *mapProc; +} ElementProcs; + typedef struct _Element { GraphObj obj; unsigned int flags; diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 339e5e8..af1f878 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -43,6 +43,10 @@ extern "C" { #include "bltGrPenLine.h" #include "bltConfig.h" +#define SEARCH_X 0 +#define SEARCH_Y 1 +#define SEARCH_BOTH 2 + #define PointInRegion(e,x,y) (((x) <= (e)->right) && ((x) >= (e)->left) && ((y) <= (e)->bottom) && ((y) >= (e)->top)) #define BROKEN_TRACE(dir,last,next) \ diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 8625fd8..ab56db2 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -43,6 +43,9 @@ extern "C" { #include "bltGrElemOp.h" #include "bltGrElem.h" +#define ELEM_SOURCE_VALUES 0 +#define ELEM_SOURCE_VECTOR 1 + // Defs extern int Blt_GetPenFromObj(Tcl_Interp* interp, Graph* graphPtr, diff --git a/src/bltGrElemOp.h b/src/bltGrElemOp.h index 3e6ef3b..582bc20 100644 --- a/src/bltGrElemOp.h +++ b/src/bltGrElemOp.h @@ -39,13 +39,6 @@ extern "C" { extern void Blt_FreePen(Pen* penPtr); -#define ELEM_SOURCE_VALUES 0 -#define ELEM_SOURCE_VECTOR 1 - -#define SEARCH_X 0 -#define SEARCH_Y 1 -#define SEARCH_BOTH 2 - #define SHOW_NONE 0 #define SHOW_X 1 #define SHOW_Y 2 @@ -72,12 +65,6 @@ extern void Blt_FreePen(Pen* penPtr); #define NORMALPEN(e) ((((e)->normalPenPtr == NULL) ? (e)->builtinPenPtr : (e)->normalPenPtr)) -typedef struct { - double min; - double max; - double range; -} Weight; - #define SetRange(l) \ ((l).range = ((l).max > (l).min) ? ((l).max - (l).min) : DBL_EPSILON) #define SetScale(l) \ @@ -85,57 +72,6 @@ typedef struct { #define SetWeight(l, lo, hi) \ ((l).min = (lo), (l).max = (hi), SetRange(l)) -typedef struct { - Segment2d* segments; - int nSegments; -} ErrorBarSegments; - -typedef struct { - XColor* color; - int lineWidth; - GC gc; - int show; -} ErrorBarAttributes; - -typedef void (ElementDrawProc) (Graph *graphPtr, Drawable drawable, - Element* elemPtr); -typedef void (ElementToPostScriptProc) (Graph *graphPtr, Blt_Ps ps, - Element* elemPtr); -typedef void (ElementDestroyProc) (Graph *graphPtr, Element* elemPtr); -typedef int (ElementConfigProc) (Graph *graphPtr, Element* elemPtr); -typedef void (ElementMapProc) (Graph *graphPtr, Element* elemPtr); -typedef void (ElementExtentsProc) (Element* elemPtr, Region2d *extsPtr); -typedef void (ElementClosestProc) (Graph *graphPtr, Element* elemPtr); -typedef void (ElementDrawSymbolProc) (Graph *graphPtr, Drawable drawable, - Element* elemPtr, int x, int y, - int symbolSize); -typedef void (ElementSymbolToPostScriptProc) (Graph *graphPtr, Blt_Ps ps, - Element* elemPtr, double x, - double y, int symSize); - -typedef struct { - ElementClosestProc *closestProc; - ElementConfigProc *configProc; - ElementDestroyProc *destroyProc; - ElementDrawProc *drawActiveProc; - ElementDrawProc *drawNormalProc; - ElementDrawSymbolProc *drawSymbolProc; - ElementExtentsProc *extentsProc; - ElementToPostScriptProc *printActiveProc; - ElementToPostScriptProc *printNormalProc; - ElementSymbolToPostScriptProc *printSymbolProc; - ElementMapProc *mapProc; -} ElementProcs; - -typedef struct { - Blt_VectorId vector; -} VectorDataSource; - -typedef struct { - Weight weight; - Pen* penPtr; -} PenStyle; - extern const char* fillObjOption[]; extern Tk_CustomOptionSetProc StyleSetProc; extern Tk_CustomOptionGetProc StyleGetProc; |