summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoye <joye>2014-06-16 21:34:11 (GMT)
committerjoye <joye>2014-06-16 21:34:11 (GMT)
commit693c0a4d1f527d3b5a6303edfe990001dc5e55ef (patch)
treec2d7727640f4142793005430b634b1d77eaac071
parenta7eb558d496626fca9aba45fedacded9aaaf1cde (diff)
downloadblt-693c0a4d1f527d3b5a6303edfe990001dc5e55ef.zip
blt-693c0a4d1f527d3b5a6303edfe990001dc5e55ef.tar.gz
blt-693c0a4d1f527d3b5a6303edfe990001dc5e55ef.tar.bz2
*** empty log message ***
-rw-r--r--src/bltGrMarkerLine.C25
-rw-r--r--src/bltGrMarkerLine.h1
-rw-r--r--src/bltGrMarkerPolygon.C25
-rw-r--r--src/bltGrMarkerPolygon.h1
-rw-r--r--tests/linemarker.tcl5
-rw-r--r--tests/polygonmarker.tcl1
6 files changed, 2 insertions, 56 deletions
diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C
index f9a432b..063fb25 100644
--- a/src/bltGrMarkerLine.C
+++ b/src/bltGrMarkerLine.C
@@ -82,8 +82,6 @@ static Tk_OptionSpec optionSpecs[] = {
"no", -1, Tk_Offset(LineMarkerOptions, drawUnder), 0, NULL, CACHE},
{TK_OPTION_PIXELS, "-xoffset", "xOffset", "XOffset",
"0", -1, Tk_Offset(LineMarkerOptions, xOffset), 0, NULL, 0},
- {TK_OPTION_BOOLEAN, "-xor", "xor", "Xor",
- "no", -1, Tk_Offset(LineMarkerOptions, xorr), 0, NULL, 0},
{TK_OPTION_PIXELS, "-yoffset", "yOffset", "YOffset",
"0", -1, Tk_Offset(LineMarkerOptions, yOffset), 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0}
@@ -111,9 +109,7 @@ LineMarker::~LineMarker()
int LineMarker::configure()
{
LineMarkerOptions* ops = (LineMarkerOptions*)ops_;
- GraphOptions* gops = (GraphOptions*)graphPtr_->ops_;
- Drawable drawable = Tk_WindowId(graphPtr_->tkwin_);
unsigned long gcMask = (GCLineWidth | GCLineStyle | GCCapStyle | GCJoinStyle);
XGCValues gcValues;
if (ops->outlineColor) {
@@ -132,19 +128,6 @@ int LineMarker::configure()
gcValues.line_style =
(gcMask & GCBackground) ? LineDoubleDash : LineOnOffDash;
}
- if (ops->xorr) {
- unsigned long pixel;
- gcValues.function = GXxor;
-
- gcMask |= GCFunction;
- pixel = Tk_3DBorderColor(gops->plotBg)->pixel;
- if (gcMask & GCBackground)
- gcValues.background ^= pixel;
-
- gcValues.foreground ^= pixel;
- if (drawable != None)
- draw(drawable);
- }
GC newGC = graphPtr_->getPrivateGC(gcMask, &gcValues);
if (gc_)
@@ -152,15 +135,7 @@ int LineMarker::configure()
if (LineIsDashed(ops->dashes))
graphPtr_->setDashes(newGC, &ops->dashes);
-
gc_ = newGC;
- if (ops->xorr) {
- if (drawable != None) {
- map();
- draw(drawable);
- }
- return TCL_OK;
- }
return TCL_OK;
}
diff --git a/src/bltGrMarkerLine.h b/src/bltGrMarkerLine.h
index 37d2197..ee43dcc 100644
--- a/src/bltGrMarkerLine.h
+++ b/src/bltGrMarkerLine.h
@@ -51,7 +51,6 @@ namespace Blt {
int joinStyle;
int lineWidth;
XColor* outlineColor;
- int xorr;
} LineMarkerOptions;
class LineMarker : public Marker {
diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C
index 61c0a71..af0f903 100644
--- a/src/bltGrMarkerPolygon.C
+++ b/src/bltGrMarkerPolygon.C
@@ -82,8 +82,6 @@ static Tk_OptionSpec optionSpecs[] = {
"no", -1, Tk_Offset(PolygonMarkerOptions, drawUnder), 0, NULL, CACHE},
{TK_OPTION_PIXELS, "-xoffset", "xOffset", "XOffset",
"0", -1, Tk_Offset(PolygonMarkerOptions, xOffset), 0, NULL, 0},
- {TK_OPTION_BOOLEAN, "-xor", "xor", "Xor",
- "no", -1, Tk_Offset(PolygonMarkerOptions, xorr), 0, NULL, 0},
{TK_OPTION_PIXELS, "-yoffset", "yOffset", "YOffset",
"0", -1, Tk_Offset(PolygonMarkerOptions, yOffset), 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0}
@@ -122,9 +120,7 @@ PolygonMarker::~PolygonMarker()
int PolygonMarker::configure()
{
PolygonMarkerOptions* ops = (PolygonMarkerOptions*)ops_;
- GraphOptions* gops = (GraphOptions*)graphPtr_->ops_;
- Drawable drawable = Tk_WindowId(graphPtr_->tkwin_);
unsigned long gcMask = (GCLineWidth | GCLineStyle);
XGCValues gcValues;
if (ops->outline) {
@@ -145,19 +141,6 @@ int PolygonMarker::configure()
gcValues.line_style = (ops->outlineBg == NULL)
? LineOnOffDash : LineDoubleDash;
}
- if (ops->xorr) {
- unsigned long pixel;
- gcValues.function = GXxor;
-
- gcMask |= GCFunction;
- pixel = Tk_3DBorderColor(gops->plotBg)->pixel;
- if (gcMask & GCBackground)
- gcValues.background ^= pixel;
-
- gcValues.foreground ^= pixel;
- if (drawable != None)
- draw(drawable);
- }
// outlineGC
GC newGC = graphPtr_->getPrivateGC(gcMask, &gcValues);
@@ -182,14 +165,6 @@ int PolygonMarker::configure()
Tk_FreeGC(graphPtr_->display_, fillGC_);
fillGC_ = newGC;
- if (ops->xorr && (gcMask == 0)) {
- if (drawable != None) {
- map();
- draw(drawable);
- }
- return TCL_OK;
- }
-
return TCL_OK;
}
diff --git a/src/bltGrMarkerPolygon.h b/src/bltGrMarkerPolygon.h
index 5060fe5..5f0f2f1 100644
--- a/src/bltGrMarkerPolygon.h
+++ b/src/bltGrMarkerPolygon.h
@@ -53,7 +53,6 @@ namespace Blt {
int lineWidth;
XColor* outline;
XColor* outlineBg;
- int xorr;
} PolygonMarkerOptions;
class PolygonMarker : public Marker {
diff --git a/tests/linemarker.tcl b/tests/linemarker.tcl
index a1e9809..d462a9e 100644
--- a/tests/linemarker.tcl
+++ b/tests/linemarker.tcl
@@ -6,7 +6,7 @@ set graph [bltLineGraph $w]
set mm [$graph marker create line tt -element data2 \
-coords {1 50 1.5 100 1 150} -linewidth 5]
set nn [$graph marker create line ss -element data2 \
- -coords {1 150 .5 100 1 50} -linewidth 1 \
+ -coords {1 150 .5 100 1 50} -linewidth 2 \
-outline green -dashes 4]
$graph element configure data1 -hide yes
@@ -16,7 +16,7 @@ bltTest3 $graph marker $mm -bindtags {aa} 0
bltTest3 $graph marker $mm -cap round $dops
bltTest3 $graph marker $mm -coords {1 50 1.5 100 2 150} $dops
bltTest3 $graph marker $mm -dashes {8 3} $dops
-bltTest3 $graph marker $mm -dashoffset 10 $dops
+bltTest3 $graph marker $nn -dashoffset 10 $dops
bltTest3 $graph marker $mm -element data1 $dops
bltTest3 $graph marker $nn -fill yellow $dops
bltTest3 $graph marker $mm -join round $dops
@@ -27,7 +27,6 @@ bltTest3 $graph marker $mm -mapy y2 $dops
bltTest3 $graph marker $mm -outline green $dops
bltTest3 $graph marker $mm -under yes $dops
bltTest3 $graph marker $mm -xoffset 20 $dops
-bltTest3 $graph marker $mm -xor yes $dops
bltTest3 $graph marker $mm -yoffset 20 $dops
echo "done"
diff --git a/tests/polygonmarker.tcl b/tests/polygonmarker.tcl
index 5a1bb8d..4917d66 100644
--- a/tests/polygonmarker.tcl
+++ b/tests/polygonmarker.tcl
@@ -25,7 +25,6 @@ bltTest3 $graph marker $mm -outline green $dops
bltTest3 $graph marker $mm -outlinebg cyan $dops
bltTest3 $graph marker $mm -under yes $dops
bltTest3 $graph marker $mm -xoffset 20 $dops
-bltTest3 $graph marker $mm -xor yes $dops
bltTest3 $graph marker $mm -yoffset 20 $dops
echo "done"