From e4ee8c1d434a19b8c3f92f847b56ee6d6b1dc927 Mon Sep 17 00:00:00 2001 From: joye Date: Tue, 21 Jan 2014 20:00:10 +0000 Subject: *** empty log message *** --- src/bltGrElemBar.C | 8 ++++++-- src/bltGrElemLine.C | 4 ++++ src/bltGrLegd.C | 2 +- src/bltGraph.C | 4 ++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index d6cc29a..747003f 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -42,6 +42,10 @@ #define CLAMP(x,l,h) ((x) = (((x)<(l))? (l) : ((x)>(h)) ? (h) : (x))) +#define PointInRectangle(r,x0,y0) \ + (((x0) <= (int)((r)->x + (r)->width - 1)) && ((x0) >= (int)(r)->x) && \ + ((y0) <= (int)((r)->y + (r)->height - 1)) && ((y0) >= (int)(r)->y)) + typedef struct { float x1, y1, x2, y2; } BarRegion; @@ -201,7 +205,7 @@ Blt_CustomOption bltBarModeOption = #define DEF_BAR_AXIS_X "x" #define DEF_BAR_AXIS_Y "y" #define DEF_BAR_BACKGROUND "navyblue" -#define DEF_BAR_BORDERWIDTH "2" +#define DEF_BAR_BORDERWIDTH STD_BORDERWIDTH #define DEF_BAR_ERRORBAR_COLOR "defcolor" #define DEF_BAR_ERRORBAR_LINE_WIDTH "1" #define DEF_BAR_ERRORBAR_CAP_WIDTH "1" @@ -219,7 +223,7 @@ Blt_CustomOption bltBarModeOption = #define DEF_PEN_ACTIVE_BACKGROUND rred #define DEF_PEN_ACTIVE_FOREGROUND pink -#define DEF_PEN_BORDERWIDTH "2" +#define DEF_PEN_BORDERWIDTH STD_BORDERWIDTH #define DEF_PEN_NORMAL_BACKGROUND navyblue #define DEF_PEN_NORMAL_FOREGROUND bblue #define DEF_PEN_RELIEF "raised" diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 1b76298..5e4f752 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -45,6 +45,10 @@ #include "bltBitmap.h" #include "bltConfig.h" +#define PointInRegion(e,x,y) \ + (((x) <= (e)->right) && ((x) >= (e)->left) && \ + ((y) <= (e)->bottom) && ((y) >= (e)->top)) + #define COLOR_DEFAULT (XColor *)1 #define PATTERN_SOLID ((Pixmap)1) diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index e471f76..049b488 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -197,7 +197,7 @@ struct _Legend { #define LABEL_PAD 2 #define DEF_LEGEND_ACTIVEBACKGROUND skyblue4 -#define DEF_LEGEND_ACTIVEBORDERWIDTH "2" +#define DEF_LEGEND_ACTIVEBORDERWIDTH STD_BORDERWIDTH #define DEF_LEGEND_ACTIVEFOREGROUND white #define DEF_LEGEND_ACTIVERELIEF "flat" #define DEF_LEGEND_ANCHOR "n" diff --git a/src/bltGraph.C b/src/bltGraph.C index 51d28a8..3ad3dea 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -61,6 +61,10 @@ typedef int (GraphCmdProc)(Graph *graphPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); +#define PointInRegion(e,x,y) \ + (((x) <= (e)->right) && ((x) >= (e)->left) && \ + ((y) <= (e)->bottom) && ((y) >= (e)->top)) + /* * Objects in the graph have their own class names. These class names are * used for the resource database and bindings. Example. -- cgit v0.12