72#define FONT_UNDERLINE 4
73#define FONT_OVERSTRIKE 5
74#define FONT_NUMFIELDS 6
83#define XLFD_SETWIDTH 4
84#define XLFD_ADD_STYLE 5
85#define XLFD_PIXEL_SIZE 6
86#define XLFD_POINT_SIZE 7
87#define XLFD_RESOLUTION_X 8
88#define XLFD_RESOLUTION_Y 9
89#define XLFD_SPACING 10
90#define XLFD_AVERAGE_WIDTH 11
91#define XLFD_REGISTRY 12
92#define XLFD_ENCODING 13
93#define XLFD_NUMFIELDS 14
267 0, 0, 0, 0, 0, 0, 0,
'a',
'b',
't',
'n',
'v',
'f',
'r', 0
289 Error(
"GetFontMetrics",
"argument may not be 0");
313 Printf(
"TGFont: %s, %s, ref cnt = %u",
358 if (strncasecmp(family,
"itc ", 4) == 0) {
361 if ((strcasecmp(family,
"Arial") == 0)
362 || (strcasecmp(family,
"Geneva") == 0)) {
363 family =
"Helvetica";
364 }
else if ((strcasecmp(family,
"Times New Roman") == 0)
365 || (strcasecmp(family,
"New York") == 0)) {
367 }
else if ((strcasecmp(family,
"Courier New") == 0)
368 || (strcasecmp(family,
"Monaco") == 0)) {
370 }
else if (strcasecmp(family,
"AvantGarde") == 0) {
371 family =
"AvantGarde";
372 }
else if (strcasecmp(family,
"ZapfChancery") == 0) {
373 family =
"ZapfChancery";
374 }
else if (strcasecmp(family,
"ZapfDingbats") == 0) {
375 family =
"ZapfDingbats";
393 if ((upper != 0) && (islower(
UChar_t(*
src)))) {
400 family = (
char *) dst->
Data() +
len;
402 if (family != (
char *) dst->
Data() +
len) {
404 family = (
char *) dst->
Data() +
len;
406 if (strcasecmp(family,
"NewCenturySchoolbook") == 0) {
408 dst->
Append(
"NewCenturySchlbk");
409 family = (
char *) dst->
Data() +
len;
416 if (strcmp(family,
"Bookman") == 0) {
417 weightString =
"Light";
418 }
else if (strcmp(family,
"AvantGarde") == 0) {
419 weightString =
"Book";
420 }
else if (strcmp(family,
"ZapfChancery") == 0) {
421 weightString =
"Medium";
424 if ((strcmp(family,
"Bookman") == 0)
425 || (strcmp(family,
"AvantGarde") == 0)) {
426 weightString =
"Demi";
428 weightString =
"Bold";
438 if ((strcmp(family,
"Helvetica") == 0)
439 || (strcmp(family,
"Courier") == 0)
440 || (strcmp(family,
"AvantGarde") == 0)) {
441 slantString =
"Oblique";
443 slantString =
"Italic";
450 if ((slantString.
IsNull()) && (weightString.
IsNull())) {
451 if ((strcmp(family,
"Times") == 0)
452 || (strcmp(family,
"NewCenturySchlbk") == 0)
453 || (strcmp(family,
"Palatino") == 0)) {
502 if (maxLength <= 0) {
505 newX = curX = termX = 0;
507 sawNonSpace = !isspace(
UChar_t(*
p));
513 if (newX > maxLength) {
539 if ((flags &
kTextPartialOK) && (numChars > 0) && (curX < maxLength)) {
552 if (term == source) {
562 return term - source;
580 numChars = strlen(
string);
595 numChars = strlen(
string);
665 const char *start, *end, *special;
666 Int_t n,
y=0, charsThisChunk, maxChunks;
667 Int_t baseline,
h, curX, newX, maxWidth;
674 Int_t maxLines, curLine, layoutHeight;
676 lineLengths = staticLineLengths;
682 numChars = strlen(
string);
687 layout->
fFont =
this;
699 end =
string + numChars;
706 for (start =
string; start < end;) {
707 if (start >= special) {
710 for (special = start; special < end; special++) {
712 if ((*special ==
'\n') || (*special ==
'\r')) {
717 if (*special ==
'\t') {
728 if (start < special) {
730 wrapLength - curX, flags, &newX);
732 flags &= ~kTextAtLeastOne;
733 if (charsThisChunk > 0) {
734 chunk =
NewChunk(layout, &maxChunks, start,
735 charsThisChunk, curX, newX, baseline);
737 start += charsThisChunk;
741 if ((start == special) && (special < end)) {
746 if (*special ==
'\t') {
749 newchunk =
NewChunk(layout, &maxChunks, start, 1, curX, newX, baseline);
752 if ((start < end) && ((wrapLength <= 0) || (newX <= wrapLength))) {
757 flags &= ~kTextAtLeastOne;
761 newchunk =
NewChunk(layout, &maxChunks, start, 1, curX, 1000000000, baseline);
772 while ((start < end) && isspace(
UChar_t(*start))) {
774 if ((*start ==
'\n') || (*start ==
'\r')) {
779 if (*start ==
'\t') {
790 if (charsThisChunk > 0) {
802 if (curX > maxWidth) {
809 if (curLine >= maxLines) {
812 newLengths =
new int[2 * maxLines];
813 memcpy((
void *) newLengths, lineLengths, maxLines *
sizeof (
int));
815 if (lineLengths != staticLineLengths) {
816 delete[] lineLengths;
818 lineLengths = newLengths;
821 lineLengths[curLine] = curX;
834 chunk =
NewChunk(layout, &maxChunks, start, 0, curX, 1000000000, baseline);
848 int extra = maxWidth;
850 if (chunk->
fY !=
y) {
854 if (curLine < maxLines)
855 extra = maxWidth - lineLengths[curLine];
857 chunk->
fX += extra / 2;
865 layout->
fWidth = maxWidth;
890 if (lineLengths != staticLineLengths) {
891 delete[] lineLengths;
926 Int_t i, numDisplayChars, drawX;
929 if (lastChar < 0) lastChar = 100000000;
934 if ((numDisplayChars > 0) && (firstChar < numDisplayChars)) {
935 if (firstChar <= 0) {
941 if (lastChar < numDisplayChars) numDisplayChars = lastChar;
943 x + chunk->
fX + drawX,
y + chunk->
fY);
948 if (lastChar <= 0)
break;
1006 Int_t i,
n, dummy, baseline, pos;
1019 baseline = chunk->
fY;
1020 if (y < baseline + fFont->fFM.fDescent) {
1021 if (x < chunk->fX) {
1112 Int_t i, xx = 0, ww = 0;
1127 }
else if (index < chunk->fNumChars) {
1193 Int_t i,
x1,
x2,
y1,
y2, xDiff, yDiff, dist, minDist, ascent, descent;
1202 if (chunk->
fStart[0] ==
'\n') {
1211 y1 = chunk->
fY - ascent;
1213 y2 = chunk->
fY + descent;
1217 }
else if (
x >=
x2) {
1225 }
else if (
y >=
y2) {
1230 if ((xDiff == 0) && (yDiff == 0)) {
1234 if ((dist < minDist) || !minDist) {
1261 Int_t left, top, right, bottom;
1277 if (chunk->
fStart[0] ==
'\n') {
1290 if ((right <
x1) || (left >=
x2) || (bottom <
y1) || (top >=
y2)) {
1295 }
else if ((
x1 < left) || (
x2 >= right) || (
y1 < top) || (
y2 >= bottom)) {
1297 }
else if (
result == -1) {
1339 Int_t i, j, used,
c, baseline;
1342 baseline = chunk->
fY;
1347 if (baseline != chunk->
fY) {
1351 baseline = chunk->
fY;
1354 if (chunk->
fStart[0] ==
'\t') {
1361 if ((
c ==
'(') || (
c ==
')') || (
c ==
'\\') || (
c < 0x20) || (
c >=
UChar_t(0x7f))) {
1411 const char *start,
Int_t numChars,
1417 maxChunks = *maxPtr;
1419 if (maxChunks == 0) {
1431 *maxPtr = maxChunks;
1464 const char *source,
Int_t numChars,
1472 for (i = 0; i < numChars; i++) {
1494 const char *source,
Int_t numChars,
1499 if ((
x + (max_width * numChars) > 0x7fff)) {
1560 if (!font || !*font) {
1561 Error(
"GetFont",
"argument may not be 0 or empty");
1610 f->MeasureChars(
"0", 1, 0, 0, &
f->fTabWidth);
1612 if (!
f->fTabWidth) {
1613 f->fTabWidth =
f->fFM.fMaxWidth;
1620 if (!
f->fTabWidth) {
1627 Int_t descent =
f->fFM.fDescent;
1628 f->fUnderlinePos = descent/2;
1629 f->fUnderlineHeight =
f->fFA.fPointsize/10;
1631 if (!
f->fUnderlineHeight) {
1632 f->fUnderlineHeight = 1;
1634 if (
f->fUnderlinePos +
f->fUnderlineHeight > descent) {
1640 f->fUnderlineHeight = descent -
f->fUnderlinePos;
1642 if (!
f->fUnderlineHeight) {
1644 f->fUnderlineHeight = 1;
1722 if (
f->RemoveReference() == 0) {
1749 while ((
f = (
TGFont*) next())) {
1750 if (
f->fFontStruct == font) {
1766 while ((
f = (
TGFont*) next())) {
1767 if (
f->fFontH == font) {
1795 return (
const char *)obj->
GetName();
1808 const char *str = 0;
1844 int len = strlen(str)+1;
1848 result[i] =
new char[20];
1893 out <<
" TGFont *ufont; // will reflect user font changes" << std::endl;
1895 out <<
" ufont = gClient->GetFont(" << quote <<
GetName() << quote <<
");" << std::endl;
1914 while (*
p && ((*
p ==
' ') || (*
p ==
'\t'))) {
1929 while (*
p && (*
p !=
'"')) {
1938 while (*
p && (*
p !=
' ') && (*
p !=
'\t')) {
1969 int len = strlen(
string)+1;
1970 char *str =
new char[
len];
1971 strlcpy(str,
string,
len);
1973 if (*str ==
'-' || *str ==
'*') {
2002 if ((errno == ERANGE) || (end == s)) {
2062 memset(field,
'\0',
sizeof (field));
2065 if (*str ==
'-') str++;
2071 for (i = 0; *
src !=
'\0';
src++) {
2095 field[j + 1] = field[j];
2213 for (
m = map;
m->fStrKey != 0;
m++) {
2214 if (strcasecmp(strKey,
m->fStrKey) == 0) {
2230 for ( ; map->
fStrKey != 0; map++) {
2251 if (!field || !strlen(field)) {
2256 return (ch !=
'*' && ch !=
'?');
2277 char *family, *end, *
p;
2287 nameList =
gVirtualX->ListFonts(
"*", 10000, numNames);
2289 for (i = 0; i < numNames; i++) {
2290 if (nameList[i][0] !=
'-') {
2293 family = strchr(nameList[i] + 1,
'-');
2298 end = strchr(family,
'-');
2303 for (
p = family; *
p !=
'\0';
p++) {
2314 dst =
new char*[entries+1];
2316 TIter next(&familyTable);
2320 while ((obj = next())) {
2339 for (i = 0;
f[i] != 0; ++i) {
2358 Int_t numNames, score, i, scaleable, pixelsize, xaPixelsize;
2359 Int_t bestIdx, bestScore, bestScaleableIdx, bestScaleableScore;
2365 const char *fmt, *family;
2373 if (pixelsize < 0) {
2375 d = -pixelsize * 25.4/72;
2382 pixelsize = (
int)
d;
2387 fmt =
"-*-%.240s-*-*-*-*-*-*-*-*-*-*-*-*";
2389 nameList =
gVirtualX->ListFonts(buf.
Data(), 32768, numNames);
2396 nameList =
gVirtualX->ListFonts(buf.
Data(), 32768, numNames);
2401 fontStruct =
gVirtualX->LoadQueryFont(
"fixed");
2404 fontStruct =
gVirtualX->LoadQueryFont(
"*");
2418 bestScaleableIdx = 0;
2421 for (i = 0; i < numNames; i++) {
2448 if (xaPixelsize > pixelsize) {
2449 score += (xaPixelsize - pixelsize) * 120;
2451 score += (pixelsize - xaPixelsize) * 100;
2486 if (score < bestScaleableScore) {
2487 bestScaleableIdx = i;
2488 bestScaleableScore = score;
2491 if (score < bestScore) {
2509 if (bestScaleableScore < bestScore) {
2515 str = nameList[bestScaleableIdx];
2517 str = strchr(str + 1,
'-');
2521 rest = strchr(rest + 1,
'-');
2524 buf =
TString::Format(
"%.240s-*-%d-*-*-*-*-*%s", nameList[bestScaleableIdx], pixelsize, rest);
2530 buf = nameList[bestIdx];
2538 if (bestScaleableScore <
kMaxInt) {
2549 font =
MakeFont(fontPtr, fontStruct, buf);
2568 fixedDefault = fixedDefault && ((*
name ==
'-') || (*
name ==
'*'));
2591 const char *fontName)
2595 Int_t i,
width, firstChar, lastChar,
n, replaceOK;
2604 newFont =
new TGFont(fontName);
2626 gVirtualX->GetFontProperties(fontStruct, ascent, descent);
2641 for (i = 0; i < 256; i++) {
2642 if ((i == 160) || (i == 173) || (i == 177) ||
2643 (i < firstChar) || (i > lastChar)) {
2655 char ch[2] = {0, 0};
2657 for (i = 0; i < 256; i++) {
2686 for (i = 0; i < 256; i++) {
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
Handle_t GContext_t
Graphics context handle.
Handle_t Drawable_t
Drawable handle.
Handle_t FontStruct_t
Pointer to font structure.
Int_t gErrorIgnoreLevel
Error handling routines.
static const FontStateMap_t gWeightMap[]
static char * GetToken(char *str)
static const FontStateMap_t gXlfdCharsetMap[]
static const FontStateMap_t gUnderlineMap[]
static const FontStateMap_t gOverstrikeMap[]
static int GetControlCharSubst(int c, char buf[4])
When displaying text in a widget, a backslashed escape sequence is substituted for control characters...
static const FontStateMap_t gXlfdSlantMap[]
static const FontStateMap_t gSlantMap[]
static const FontStateMap_t gXlfdgWeightMap[]
static const FontStateMap_t gXlfdSetwidthMap[]
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Option_t Option_t TPoint TPoint const char y1
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
char * StrDup(const char *str)
Duplicate the string str.
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
FontStruct_t GetFontByName(const char *name, Bool_t fixedDefault=kTRUE) const
Get a font by name.
Provides a pool of fonts.
Bool_t ParseFontName(const char *string, FontAttributes_t *fa)
Converts a string into a set of font attributes that can be used to construct a font.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
const char * NameOfFont(TGFont *font)
Given a font, return a textual string identifying it.
char ** GetFontFamilies()
Return information about the font families that are available on the current display.
TGFontPool(const TGFontPool &fp)=delete
Bool_t ParseXLFD(const char *string, XLFDAttributes_t *xa)
Break up a fully specified XLFD into a set of font attributes.
int FindStateNum(const FontStateMap_t *map, const char *strKey)
Given a lookup table, map a string to a number in the table.
TGFont * GetNativeFont(const char *name, Bool_t fixedDefault=kTRUE)
The return value is a pointer to an TGFont object that represents the native font.
const char * GetUid(const char *string)
Given a string, this procedure returns a unique identifier for the string.
Bool_t FieldSpecified(const char *field)
Helper function for ParseXLFD().
TGFont * FindFontByHandle(FontH_t font) const
Find font based on its font handle. Returns 0 if font is not found.
void FreeFont(const TGFont *font)
Free font. If ref count is 0 delete font.
char ** GetAttributeInfo(const FontAttributes_t *fa)
Return information about the font attributes as an array of strings.
const char * FindStateString(const FontStateMap_t *map, int numKey)
Given a lookup table, map a number to a string in the table.
void FreeFontFamilies(char **f)
Delete an array of families allocated GetFontFamilies() method.
TGFont * GetFontFromAttributes(FontAttributes_t *fa, TGFont *fontPtr)
Given a desired set of attributes for a font, find a font with the closest matching attributes and cr...
TGFont * MakeFont(TGFont *font, FontStruct_t fontStruct, const char *fontName)
Helper for GetNativeFont() and GetFontFromAttributes().
~TGFontPool() override
Cleanup font pool.
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
void Print(Option_t *option="") const override
List all fonts in the pool.
void FreeAttributeInfo(char **info)
Free attributes info.
Encapsulate fonts used in the GUI system.
char fTypes[256]
Array giving types of all characters in the font, used when displaying control characters.
void GetFontMetrics(FontMetrics_t *m) const
Get font metrics.
void UnderlineChars(Drawable_t dst, GContext_t gc, const char *string, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
This procedure draws an underline for a given range of characters in a given string.
friend class TGTextLayout
void DrawCharsExp(Drawable_t dst, GContext_t gc, const char *source, Int_t numChars, Int_t x, Int_t y) const
Draw a string of characters on the screen.
Int_t fBarHeight
Height of underline or overstrike bar (used for simulating a native underlined or strikeout font).
TObjString * fNamedHash
Pointer to the named object TGFont was based on.
Int_t fWidths[256]
Array giving widths of all possible characters in the font.
Int_t MeasureChars(const char *source, Int_t numChars, Int_t maxLength, Int_t flags, Int_t *length) const
Determine the number of characters from the string that will fit in the given horizontal span.
~TGFont() override
Delete font.
Int_t fTabWidth
Width of tabs in this font (pixels).
Int_t TextWidth(const char *string, Int_t numChars=-1) const
A wrapper function for the more complicated interface of MeasureChars.
FontH_t fFontH
Font handle (derived from fontstruct)
Int_t fUnderlineHeight
Height of underline bar (used for drawing underlines on a non-underlined font).
FontStruct_t operator()() const
Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0)
FontAttributes_t fFA
Actual font attributes obtained when the font was created.
LayoutChunk_t * NewChunk(TGTextLayout *layout, int *maxPtr, const char *start, int numChars, int curX, int newX, int y) const
Helper function for ComputeTextLayout().
FontMetrics_t fFM
Cached font metrics.
Int_t XTextWidth(const char *string, Int_t numChars=-1) const
Return text width in pixels.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save the used font as a C++ statement(s) on output stream out.
TGTextLayout * ComputeTextLayout(const char *string, Int_t numChars, Int_t wrapLength, Int_t justify, Int_t flags, UInt_t *width, UInt_t *height) const
Computes the amount of screen space needed to display a multi-line, justified string of text.
Int_t fUnderlinePos
Offset from baseline to origin of underline bar (used for drawing underlines on a non-underlined font...
Int_t PostscriptFontName(TString *dst) const
Return the name of the corresponding Postscript font for this TGFont.
void DrawChars(Drawable_t dst, GContext_t gc, const char *source, Int_t numChars, Int_t x, Int_t y) const
Perform a quick sanity check to ensure we won't overflow the X coordinate space.
FontStruct_t fFontStruct
Low level graphics fontstruct.
void Print(Option_t *option="") const override
Print font info.
TGClient * fClient
Connection to display server.
Is used to keep track of string measurement information when using the text layout facilities.
void DrawText(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
Use the information in the TGTextLayout object to display a multi-line, justified string of text.
Int_t PointToChar(Int_t x, Int_t y) const
Use the information in the TGTextLayout token to determine the character closest to the given point.
Int_t IntersectText(Int_t x, Int_t y, Int_t w, Int_t h) const
Determines whether a text layout lies entirely inside, entirely outside, or overlaps a given rectangl...
const TGFont * fFont
The font used when laying out the text.
void ToPostscript(TString *dst) const
Outputs the contents of a text layout in Postscript format.
Int_t fNumChunks
Number of chunks actually used in following array.
Int_t DistanceToText(Int_t x, Int_t y) const
Computes the distance in pixels from the given point to the given text layout.
Int_t CharBbox(Int_t index, Int_t *x, Int_t *y, Int_t *w, Int_t *h) const
Use the information in the TGTextLayout token to return the bounding box for the character specified ...
LayoutChunk_t * fChunks
Array of chunks. The actual size will be maxChunks.
Int_t fWidth
The maximum width of all lines in the text layout.
void UnderlineChar(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t underline) const
Use the information in the TGTextLayout object to display an underline below an individual character.
const char * fString
The string that was laid out.
~TGTextLayout() override
destructor
THashTable implements a hash table to store TObject's.
void Add(TObject *obj) override
Add object to the hash table.
TObject * Remove(TObject *obj) override
Remove object from the hashtable.
TObject * FindObject(const char *name) const override
Find object using its name.
void Print(Option_t *option, Int_t recurse) const override
Print the collection header and its elements.
const char * GetName() const override
Returns name of object.
Collectable string class.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definitions for TRefCnt, base class for reference counted objects.
UInt_t References() const
const char * Data() const
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Double_t Hypot(Double_t x, Double_t y)
Returns sqrt(x*x + y*y)
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
#define dest(otri, vertexptr)