From 3a6fdb53188e4133a04fce8a5a73c1732d313d75 Mon Sep 17 00:00:00 2001 From: joye Date: Wed, 21 May 2014 16:21:26 +0000 Subject: *** empty log message *** --- bltGrMarkerBitmap.C | 2 +- src/bltGrMarkerLine.C | 2 +- src/bltGrMarkerOp.C | 2 ++ src/bltGrMarkerPolygon.C | 2 +- src/bltGrMarkerText.C | 2 +- tests/all.tcl | 6 +----- tests/bitmapmarker.tcl | 9 +++++---- tests/linemarker.tcl | 9 +++++---- tests/markers.tcl | 5 +++++ tests/polygonmarker.tcl | 9 +++++---- tests/textmarker.tcl | 11 ++++++----- 11 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 tests/markers.tcl diff --git a/bltGrMarkerBitmap.C b/bltGrMarkerBitmap.C index 60e2db2..abc75b4 100644 --- a/bltGrMarkerBitmap.C +++ b/bltGrMarkerBitmap.C @@ -74,7 +74,7 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-state", "state", "State", "normal", -1, Tk_Offset(BitmapMarkerOptions, state), 0, &stateObjOption, 0}, {TK_OPTION_BOOLEAN, "-under", "under", "Under", - "no", -1, Tk_Offset(BitmapMarkerOptions, drawUnder), 0, NULL, 0}, + "no", -1, Tk_Offset(BitmapMarkerOptions, drawUnder), 0, NULL, CACHE}, {TK_OPTION_PIXELS, "-xoffset", "xOffset", "XOffset", "0", -1, Tk_Offset(BitmapMarkerOptions, xOffset), 0, NULL, 0}, {TK_OPTION_PIXELS, "-yoffset", "yOffset", "YOffset", diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C index ed9ac7a..1baf413 100644 --- a/src/bltGrMarkerLine.C +++ b/src/bltGrMarkerLine.C @@ -81,7 +81,7 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-state", "state", "State", "normal", -1, Tk_Offset(LineMarkerOptions, state), 0, &stateObjOption, 0}, {TK_OPTION_BOOLEAN, "-under", "under", "Under", - "no", -1, Tk_Offset(LineMarkerOptions, drawUnder), 0, NULL, 0}, + "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", diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C index 7bb61ac..dbc08b1 100644 --- a/src/bltGrMarkerOp.C +++ b/src/bltGrMarkerOp.C @@ -76,9 +76,11 @@ static int MarkerObjConfigure( Graph* graphPtr,Marker* markerPtr, markerPtr->flags |= MAP_ITEM; if (markerPtr->configure() != TCL_OK) return TCL_ERROR; + MarkerOptions* ops = (MarkerOptions*)markerPtr->ops(); if (ops->drawUnder) graphPtr->flags |= CACHE; + graphPtr->flags |= mask; graphPtr->eventuallyRedraw(); break; diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C index f3c0076..2d175a7 100644 --- a/src/bltGrMarkerPolygon.C +++ b/src/bltGrMarkerPolygon.C @@ -82,7 +82,7 @@ static Tk_OptionSpec optionSpecs[] = { "normal", -1, Tk_Offset(PolygonMarkerOptions, state), 0, &stateObjOption, 0}, {TK_OPTION_BOOLEAN, "-under", "under", "Under", - "no", -1, Tk_Offset(PolygonMarkerOptions, drawUnder), 0, NULL, 0}, + "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", diff --git a/src/bltGrMarkerText.C b/src/bltGrMarkerText.C index be25682..93d3a96 100644 --- a/src/bltGrMarkerText.C +++ b/src/bltGrMarkerText.C @@ -79,7 +79,7 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING, "-text", "text", "Text", NULL, -1, Tk_Offset(TextMarkerOptions, string), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_BOOLEAN, "-under", "under", "Under", - "no", -1, Tk_Offset(TextMarkerOptions, drawUnder), 0, NULL, 0}, + "no", -1, Tk_Offset(TextMarkerOptions, drawUnder), 0, NULL, CACHE}, {TK_OPTION_PIXELS, "-xoffset", "xOffset", "XOffset", "0", -1, Tk_Offset(TextMarkerOptions, xOffset), 0, NULL, 0}, {TK_OPTION_PIXELS, "-yoffset", "yOffset", "YOffset", diff --git a/tests/all.tcl b/tests/all.tcl index 12089d9..5863765 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -8,9 +8,5 @@ source axis.tcl source xaxis.tcl source legend.tcl source crosshairs.tcl -source marker.tcl -source bitmapmarker.tcl -source linemarker.tcl -source polygonmarker.tcl -source textmarker.tcl +source markers.tcl diff --git a/tests/bitmapmarker.tcl b/tests/bitmapmarker.tcl index 9dff62a..07fb957 100644 --- a/tests/bitmapmarker.tcl +++ b/tests/bitmapmarker.tcl @@ -3,8 +3,9 @@ source base.tcl set w .line set graph [bltLineGraph $w] -set mm [$graph marker create bitmap tt -element data1 \ +set mm [$graph marker create bitmap tt -element data2 \ -coords {1.5 100} -bitmap error] +$graph element configure data1 -hide yes echo "Testing Bitmap Marker..." @@ -14,13 +15,13 @@ bltTest3 $graph marker $mm -bg red #bltTest3 $graph marker $mm -bindtags {aa} bltTest3 $graph marker $mm -bitmap hourglass bltTest3 $graph marker $mm -coords {1 50} -bltTest3 $graph marker $mm -element data2 +bltTest3 $graph marker $mm -element data1 bltTest3 $graph marker $mm -fg cyan bltTest3 $graph marker $mm -fill yellow bltTest3 $graph marker $mm -foreground blue bltTest3 $graph marker $mm -hide yes -bltTest3 $graph marker $mm -mapx x -bltTest3 $graph marker $mm -mapy y +bltTest3 $graph marker $mm -mapx x2 +bltTest3 $graph marker $mm -mapy y2 bltTest3 $graph marker $mm -outline green bltTest3 $graph marker $mm -state disabled bltTest3 $graph marker $mm -under yes diff --git a/tests/linemarker.tcl b/tests/linemarker.tcl index be6aa61..3d2e52b 100644 --- a/tests/linemarker.tcl +++ b/tests/linemarker.tcl @@ -8,21 +8,22 @@ set mm [$graph marker create line tt -element data1 \ set nn [$graph marker create line ss -element data1 \ -coords {1 150 .5 100 1 50} -linewidth 1 \ -outline green -dashes 4] +$graph element configure data1 -hide yes echo "Testing Line Marker..." #bltTest3 $graph marker $mm -bindtags {aa} bltTest3 $graph marker $mm -cap round bltTest3 $graph marker $mm -coords {1 50 1.5 100 2 150} -bltTest3 $graph marker $mm -dashes "8 3" +bltTest3 $graph marker $mm -dashes {8 3} bltTest3 $graph marker $mm -dashoffset 10 -bltTest3 $graph marker $mm -element data2 +bltTest3 $graph marker $mm -element data1 bltTest3 $graph marker $nn -fill yellow bltTest3 $graph marker $mm -join round bltTest3 $graph marker $mm -linewidth 1 bltTest3 $graph marker $mm -hide yes -bltTest3 $graph marker $mm -mapx x -bltTest3 $graph marker $mm -mapy y +bltTest3 $graph marker $mm -mapx x2 +bltTest3 $graph marker $mm -mapy y2 bltTest3 $graph marker $mm -outline green bltTest3 $graph marker $mm -state disabled bltTest3 $graph marker $mm -under yes diff --git a/tests/markers.tcl b/tests/markers.tcl new file mode 100644 index 0000000..7d39a63 --- /dev/null +++ b/tests/markers.tcl @@ -0,0 +1,5 @@ +source marker.tcl +source bitmapmarker.tcl +source linemarker.tcl +source polygonmarker.tcl +source textmarker.tcl diff --git a/tests/polygonmarker.tcl b/tests/polygonmarker.tcl index 59078ff..21ff799 100644 --- a/tests/polygonmarker.tcl +++ b/tests/polygonmarker.tcl @@ -5,21 +5,22 @@ set graph [bltLineGraph $w] set mm [$graph marker create polygon tt -element data1 \ -coords {1 50 1.5 100 1 150} -linewidth 5] +$graph element configure data1 -hide yes echo "Testing Polygon Marker..." #bltTest3 $graph marker $mm -bindtags {aa} bltTest3 $graph marker $mm -cap round bltTest3 $graph marker $mm -coords {1 50 1.5 100 2 150} -bltTest3 $graph marker $mm -dashes "8 3" -bltTest3 $graph marker $mm -element data2 +bltTest3 $graph marker $mm -dashes {8 3} +bltTest3 $graph marker $mm -element data1 bltTest3 $graph marker $mm -fill yellow bltTest3 $graph marker $mm -fillbg blue bltTest3 $graph marker $mm -join round bltTest3 $graph marker $mm -linewidth 1 bltTest3 $graph marker $mm -hide yes -bltTest3 $graph marker $mm -mapx x -bltTest3 $graph marker $mm -mapy y +bltTest3 $graph marker $mm -mapx x2 +bltTest3 $graph marker $mm -mapy y2 bltTest3 $graph marker $mm -outline green bltTest3 $graph marker $mm -outlinebg cyan bltTest3 $graph marker $mm -state disabled diff --git a/tests/textmarker.tcl b/tests/textmarker.tcl index fbaf276..0b38fbb 100644 --- a/tests/textmarker.tcl +++ b/tests/textmarker.tcl @@ -5,23 +5,24 @@ set graph [bltLineGraph $w] set mm [$graph marker create text tt -element data1 \ -coords {1.5 100} -text {Text Marker} -font {24}] +$graph element configure data1 -hide yes echo "Testing Text Marker..." bltTest3 $graph marker $mm -anchor nw -bltTest3 $graph marker $mm -background blue +bltTest3 $graph marker $mm -background yellow bltTest3 $graph marker $mm -bg red #bltTest3 $graph marker $mm -bindtags {aa} bltTest3 $graph marker $mm -coords {1 50} -bltTest3 $graph marker $mm -element data2 +bltTest3 $graph marker $mm -element data1 bltTest3 $graph marker $mm -fg cyan bltTest3 $graph marker $mm -fill yellow bltTest3 $graph marker $mm -font {times 24 bold italic} -bltTest3 $graph marker $mm -foreground red +bltTest3 $graph marker $mm -foreground blue bltTest3 $graph marker $mm -justify right bltTest3 $graph marker $mm -hide yes -bltTest3 $graph marker $mm -mapx x -bltTest3 $graph marker $mm -mapy y +bltTest3 $graph marker $mm -mapx x2 +bltTest3 $graph marker $mm -mapy y2 bltTest3 $graph marker $mm -outline green bltTest3 $graph marker $mm -rotate 45 bltTest3 $graph marker $mm -state disabled -- cgit v0.12