4#ifndef _XVERTEXT_INCLUDED_ 
    5#define _XVERTEXT_INCLUDED_ 
   46      "xvertext routines Copyright (c) 1993 Alan Richardson" 
 
   74#ifndef CACHE_SIZE_LIMIT 
   75#define CACHE_SIZE_LIMIT 0 
   96#define DEBUG_PRINT1(a) if (gRotatedDebug) printf (a) 
   97#define DEBUG_PRINT2(a, b) if (gRotatedDebug) printf (a, b) 
   98#define DEBUG_PRINT3(a, b, c) if (gRotatedDebug) printf (a, b, c) 
   99#define DEBUG_PRINT4(a, b, c, d) if (gRotatedDebug) printf (a, b, c, d) 
  100#define DEBUG_PRINT5(a, b, c, d, e) if (gRotatedDebug) printf (a, b, c, d, e) 
  105#define M_PI 3.14159265358979323846 
  178   if(!str) 
return nullptr;
 
 
  193   static int start, 
len;
 
  196   if(!
str2) 
return nullptr;
 
  206   if(start>=
len) 
return nullptr;
 
  209   for(i=start; i<
len; i++) {
 
 
  263   char *
data = (
char *)
calloc((
unsigned)(((
w-1)/8+1)*
h), 1);
 
  264   if(!
data) 
return nullptr;
 
 
  408      for(i=0; i<4*item->
fNl; i++) {
 
  482                         values.ts_x_origin-
xp, values.ts_y_origin-
yp);
 
 
  586   height=font->ascent+font->descent;
 
 
  697         ((align==0)?9:(align-1))%3==
 
  698         ((
i1->fAlign==0)?9:(
i1->fAlign-1))%3)) {
 
  701         if(font_name && 
i1->font_name) {
 
  702            if(
strcmp(font_name, 
i1->font_name)==0) {
 
  710         else if(!font_name && !
i1->font_name) {
 
 
  814   if(!item) 
return nullptr;
 
  863   height=font->ascent+font->descent;
 
 
 1128      item->
fSize+=
sizeof(Font);
 
 1146   DEBUG_PRINT4(
"current cache size=%ld, new item=%ld, limit=%d\n",
 
 1163                      i1->fText, 
i1->font_name, 
i1->fAngle, 
i1->fAlign);
 
 1166      if(
i1->font_name==0)
 
 1167         DEBUG_PRINT5(
"  (`%s'\n  FID=%ld\n   angle=%f align=%d)\n",
 
 1168                      i1->fText, 
i1->fid, 
i1->angle, 
i1->align);
 
 1185      item->
fNext = 
nullptr;
 
 1189      item->
fNext = 
nullptr;
 
 
 1316         if(((1-t)*(1-
u)*
z1 + t*(1-
u)*
z2 + t*
u*
z3 + (1-t)*
u*
z4)>0.5)
 
 
 1371   if(!
str1) 
return nullptr;
 
 1401   height=font->ascent+font->descent;
 
 1430   xp_in=(XPoint *)
malloc((
unsigned)(5*
sizeof(XPoint)));
 
 1431   if(!
xp_in) 
return nullptr;
 
 1433   xp_out = (XPoint *)
malloc((
unsigned)(5*
sizeof(XPoint)));
 
 1452   for(i=0; i<5; i++) {
 
 
int XRotDrawImageString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
A front end to XRotPaintAlignedString: -no alignment, paints background.
 
int XRotDrawString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
A front end to XRotPaintAlignedString: -no alignment, no background.
 
static struct StyleTemplate_t gRotStyle
 
char * my_strtok(char *str1, const char *str2)
Routine to replace ‘strtok’ : this one returns a zero length string if it encounters two consecutive ...
 
float XRotVersion(char *, int)
Return version/copyright information.
 
int XRotDrawAlignedImageString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
A front end to XRotPaintAlignedString: -does alignment, paints background.
 
static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg)
Aligns and paints a rotated string.
 
void XRotSetBoundingBoxPad(int)
Set the padding used when calculating bounding boxes.
 
static RotatedTextItem_t * XRotCreateTextItem(Display *dpy, XFontStruct *font, float angle, char *text, int align)
Create a rotated text item.
 
struct RotatedTextItemTemplate_t RotatedTextItem_t
 
static RotatedTextItem_t * XRotRetrieveFromCache(Display *dpy, XFontStruct *font, float angle, char *text, int align)
Query cache for a match with this font/text/angle/alignment request, otherwise arrange for its creati...
 
char * my_strdup(const char *str)
Routine to mimic ‘strdup()’ (some machines don't have it)
 
static void XRotFreeTextItem(Display *dpy, RotatedTextItem_t *item)
Free the resources used by a text item.
 
#define DEBUG_PRINT5(a, b, c, d, e)
 
static XImage * XRotMagnifyImage(Display *dpy, XImage *ximage)
Magnify an XImage using bilinear interpolation.
 
#define DEBUG_PRINT2(a, b)
 
int XRotDrawAlignedString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
A front end to XRotPaintAlignedString: -does alignment, no background.
 
#define DEBUG_PRINT4(a, b, c, d)
 
static RotatedTextItem_t * gFirstTextItem
 
XPoint * XRotTextExtents(Display *, XFontStruct *, float, int, int, char *, int)
Calculate the bounding box some text will have when painted.
 
static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg)
Draw a horizontal string in a quick fashion.
 
void XRotSetMagnification(float)
Set the font magnification factor for all subsequent operations.
 
static void XRotAddToLinkedList(Display *dpy, RotatedTextItem_t *item)
Adds a text item to the end of the cache, removing as many items from the front as required to keep c...
 
static XImage * MakeXImage(Display *dpy, int w, int h)
Create an XImage structure and allocate memory for it.
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
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 angle
 
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 text
 
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
 
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
 
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
 
struct RotatedTextItemTemplate_t * fNext