diff options
author | joye <joye> | 2014-05-07 20:19:14 (GMT) |
---|---|---|
committer | joye <joye> | 2014-05-07 20:19:14 (GMT) |
commit | 81ce4d07d5167f0a0549723eed3b07677246075d (patch) | |
tree | e3aea6ff937a0089a83755a9ab8bea700302b6f8 | |
parent | d9988fb54ebd9424ae01d0e3ebe04ab3652a35fa (diff) | |
download | blt-81ce4d07d5167f0a0549723eed3b07677246075d.zip blt-81ce4d07d5167f0a0549723eed3b07677246075d.tar.gz blt-81ce4d07d5167f0a0549723eed3b07677246075d.tar.bz2 |
*** empty log message ***
-rw-r--r-- | src/bltGrElemBar.C | 53 | ||||
-rw-r--r-- | src/bltGrMarkerPolygon.C | 15 | ||||
-rw-r--r-- | src/bltGrMarkerPolygon.h | 1 | ||||
-rw-r--r-- | src/bltGrPenBar.C | 18 | ||||
-rw-r--r-- | src/bltGrPenBar.h | 1 | ||||
-rw-r--r-- | tests/polygonmarker.tcl | 1 |
6 files changed, 8 insertions, 81 deletions
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 34cba92..95f9f05 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -123,9 +123,6 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING, "-stack", "stack", "Stack", NULL, -1, Tk_Offset(BarElementOptions, groupName), TK_OPTION_NULL_OK, NULL, 0}, - {TK_OPTION_BITMAP, "-stipple", "stipple", "Stipple", - NULL, -1, Tk_Offset(BarElementOptions, builtinPen.stipple), - TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_CUSTOM, "-styles", "styles", "Styles", "", -1, Tk_Offset(BarElementOptions, stylePalette), 0, &styleObjOption, 0}, {TK_OPTION_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", @@ -743,12 +740,8 @@ void BarElement::drawSymbol(Drawable drawable, int x, int y, int size) if (penPtr->fillGC_) XSetTSOrigin(graphPtr_->display_, penPtr->fillGC_, x, y); - if (penOps->stipple != None) - XFillRectangle(graphPtr_->display_, drawable, penPtr->fillGC_, x, y, - size, size); - else - Tk_Fill3DRectangle(graphPtr_->tkwin_, drawable, penOps->fill, - x, y, size, size, penOps->borderWidth, penOps->relief); + Tk_Fill3DRectangle(graphPtr_->tkwin_, drawable, penOps->fill, + x, y, size, size, penOps->borderWidth, penOps->relief); XDrawRectangle(graphPtr_->display_, drawable, penPtr->outlineGC_, x, y, size, size); @@ -847,18 +840,7 @@ void BarElement::printSymbol(Blt_Ps ps, double x, double y, int size) Blt_Ps_Append(ps, "\n" "/DrawSymbolProc {\n" "gsave\n "); - if (penOps->stipple != None) { - if (penOps->fill) { - Blt_Ps_XSetBackground(ps, Tk_3DBorderColor(penOps->fill)); - Blt_Ps_Append(ps, " gsave fill grestore\n "); - } - if (penOps->outlineColor) { - Blt_Ps_XSetForeground(ps, penOps->outlineColor); - } else { - Blt_Ps_XSetForeground(ps, Tk_3DBorderColor(penOps->fill)); - } - Blt_Ps_XSetStipple(ps, graphPtr_->display_, penOps->stipple); - } else if (penOps->outlineColor) { + if (penOps->outlineColor) { Blt_Ps_XSetForeground(ps, penOps->outlineColor); Blt_Ps_Append(ps, " fill\n"); } @@ -1255,8 +1237,6 @@ void BarElement::DrawBarSegments(Drawable drawable, BarPen* penPtr, TK_RELIEF_FLAT: pops->relief; int hasOutline = ((relief == TK_RELIEF_FLAT) && pops->outlineColor); - if (pops->stipple != None) - TkSetRegion(graphPtr_->display_, penPtr->fillGC_, rgn); SetBackgroundClipRegion(graphPtr_->tkwin_, pops->fill, rgn); @@ -1265,13 +1245,9 @@ void BarElement::DrawBarSegments(Drawable drawable, BarPen* penPtr, XRectangle *rp, *rend; for (rp = bars, rend = rp + nBars; rp < rend; rp++) { - if (pops->stipple != None) - XFillRectangle(graphPtr_->display_, drawable, penPtr->fillGC_, - rp->x, rp->y, rp->width, rp->height); - else - Tk_Fill3DRectangle(graphPtr_->tkwin_, drawable, - pops->fill, rp->x, rp->y, rp->width, rp->height, - pops->borderWidth, relief); + Tk_Fill3DRectangle(graphPtr_->tkwin_, drawable, + pops->fill, rp->x, rp->y, rp->width, rp->height, + pops->borderWidth, relief); if (hasOutline) XDrawRectangle(graphPtr_->display_, drawable, penPtr->outlineGC_, @@ -1283,9 +1259,6 @@ void BarElement::DrawBarSegments(Drawable drawable, BarPen* penPtr, if (hasOutline) XSetClipMask(graphPtr_->display_, penPtr->outlineGC_, None); - if (pops->stipple != None) - XSetClipMask(graphPtr_->display_, penPtr->fillGC_, None); - } else if (pops->outlineColor) { TkSetRegion(graphPtr_->display_, penPtr->outlineGC_, rgn); @@ -1360,19 +1333,7 @@ void BarElement::SegmentsToPostScript(Blt_Ps ps, BarPen* penPtr, if ((rp->width < 1) || (rp->height < 1)) { continue; } - if (pops->stipple != None) { - Blt_Ps_Rectangle(ps, rp->x, rp->y, rp->width - 1, rp->height - 1); - if (pops->fill) { - Blt_Ps_XSetBackground(ps, Tk_3DBorderColor(pops->fill)); - Blt_Ps_Append(ps, "gsave fill grestore\n"); - } - if (pops->outlineColor) { - Blt_Ps_XSetForeground(ps, pops->outlineColor); - } else { - Blt_Ps_XSetForeground(ps, Tk_3DBorderColor(pops->fill)); - } - Blt_Ps_XSetStipple(ps, graphPtr_->display_, pops->stipple); - } else if (pops->outlineColor) { + if (pops->outlineColor) { Blt_Ps_XSetForeground(ps, pops->outlineColor); Blt_Ps_XFillRectangle(ps, (double)rp->x, (double)rp->y, (int)rp->width - 1, (int)rp->height - 1); diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C index 1dbb3ce..3af9047 100644 --- a/src/bltGrMarkerPolygon.C +++ b/src/bltGrMarkerPolygon.C @@ -81,9 +81,6 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-state", "state", "State", "normal", -1, Tk_Offset(PolygonMarkerOptions, state), 0, &stateObjOption, 0}, - {TK_OPTION_BITMAP, "-stipple", "stipple", "Stipple", - NULL, -1, Tk_Offset(PolygonMarkerOptions, stipple), - TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_BOOLEAN, "-under", "under", "Under", "no", -1, Tk_Offset(PolygonMarkerOptions, drawUnder), 0, NULL, 0}, {TK_OPTION_PIXELS, "-xoffset", "xOffset", "XOffset", @@ -183,12 +180,6 @@ int PolygonMarker::configure() gcMask |= GCBackground; gcValues.background = ops->fillBg->pixel; } - if (ops->stipple != None) { - gcValues.stipple = ops->stipple; - gcValues.fill_style = (ops->fillBg) - ? FillOpaqueStippled : FillStippled; - gcMask |= (GCStipple | GCFillStyle); - } newGC = Tk_GetGC(graphPtr_->tkwin_, gcMask, &gcValues); if (fillGC_) Tk_FreeGC(graphPtr_->display_, fillGC_); @@ -351,11 +342,7 @@ void PolygonMarker::postscript(Blt_Ps ps) Blt_Ps_Append(ps, "gsave fill grestore\n"); } Blt_Ps_XSetForeground(ps, ops->fill); - if (ops->stipple != None) { - Blt_Ps_XSetStipple(ps, graphPtr_->display_, ops->stipple); - } else { - Blt_Ps_Append(ps, "fill\n"); - } + Blt_Ps_Append(ps, "fill\n"); } if ((ops->lineWidth > 0) && (ops->outline)) { diff --git a/src/bltGrMarkerPolygon.h b/src/bltGrMarkerPolygon.h index 3c09948..fee0573 100644 --- a/src/bltGrMarkerPolygon.h +++ b/src/bltGrMarkerPolygon.h @@ -54,7 +54,6 @@ namespace Blt { int lineWidth; XColor* outline; XColor* outlineBg; - Pixmap stipple; int xorr; } PolygonMarkerOptions; diff --git a/src/bltGrPenBar.C b/src/bltGrPenBar.C index 70fb50c..ee66124 100644 --- a/src/bltGrPenBar.C +++ b/src/bltGrPenBar.C @@ -63,8 +63,6 @@ static Tk_OptionSpec barPenOptionSpecs[] = { "both", -1, Tk_Offset(BarPenOptions, errorBarShow), 0, &fillObjOption, 0}, {TK_OPTION_STRING_TABLE, "-showvalues", "showValues", "ShowValues", "none", -1, Tk_Offset(BarPenOptions, valueShow), 0, &fillObjOption, 0}, - {TK_OPTION_BITMAP, "-stipple", "stipple", "Stipple", - NULL, -1, Tk_Offset(BarPenOptions, stipple), TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_ANCHOR, "-valueanchor", "valueAnchor", "ValueAnchor", "s", -1, Tk_Offset(BarPenOptions, valueStyle.anchor), 0, NULL, 0}, {TK_OPTION_COLOR, "-valuecolor", "valueColor", "ValueColor", @@ -151,22 +149,6 @@ int BarPen::configure() // fillGC { GC newGC = NULL; - if (ops->stipple != None) { - // Handle old-style -stipple specially - unsigned long gcMask = - GCForeground | GCBackground | GCFillStyle | GCStipple; - XGCValues gcValues; - int screenNum = Tk_ScreenNumber(graphPtr_->tkwin_); - gcValues.foreground = BlackPixel(graphPtr_->display_, screenNum); - gcValues.background = WhitePixel(graphPtr_->display_, screenNum); - if (ops->fill) - gcValues.foreground = Tk_3DBorderColor(ops->fill)->pixel; - else if (ops->outlineColor) - gcValues.foreground = ops->outlineColor->pixel; - gcValues.stipple = ops->stipple; - gcValues.fill_style = FillStippled; - newGC = Tk_GetGC(graphPtr_->tkwin_, gcMask, &gcValues); - } if (fillGC_) Tk_FreeGC(graphPtr_->display_, fillGC_); fillGC_ = newGC; diff --git a/src/bltGrPenBar.h b/src/bltGrPenBar.h index b5a9fa9..699970e 100644 --- a/src/bltGrPenBar.h +++ b/src/bltGrPenBar.h @@ -47,7 +47,6 @@ typedef struct { Tk_3DBorder fill; int borderWidth; int relief; - Pixmap stipple; } BarPenOptions; class BarPen : public Pen { diff --git a/tests/polygonmarker.tcl b/tests/polygonmarker.tcl index 7dfa6f0..59078ff 100644 --- a/tests/polygonmarker.tcl +++ b/tests/polygonmarker.tcl @@ -23,7 +23,6 @@ bltTest3 $graph marker $mm -mapy y bltTest3 $graph marker $mm -outline green bltTest3 $graph marker $mm -outlinebg cyan bltTest3 $graph marker $mm -state disabled -#bltTest3 $graph marker $mm -stipple bltTest3 $graph marker $mm -under yes bltTest3 $graph marker $mm -xoffset 20 bltTest3 $graph marker $mm -xor yes |