diff options
author | joye <joye> | 2014-06-16 21:54:29 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-16 21:54:29 (GMT) |
commit | 26f23f0dc83d24caef81f34f817e2bfa0bb8f8a0 (patch) | |
tree | 63d0ba376975627f0dd6b35749be5c8004f2c6e5 /src/bltGrMarkerPolygon.C | |
parent | 693c0a4d1f527d3b5a6303edfe990001dc5e55ef (diff) | |
download | blt-26f23f0dc83d24caef81f34f817e2bfa0bb8f8a0.zip blt-26f23f0dc83d24caef81f34f817e2bfa0bb8f8a0.tar.gz blt-26f23f0dc83d24caef81f34f817e2bfa0bb8f8a0.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrMarkerPolygon.C')
-rw-r--r-- | src/bltGrMarkerPolygon.C | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C index af0f903..0c8e7d8 100644 --- a/src/bltGrMarkerPolygon.C +++ b/src/bltGrMarkerPolygon.C @@ -58,9 +58,6 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_COLOR, "-fill", "fill", "Fill", NULL, -1, Tk_Offset(PolygonMarkerOptions, fill), TK_OPTION_NULL_OK, NULL, 0}, - {TK_OPTION_COLOR, "-fillbg", "fillbg", "FillBg", - NULL, -1, Tk_Offset(PolygonMarkerOptions, fillBg), - TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_CUSTOM, "-join", "join", "Join", "miter", -1, Tk_Offset(PolygonMarkerOptions, joinStyle), 0, &joinStyleObjOption, 0}, @@ -75,9 +72,6 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_COLOR, "-outline", "outline", "Outline", STD_NORMAL_FOREGROUND, -1, Tk_Offset(PolygonMarkerOptions, outline), TK_OPTION_NULL_OK, NULL, 0}, - {TK_OPTION_COLOR, "-outlinebg", "outlinebg", "OutlineBg", - NULL, -1, Tk_Offset(PolygonMarkerOptions, outlineBg), - TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_BOOLEAN, "-under", "under", "Under", "no", -1, Tk_Offset(PolygonMarkerOptions, drawUnder), 0, NULL, CACHE}, {TK_OPTION_PIXELS, "-xoffset", "xOffset", "XOffset", @@ -121,28 +115,22 @@ int PolygonMarker::configure() { PolygonMarkerOptions* ops = (PolygonMarkerOptions*)ops_; + // outlineGC unsigned long gcMask = (GCLineWidth | GCLineStyle); XGCValues gcValues; if (ops->outline) { gcMask |= GCForeground; gcValues.foreground = ops->outline->pixel; } - if (ops->outlineBg) { - gcMask |= GCBackground; - gcValues.background = ops->outlineBg->pixel; - } gcMask |= (GCCapStyle | GCJoinStyle); gcValues.cap_style = ops->capStyle; gcValues.join_style = ops->joinStyle; gcValues.line_style = LineSolid; gcValues.dash_offset = 0; gcValues.line_width = ops->lineWidth; - if (LineIsDashed(ops->dashes)) { - gcValues.line_style = (ops->outlineBg == NULL) - ? LineOnOffDash : LineDoubleDash; - } + if (LineIsDashed(ops->dashes)) + gcValues.line_style = LineOnOffDash; - // outlineGC GC newGC = graphPtr_->getPrivateGC(gcMask, &gcValues); if (LineIsDashed(ops->dashes)) graphPtr_->setDashes(newGC, &ops->dashes); @@ -156,10 +144,6 @@ int PolygonMarker::configure() gcMask |= GCForeground; gcValues.foreground = ops->fill->pixel; } - if (ops->fillBg) { - gcMask |= GCBackground; - gcValues.background = ops->fillBg->pixel; - } newGC = Tk_GetGC(graphPtr_->tkwin_, gcMask, &gcValues); if (fillGC_) Tk_FreeGC(graphPtr_->display_, fillGC_); @@ -192,10 +176,8 @@ void PolygonMarker::draw(Drawable drawable) } // outline - if ((nOutlinePts_ > 0) && (ops->lineWidth > 0) && - (ops->outline)) { + if ((nOutlinePts_ > 0) && (ops->lineWidth > 0) && (ops->outline)) graphPtr_->drawSegments(drawable, outlineGC_, outlinePts_, nOutlinePts_); - } } void PolygonMarker::map() @@ -308,10 +290,6 @@ void PolygonMarker::print(PostScript* psPtr) if (ops->fill) { psPtr->printPolyline(fillPts_, nFillPts_); - if (ops->fillBg) { - psPtr->setBackground(ops->fillBg); - psPtr->append("gsave fill grestore\n"); - } psPtr->setForeground(ops->fill); psPtr->append("fill\n"); } @@ -319,16 +297,7 @@ void PolygonMarker::print(PostScript* psPtr) if ((ops->lineWidth > 0) && (ops->outline)) { psPtr->setLineAttributes(ops->outline, ops->lineWidth, &ops->dashes, ops->capStyle, ops->joinStyle); - - if ((ops->outlineBg) && (LineIsDashed(ops->dashes))) { - psPtr->append("/DashesProc {\ngsave\n "); - psPtr->setBackground(ops->outlineBg); - psPtr->append(" "); - psPtr->setDashes((Dashes*)NULL); - psPtr->append("stroke\n grestore\n} def\n"); - } - else - psPtr->append("/DashesProc {} def\n"); + psPtr->append("/DashesProc {} def\n"); psPtr->printSegments(outlinePts_, nOutlinePts_); } |