diff options
author | joye <joye> | 2013-12-09 21:26:21 (GMT) |
---|---|---|
committer | joye <joye> | 2013-12-09 21:26:21 (GMT) |
commit | 208c51bee03e50ebeff32d63843394d3bd41ee23 (patch) | |
tree | 19fe65467d8ed770f3364a099af598778e468306 /src | |
parent | 42c465af03672c8882090398363567489976d946 (diff) | |
download | blt-208c51bee03e50ebeff32d63843394d3bd41ee23.zip blt-208c51bee03e50ebeff32d63843394d3bd41ee23.tar.gz blt-208c51bee03e50ebeff32d63843394d3bd41ee23.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltConfig.C | 32 | ||||
-rw-r--r-- | src/bltGrAxis.C | 10 | ||||
-rw-r--r-- | src/bltGrAxis.h | 4 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 4 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 4 | ||||
-rw-r--r-- | src/bltGrLegd.C | 16 | ||||
-rw-r--r-- | src/bltGrMarker.C | 2 | ||||
-rw-r--r-- | src/bltGrPSOutput.C | 10 | ||||
-rw-r--r-- | src/bltGrPSOutput.h | 6 | ||||
-rw-r--r-- | src/bltGrText.C | 72 | ||||
-rw-r--r-- | src/bltGrText.h | 4 | ||||
-rw-r--r-- | src/bltGraph.C | 2 |
12 files changed, 70 insertions, 96 deletions
diff --git a/src/bltConfig.C b/src/bltConfig.C index e341145..a5b72a1 100644 --- a/src/bltConfig.C +++ b/src/bltConfig.C @@ -719,25 +719,6 @@ DoConfig( } break; - case BLT_CONFIG_FONT: - { - Blt_Font font; - - if (objIsEmpty) { - font = NULL; - } else { - font = Blt_AllocFontFromObj(interp, tkwin, objPtr); - if (font == NULL) { - return TCL_ERROR; - } - } - if (*(Blt_Font *)ptr != NULL) { - Blt_FreeFont(*(Blt_Font *)ptr); - } - *(Blt_Font *)ptr = font; - } - break; - case BLT_CONFIG_TK_FONT: { Tk_Font font; @@ -1162,12 +1143,6 @@ FormatConfigValue( case BLT_CONFIG_DOUBLE: return Tcl_NewDoubleObj(*(double *)ptr); - case BLT_CONFIG_FONT: - if (*(Blt_Font *)ptr != NULL) { - string = Blt_NameOfFont(*(Blt_Font *)ptr); - } - break; - case BLT_CONFIG_TK_FONT: if (*(Tk_Font *)ptr != NULL) { string = Tk_NameOfFont(*(Tk_Font *)ptr); @@ -1847,13 +1822,6 @@ Blt_FreeOptions( } break; - case BLT_CONFIG_FONT: - if (*((Blt_Font *) ptr) != None) { - Blt_FreeFont(*((Blt_Font *) ptr)); - *((Blt_Font *) ptr) = NULL; - } - break; - case BLT_CONFIG_TK_FONT: if (*((Tk_Font *) ptr) != None) { Tk_FreeFont(*((Tk_Font *) ptr)); diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index 4c6fc4e..8b43eda 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -268,7 +268,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_COLOR, "-limitscolor", "limitsColor", "Color", DEF_AXIS_FOREGROUND, Blt_Offset(Axis, limitsTextStyle.color), ALL_GRAPHS}, - {BLT_CONFIG_FONT, "-limitsfont", "limitsFont", "Font", DEF_AXIS_LIMITS_FONT, + {BLT_CONFIG_TK_FONT, "-limitsfont", "limitsFont", "Font", DEF_AXIS_LIMITS_FONT, Blt_Offset(Axis, limitsTextStyle.font), ALL_GRAPHS}, {BLT_CONFIG_CUSTOM, "-limitsformat", "limitsFormat", "LimitsFormat", (char *)NULL, Blt_Offset(Axis, limitsFormats), @@ -320,10 +320,10 @@ static Blt_ConfigSpec configSpecs[] = DEF_AXIS_SUBDIVISIONS, Blt_Offset(Axis, reqNumMinorTicks), ALL_GRAPHS}, {BLT_CONFIG_ANCHOR, "-tickanchor", "tickAnchor", "Anchor", DEF_AXIS_TICK_ANCHOR, Blt_Offset(Axis, reqTickAnchor), ALL_GRAPHS}, - {BLT_CONFIG_FONT, "-tickfont", "tickFont", "Font", + {BLT_CONFIG_TK_FONT, "-tickfont", "tickFont", "Font", DEF_AXIS_TICKFONT_GRAPH, Blt_Offset(Axis, tickFont), GRAPH | STRIPCHART}, - {BLT_CONFIG_FONT, "-tickfont", "tickFont", "Font", + {BLT_CONFIG_TK_FONT, "-tickfont", "tickFont", "Font", DEF_AXIS_TICKFONT_BARCHART, Blt_Offset(Axis, tickFont), BARCHART}, {BLT_CONFIG_PIXELS_NNEG, "-ticklength", "tickLength", "TickLength", DEF_AXIS_TICKLENGTH, Blt_Offset(Axis, tickLength), @@ -340,7 +340,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_COLOR, "-titlecolor", "titleColor", "Color", DEF_AXIS_FOREGROUND, Blt_Offset(Axis, titleColor), ALL_GRAPHS}, - {BLT_CONFIG_FONT, "-titlefont", "titleFont", "Font", DEF_AXIS_TITLE_FONT, + {BLT_CONFIG_TK_FONT, "-titlefont", "titleFont", "Font", DEF_AXIS_TITLE_FONT, Blt_Offset(Axis, titleFont), ALL_GRAPHS}, {BLT_CONFIG_CUSTOM, "-use", "use", "Use", (char *)NULL, 0, ALL_GRAPHS, &useOption}, @@ -1951,7 +1951,7 @@ ResetTextStyles(Axis *axisPtr) gcMask = (GCForeground | GCLineWidth | GCCapStyle); gcValues.foreground = axisPtr->tickColor->pixel; - gcValues.font = Blt_FontId(axisPtr->tickFont); + gcValues.font = Tk_FontId(axisPtr->tickFont); gcValues.line_width = LineWidth(axisPtr->lineWidth); gcValues.cap_style = CapProjecting; diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h index 5ce46bb..972e275 100644 --- a/src/bltGrAxis.h +++ b/src/bltGrAxis.h @@ -286,7 +286,7 @@ typedef struct { int activeRelief; float tickAngle; - Blt_Font tickFont; + Tk_Font tickFont; Tk_Anchor tickAnchor; Tk_Anchor reqTickAnchor; XColor *tickColor; @@ -295,7 +295,7 @@ typedef struct { GC activeTickGC; double titleAngle; - Blt_Font titleFont; + Tk_Font titleFont; Tk_Anchor titleAnchor; Tk_Justify titleJustify; XColor *titleColor; diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index 3d9bf96..6648e00 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -288,7 +288,7 @@ static Blt_ConfigSpec barPenConfigSpecs[] = {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", DEF_PEN_VALUE_COLOR, Blt_Offset(BarPen, valueStyle.color), ALL_PENS}, - {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", + {BLT_CONFIG_TK_FONT, "-valuefont", "valueFont", "ValueFont", DEF_PEN_VALUE_FONT, Blt_Offset(BarPen, valueStyle.font), ALL_PENS}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", @@ -379,7 +379,7 @@ static Blt_ConfigSpec barElemConfigSpecs[] = { {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", DEF_PEN_VALUE_COLOR, Blt_Offset(BarElement, builtinPen.valueStyle.color), 0}, - {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", + {BLT_CONFIG_TK_FONT, "-valuefont", "valueFont", "ValueFont", DEF_PEN_VALUE_FONT, Blt_Offset(BarElement, builtinPen.valueStyle.font), 0}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 83de015..c3f3edc 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -530,7 +530,7 @@ static Blt_ConfigSpec lineElemConfigSpecs[] = {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", DEF_PEN_VALUE_COLOR, Blt_Offset(LineElement, builtinPen.valueStyle.color), 0}, - {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", + {BLT_CONFIG_TK_FONT, "-valuefont", "valueFont", "ValueFont", DEF_PEN_VALUE_FONT, Blt_Offset(LineElement, builtinPen.valueStyle.font), 0}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", @@ -613,7 +613,7 @@ static Blt_ConfigSpec linePenConfigSpecs[] = DEF_PEN_VALUE_ANCHOR, Blt_Offset(LinePen, valueStyle.anchor), ALL_PENS}, {BLT_CONFIG_COLOR, "-valuecolor", "valueColor", "ValueColor", DEF_PEN_VALUE_COLOR, Blt_Offset(LinePen, valueStyle.color), ALL_PENS}, - {BLT_CONFIG_FONT, "-valuefont", "valueFont", "ValueFont", + {BLT_CONFIG_TK_FONT, "-valuefont", "valueFont", "ValueFont", DEF_PEN_VALUE_FONT, Blt_Offset(LinePen, valueStyle.font), ALL_PENS}, {BLT_CONFIG_STRING, "-valueformat", "valueFormat", "ValueFormat", DEF_PEN_VALUE_FORMAT, Blt_Offset(LinePen, valueFormat), diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 1dc44f1..72bc807 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -287,7 +287,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_COLOR, "-focusforeground", "focusForeground", "FocusForeground", DEF_LEGEND_FOCUS_FG_MONO, Blt_Offset(Legend, focusColor), BLT_CONFIG_MONO_ONLY}, - {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_LEGEND_FONT, + {BLT_CONFIG_TK_FONT, "-font", "font", "Font", DEF_LEGEND_FONT, Blt_Offset(Legend, style.font), 0}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", @@ -347,7 +347,7 @@ static Blt_ConfigSpec configSpecs[] = Blt_Offset(Legend, title), BLT_CONFIG_NULL_OK}, {BLT_CONFIG_COLOR, "-titlecolor", "titleColor", "Foreground", DEF_LEGEND_TITLECOLOR, Blt_Offset(Legend, titleStyle.color), 0}, - {BLT_CONFIG_FONT, "-titlefont", "titleFont", "Font", + {BLT_CONFIG_TK_FONT, "-titlefont", "titleFont", "Font", DEF_LEGEND_TITLEFONT, Blt_Offset(Legend, titleStyle.font), 0}, {BLT_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} }; @@ -1108,7 +1108,7 @@ Blt_MapLegend( int lw, lh; int maxWidth, maxHeight; int symbolWidth; - Blt_FontMetrics fontMetrics; + Tk_FontMetrics fontMetrics; /* Initialize legend values to default (no legend displayed) */ legendPtr->entryWidth = legendPtr->entryHeight = 0; @@ -1155,7 +1155,7 @@ Blt_MapLegend( } - Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics); + Tk_GetFontMetrics(legendPtr->style.font, &fontMetrics); symbolWidth = 2 * fontMetrics.ascent; maxWidth += 2 * legendPtr->entryBW + PADDING(legendPtr->ixPad) + @@ -1269,7 +1269,7 @@ Blt_DrawLegend(Graph *graphPtr, Drawable drawable) { Blt_Background bg; Blt_ChainLink link; - Blt_FontMetrics fontMetrics; + Tk_FontMetrics fontMetrics; Legend *legendPtr = graphPtr->legend; Pixmap pixmap; Tk_Window tkwin; @@ -1325,7 +1325,7 @@ Blt_DrawLegend(Graph *graphPtr, Drawable drawable) w, h, 0, TK_RELIEF_FLAT); Blt_SetBackgroundOrigin(tkwin, graphPtr->normalBg, xOrigin, yOrigin); } - Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics); + Tk_GetFontMetrics(legendPtr->style.font, &fontMetrics); symbolSize = fontMetrics.ascent; xMid = symbolSize + 1 + legendPtr->entryBW; @@ -1462,7 +1462,7 @@ Blt_LegendToPostScript(Graph *graphPtr, Blt_Ps ps) Blt_ChainLink link; int symbolSize, xMid, yMid; int width, height; - Blt_FontMetrics fontMetrics; + Tk_FontMetrics fontMetrics; if ((legendPtr->flags & HIDE) || (legendPtr->nEntries == 0)) { return; @@ -1493,7 +1493,7 @@ Blt_LegendToPostScript(Graph *graphPtr, Blt_Ps ps) Blt_Ps_SetClearBackground(ps); Blt_Ps_XFillRectangle(ps, x, y, width, height); } - Blt_GetFontMetrics(legendPtr->style.font, &fontMetrics); + Tk_GetFontMetrics(legendPtr->style.font, &fontMetrics); symbolSize = fontMetrics.ascent; xMid = symbolSize + 1 + legendPtr->entryBW; yMid = (symbolSize / 2) + 1 + legendPtr->entryBW; diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index 54b446a..c0d936a 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -677,7 +677,7 @@ static Blt_ConfigSpec textConfigSpecs[] = {BLT_CONFIG_SYNONYM, "-fg", "foreground", "Foreground", (char *)NULL, 0, 0}, {BLT_CONFIG_SYNONYM, "-fill", "background", (char *)NULL, (char *)NULL, 0, 0}, - {BLT_CONFIG_FONT, "-font", "font", "Font", DEF_MARKER_FONT, + {BLT_CONFIG_TK_FONT, "-font", "font", "Font", DEF_MARKER_FONT, Blt_Offset(TextMarker, style.font), 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_MARKER_FOREGROUND, Blt_Offset(TextMarker, style.color), 0}, diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C index a9a38a1..c3eafe7 100644 --- a/src/bltGrPSOutput.C +++ b/src/bltGrPSOutput.C @@ -45,6 +45,9 @@ #include "bltDBuffer.h" #include "bltPsInt.h" +#define FONT_ITALIC (1<<0) +#define FONT_BOLD (1<<1) + #define PS_MAXPATH 1500 /* Maximum number of components in a * PostScript (level 1) path. */ @@ -970,8 +973,9 @@ Blt_Ps_XSetStipple(Blt_Ps ps, Display *display, Pixmap bitmap) */ void -Blt_Ps_XSetFont(PostScript *psPtr, Blt_Font font) +Blt_Ps_XSetFont(PostScript *psPtr, Tk_Font font) { +#if 0 Tcl_Interp *interp = psPtr->interp; const char *family; @@ -980,7 +984,7 @@ Blt_Ps_XSetFont(PostScript *psPtr, Blt_Font font) char *value; value = (char *)Tcl_GetVar2(interp, psPtr->setupPtr->fontVarName, - Blt_NameOfFont(font), 0); + Tk_NameOfFont(font), 0); if (value != NULL) { const char **argv = NULL; int argc; @@ -1024,7 +1028,9 @@ Blt_Ps_XSetFont(PostScript *psPtr, Blt_Font font) return; } Blt_Ps_Append(psPtr, "12.0 /Helvetica-Bold SetFont\n"); +#endif } + #if 0 static void TextLayoutToPostScript(Blt_Ps ps, int x, int y, TextLayout *textPtr) diff --git a/src/bltGrPSOutput.h b/src/bltGrPSOutput.h index 0c02078..0c9f8f2 100644 --- a/src/bltGrPSOutput.h +++ b/src/bltGrPSOutput.h @@ -145,7 +145,7 @@ extern void Blt_Ps_XSetBitmapData(Blt_Ps ps, Display *display, extern void Blt_Ps_XSetForeground(Blt_Ps ps, XColor *colorPtr); -extern void Blt_Ps_XSetFont(Blt_Ps ps, Blt_Font font); +extern void Blt_Ps_XSetFont(Blt_Ps ps, Tk_Font font); extern void Blt_Ps_XSetDashes(Blt_Ps ps, Blt_Dashes *dashesPtr); @@ -203,9 +203,9 @@ extern void Blt_Ps_Polygon(Blt_Ps ps, Point2d *screenPts, int nScreenPts); extern void Blt_Ps_SetPrinting(Blt_Ps ps, int value); extern int Blt_Ps_IsPrinting(void); -extern int Blt_Ps_TextWidth(Blt_Font font, const char *string, int nBytes); +extern int Blt_Ps_TextWidth(Tk_Font font, const char *string, int nBytes); -extern int Blt_Ps_GetFontMetrics(Blt_Font font, Blt_FontMetrics *fmPtr); +extern int Blt_Ps_GetFontMetrics(Tk_Font font, Tk_FontMetrics *fmPtr); extern void Blt_Ps_FontName(const char *family, int flags, Tcl_DString *resultPtr); diff --git a/src/bltGrText.C b/src/bltGrText.C index 820df93..396df96 100644 --- a/src/bltGrText.C +++ b/src/bltGrText.C @@ -112,7 +112,7 @@ Blt_GetBitmapGC(Tk_Window tkwin) */ void Blt_GetTextExtents( - Blt_Font font, + Tk_Font font, int leader, const char *text, /* Text string to be measured. */ int textLen, /* Length of the text. If -1, indicates that @@ -127,9 +127,9 @@ Blt_GetTextExtents( return; /* NULL string? */ } { - Blt_FontMetrics fm; + Tk_FontMetrics fm; - Blt_GetFontMetrics(font, &fm); + Tk_GetFontMetrics(font, &fm); lineHeight = fm.linespace; } if (textLen < 0) { @@ -148,7 +148,7 @@ Blt_GetTextExtents( if (lineLen > 0) { unsigned int lineWidth; - lineWidth = Blt_TextWidth(font, line, lineLen); + lineWidth = Tk_TextWidth(font, line, lineLen); if (lineWidth > maxWidth) { maxWidth = lineWidth; } @@ -165,7 +165,7 @@ Blt_GetTextExtents( unsigned int lineWidth; maxHeight += lineHeight; - lineWidth = Blt_TextWidth(font, line, lineLen); + lineWidth = Tk_TextWidth(font, line, lineLen); if (lineWidth > maxWidth) { maxWidth = lineWidth; } @@ -503,10 +503,10 @@ Blt_Ts_DrawText( Display* display = Tk_Display(tkwin); - Tk_Font font = Tk_GetFont(stylePtr->font->interp,tkwin,"Helvetica 10 normal roman"); - GC gc = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); - XSetFont(display, gc, Tk_FontId(font)); - // Tk_Font font = stylePtr->font; + // Tk_Font font = Tk_GetFont(stylePtr->font->interp,tkwin,"Helvetica 10 normal roman"); + // GC gc = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); + // XSetFont(display, gc, Tk_FontId(font)); + Tk_Font font = stylePtr->font; // GC gc = stylePtr->gc; int width,height, xx, yy; @@ -515,14 +515,14 @@ Blt_Ts_DrawText( &width, &height); Blt_TranslateAnchor(x, y, width, height, stylePtr->anchor, &xx, &yy); // printf("x=%d y=%d, xx=%d yy=%d\n",x,y,xx,yy); - TkDrawAngledTextLayout(display, drawable, gc, layout, xx, yy, - stylePtr->angle, 0, textLen); + // TkDrawAngledTextLayout(display, drawable, gc, layout, xx, yy, + // stylePtr->angle, 0, textLen); - if (gc) - XFreeGC(display, gc); + // if (gc) + // XFreeGC(display, gc); - if (font) - Tk_FreeFont(font); + // if (font) + // Tk_FreeFont(font); } void @@ -543,10 +543,10 @@ Blt_DrawText2( Display* display = Tk_Display(tkwin); - Tk_Font font = Tk_GetFont(stylePtr->font->interp,tkwin,"Helvetica 10 normal roman"); - GC gc = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); - XSetFont(display, gc, Tk_FontId(font)); - // Tk_Font font = stylePtr->font; + // Tk_Font font = Tk_GetFont(stylePtr->font->interp,tkwin,"Helvetica 10 normal roman"); + // GC gc = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); + // XSetFont(display, gc, Tk_FontId(font)); + Tk_Font font = stylePtr->font; // GC gc = stylePtr->gc; int width,height, xx, yy; @@ -554,14 +554,14 @@ Blt_DrawText2( stylePtr->justify, 0, &width, &height); Blt_TranslateAnchor(x, y, width, height, stylePtr->anchor, &xx, &yy); - TkDrawAngledTextLayout(display, drawable, gc, layout, xx, yy, - stylePtr->angle, 0, -1); + // TkDrawAngledTextLayout(display, drawable, gc, layout, xx, yy, + // stylePtr->angle, 0, -1); - if (gc) - XFreeGC(display, gc); + // if (gc) + // XFreeGC(display, gc); - if (font) - Tk_FreeFont(font); + // if (font) + // Tk_FreeFont(font); float angle = fmod(stylePtr->angle, 360.0); if (angle < 0.0) { @@ -599,10 +599,10 @@ Blt_DrawText( Display* display = Tk_Display(tkwin); - Tk_Font font = Tk_GetFont(stylePtr->font->interp,tkwin,"Helvetica 10 normal roman"); - GC gc = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); - XSetFont(display, gc, Tk_FontId(font)); - // Tk_Font font = stylePtr->font; + // Tk_Font font = Tk_GetFont(stylePtr->font->interp,tkwin,"Helvetica 10 normal roman"); + // GC gc = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); + // XSetFont(display, gc, Tk_FontId(font)); + Tk_Font font = stylePtr->font; // GC gc = stylePtr->gc; int width,height, xx, yy; @@ -610,14 +610,14 @@ Blt_DrawText( stylePtr->justify, 0, &width, &height); Blt_TranslateAnchor(x, y, width, height, stylePtr->anchor, &xx, &yy); - TkDrawAngledTextLayout(display, drawable, gc, layout, xx, yy, - stylePtr->angle, 0, -1); + // TkDrawAngledTextLayout(display, drawable, gc, layout, xx, yy, + // stylePtr->angle, 0, -1); - if (gc) - XFreeGC(display, gc); + // if (gc) + // XFreeGC(display, gc); - if (font) - Tk_FreeFont(font); + // if (font) + // Tk_FreeFont(font); } void @@ -628,7 +628,7 @@ Blt_Ts_ResetStyle(Tk_Window tkwin, TextStyle *stylePtr) unsigned long gcMask; gcMask = GCFont; - gcValues.font = Blt_FontId(stylePtr->font); + gcValues.font = Tk_FontId(stylePtr->font); if (stylePtr->color != NULL) { gcMask |= GCForeground; gcValues.foreground = stylePtr->color->pixel; diff --git a/src/bltGrText.h b/src/bltGrText.h index 267e502..71f2b4c 100644 --- a/src/bltGrText.h +++ b/src/bltGrText.h @@ -51,7 +51,7 @@ typedef struct { unsigned int state; /* If non-zero, indicates to draw text * in the active color */ XColor *color; /* Color to draw the text. */ - Blt_Font font; /* Font to use to draw 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. */ @@ -74,7 +74,7 @@ typedef struct { GC gc; /* GC used to draw the text */ } TextStyle; -extern void Blt_GetTextExtents(Blt_Font font, int leader, const char *text, +extern void Blt_GetTextExtents(Tk_Font font, int leader, const char *text, int textLen, unsigned int *widthPtr, unsigned int *heightPtr); extern void Blt_Ts_GetExtents(TextStyle *tsPtr, const char *text, diff --git a/src/bltGraph.C b/src/bltGraph.C index 5dae8c4..14bf77b 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -164,7 +164,7 @@ static Blt_ConfigSpec configSpecs[] = {BLT_CONFIG_STRING, "-datacommand", "dataCommand", "DataCommand", (char *)NULL, Blt_Offset(Graph, dataCmd), BLT_CONFIG_DONT_SET_DEFAULT}, {BLT_CONFIG_SYNONYM, "-fg", "foreground", (char *)NULL, (char *)NULL, 0, 0}, - {BLT_CONFIG_FONT, "-font", "font", "Font", + {BLT_CONFIG_TK_FONT, "-font", "font", "Font", DEF_GRAPH_FONT, Blt_Offset(Graph, titleTextStyle.font), 0}, {BLT_CONFIG_COLOR, "-foreground", "foreground", "Foreground", DEF_GRAPH_TITLE_COLOR, Blt_Offset(Graph, titleTextStyle.color), 0}, |