diff options
author | joye <joye> | 2014-02-12 22:07:06 (GMT) |
---|---|---|
committer | joye <joye> | 2014-02-12 22:07:06 (GMT) |
commit | 1b0f08c047ae86387e18a6602557140aa4b9f86f (patch) | |
tree | 7b5482f815c7de38ba6f1c81c7b2fda69056fba8 /src | |
parent | 93c714e29cd7da8bc6ef375bd1a91d49589691f9 (diff) | |
download | blt-1b0f08c047ae86387e18a6602557140aa4b9f86f.zip blt-1b0f08c047ae86387e18a6602557140aa4b9f86f.tar.gz blt-1b0f08c047ae86387e18a6602557140aa4b9f86f.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrLegd.C | 21 | ||||
-rw-r--r-- | src/bltGrText.h | 3 |
2 files changed, 5 insertions, 19 deletions
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index eaf8420..0b34b19 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -110,7 +110,7 @@ struct _Legend { * displayed. Used to calculate size * of legend */ XColor *fgColor; - Blt_Background activeBg; /* Active legend entry background + Tk_3DBorder activeBg; /* Active legend entry background * color. */ XColor *activeFgColor; int activeRelief; /* 3-D effect on active entry. */ @@ -343,10 +343,10 @@ static Tcl_Obj* PositionGetProc(ClientData clientData, Tk_Window tkwin, } static Tk_OptionSpec optionSpecs[] = { - {TK_OPTION_CUSTOM, "-activebackground", "activeBackground", + {TK_OPTION_BORDER, "-activebackground", "activeBackground", "ActiveBackground", DEF_LEGEND_ACTIVEBACKGROUND, - -1, Tk_Offset(Legend, activeBg), 0, &backgroundObjOption, 0}, + -1, Tk_Offset(Legend, activeBg), 0, NULL, 0}, {TK_OPTION_PIXELS, "-activeborderwidth", "activeBorderWidth", "ActiveBorderWidth", DEF_LEGEND_BORDERWIDTH, @@ -1840,17 +1840,9 @@ void Blt_DrawLegend(Graph *graphPtr, Drawable drawable) } isSelected = EntryIsSelected(legendPtr, elemPtr); if (elemPtr->flags & LABEL_ACTIVE) { - int xOrigin, yOrigin; - - Blt_GetBackgroundOrigin(legendPtr->activeBg, &xOrigin, &yOrigin); - Blt_SetBackgroundOrigin(tkwin, legendPtr->activeBg, - xOrigin - legendPtr->x, yOrigin - legendPtr->y); - Blt_Ts_SetForeground(legendPtr->style, legendPtr->activeFgColor); - Blt_FillBackgroundRectangle(tkwin, pixmap, legendPtr->activeBg, + Tk_Fill3DRectangle(tkwin, pixmap, legendPtr->activeBg, x, y, legendPtr->entryWidth, legendPtr->entryHeight, legendPtr->entryBW, legendPtr->activeRelief); - Blt_SetBackgroundOrigin(tkwin, legendPtr->activeBg, - xOrigin, yOrigin); } else if (isSelected) { int xOrigin, yOrigin; Blt_Background bg; @@ -1991,11 +1983,8 @@ void Blt_LegendToPostScript(Graph *graphPtr, Blt_Ps ps) continue; /* Skip this label */ } if (elemPtr->flags & LABEL_ACTIVE) { - Tk_3DBorder border; - - border = Blt_BackgroundBorder(legendPtr->activeBg); Blt_Ts_SetForeground(legendPtr->style, legendPtr->activeFgColor); - Blt_Ps_Fill3DRectangle(ps, border, x, y, legendPtr->entryWidth, + Blt_Ps_Fill3DRectangle(ps, legendPtr->activeBg, x, y, legendPtr->entryWidth, legendPtr->entryHeight, legendPtr->entryBW, legendPtr->activeRelief); } else { diff --git a/src/bltGrText.h b/src/bltGrText.h index 895c6e3..3f574ec 100644 --- a/src/bltGrText.h +++ b/src/bltGrText.h @@ -52,9 +52,6 @@ typedef struct { * in the active color */ XColor *color; /* Color to draw the text. */ Tk_Font font; /* Font to use to draw text */ - Blt_Background bg; /* Background color of text. This is - * also used for drawing disabled - * text. */ double angle; /* Rotation of text in degrees. */ Tk_Justify justify; /* Justification of the text * string. This only matters if the |