Rotated.cxx File Reference

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "TMath.h"

Go to the source code of this file.

Classes

struct  RotatedTextItemTemplate_t
struct  StyleTemplate_t

Defines

#define XV_VERSION   5.0
#define XV_COPYRIGHT   "xvertext routines Copyright (c) 1993 Alan Richardson"
#define NONE   0
#define TLEFT   1
#define TCENTRE   2
#define TRIGHT   3
#define MLEFT   4
#define MCENTRE   5
#define MRIGHT   6
#define BLEFT   7
#define BCENTRE   8
#define BRIGHT   9
#define CACHE_SIZE_LIMIT   0
#define DEBUG_PRINT1(a)   if (gRotatedDebug) printf (a)
#define DEBUG_PRINT2(a, b)   if (gRotatedDebug) printf (a, b)
#define DEBUG_PRINT3(a, b, c)   if (gRotatedDebug) printf (a, b, c)
#define DEBUG_PRINT4(a, b, c, d)   if (gRotatedDebug) printf (a, b, c, d)
#define DEBUG_PRINT5(a, b, c, d, e)   if (gRotatedDebug) printf (a, b, c, d, e)
#define M_PI   3.14159265358979323846

Typedefs

typedef RotatedTextItemTemplate_t RotatedTextItem_t

Functions

static char * my_strdup (char *)
static char * my_strtok (char *, char *)
float XRotVersion (char *, int)
void XRotSetMagnification (float)
void XRotSetBoundingBoxPad (int)
int XRotDrawString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
int XRotDrawImageString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
int XRotDrawAlignedString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
int XRotDrawAlignedImageString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
XPoint * XRotTextExtents (Display *, XFontStruct *, float, int, int, char *, int)
static XImage * MakeXImage (Display *dpy, int w, int h)
static int XRotPaintAlignedString (Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg)
static int XRotDrawHorizontalString (Display *dpy, XFontStruct *font, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg)
static RotatedTextItem_tXRotRetrieveFromCache (Display *dpy, XFontStruct *font, float angle, char *text, int align)
static RotatedTextItem_tXRotCreateTextItem (Display *dpy, XFontStruct *font, float angle, char *text, int align)
static void XRotAddToLinkedList (Display *dpy, RotatedTextItem_t *item)
static void XRotFreeTextItem (Display *dpy, RotatedTextItem_t *item)
static XImage * XRotMagnifyImage (Display *dpy, XImage *ximage)

Variables

static int gRotatedDebug = 0
static RotatedTextItem_tgFirstTextItem = 0
static struct StyleTemplate_t gRotStyle


Define Documentation

#define BCENTRE   8

Definition at line 59 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotPaintAlignedString(), and XRotTextExtents().

#define BLEFT   7

Definition at line 58 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotPaintAlignedString(), and XRotTextExtents().

#define BRIGHT   9

Definition at line 60 of file Rotated.cxx.

Referenced by XRotPaintAlignedString(), and XRotTextExtents().

#define CACHE_SIZE_LIMIT   0

Definition at line 74 of file Rotated.cxx.

Referenced by XRotAddToLinkedList().

#define DEBUG_PRINT1 (  )     if (gRotatedDebug) printf (a)

Definition at line 95 of file Rotated.cxx.

Referenced by XRotAddToLinkedList(), XRotDrawHorizontalString(), and XRotRetrieveFromCache().

#define DEBUG_PRINT2 ( a,
b   )     if (gRotatedDebug) printf (a, b)

Definition at line 96 of file Rotated.cxx.

Referenced by XRotAddToLinkedList().

#define DEBUG_PRINT3 ( a,
b,
c   )     if (gRotatedDebug) printf (a, b, c)

Definition at line 97 of file Rotated.cxx.

#define DEBUG_PRINT4 ( a,
b,
c,
d   )     if (gRotatedDebug) printf (a, b, c, d)

Definition at line 98 of file Rotated.cxx.

Referenced by XRotAddToLinkedList().

#define DEBUG_PRINT5 ( a,
b,
c,
d,
 )     if (gRotatedDebug) printf (a, b, c, d, e)

Definition at line 99 of file Rotated.cxx.

Referenced by XRotAddToLinkedList().

#define M_PI   3.14159265358979323846

Definition at line 104 of file Rotated.cxx.

Referenced by ROOT::Math::breitwigner_cdf(), ROOT::Math::breitwigner_cdf_c(), ROOT::Math::breitwigner_pdf(), ROOT::Math::cauchy_cdf(), ROOT::Math::cauchy_cdf_c(), ROOT::Math::cauchy_pdf(), ROOT::Math::cauchy_quantile(), ROOT::Math::cauchy_quantile_c(), city_distance(), ROOT::Math::gv_detail::convert(), ROOT::Math::gv_detail::correctByPi(), ROOT::Math::VectorUtil::DeltaPhi(), ROOT::Math::gaussian_pdf(), GaussPdf(), ROOT::Minuit2::GaussianModelFunction::GetGradient(), TKDE::GetRAMISE(), gsl_poly_complex_solve_cubic(), gsl_poly_complex_solve_quartic(), ROOT::Math::lognormal_pdf(), ROOT::Math::normal_pdf(), ROOT::Math::RotationX::operator *(), ROOT::Math::RotationZ::operator *(), ROOT::Math::RotationY::operator *(), ROOT::Minuit2::GaussianModelFunction::operator()(), ROOT::Minuit2::GaussRandomGen::operator()(), ReneFcn::operator()(), ROOT::Minuit2::GaussFunction::operator()(), ROOT::Math::VectorUtil::Phi_0_2pi(), ROOT::Math::VectorUtil::Phi_mpi_pi(), ROOT::Math::PtEtaPhiE4D< ScalarType >::pi(), ROOT::Math::CylindricalEta3D< T >::pi(), ROOT::Math::Polar3D< T >::pi(), ROOT::Math::Polar2D< T >::pi(), ROOT::Math::Cylindrical3D< T >::pi(), ROOT::Math::PtEtaPhiM4D< ScalarType >::pi(), ROOT::Math::Pi(), ROOT::Math::EulerAngles::Pi(), ROOT::Math::RotationZYX::Pi(), ROOT::Math::RotationY::Rectify(), ROOT::Math::RotationZ::Rectify(), ROOT::Math::RotationX::Rectify(), TKDE::SetKernel(), TKDE::SetKernelSigmas2(), ROOT::Math::tdistribution_pdf(), XRotCreateTextItem(), XRotPaintAlignedString(), and XRotTextExtents().

#define MCENTRE   5

Definition at line 56 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotDrawHorizontalString(), XRotPaintAlignedString(), and XRotTextExtents().

#define MLEFT   4

Definition at line 55 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotDrawHorizontalString(), XRotPaintAlignedString(), and XRotTextExtents().

#define MRIGHT   6

Definition at line 57 of file Rotated.cxx.

Referenced by XRotDrawHorizontalString(), XRotPaintAlignedString(), and XRotTextExtents().

#define NONE   0

Definition at line 51 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotDrawHorizontalString(), XRotDrawImageString(), XRotDrawString(), XRotPaintAlignedString(), and XRotTextExtents().

#define TCENTRE   2

Definition at line 53 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotDrawHorizontalString(), XRotPaintAlignedString(), and XRotTextExtents().

#define TLEFT   1

Definition at line 52 of file Rotated.cxx.

Referenced by XRotCreateTextItem(), XRotDrawHorizontalString(), XRotPaintAlignedString(), and XRotTextExtents().

#define TRIGHT   3

Definition at line 54 of file Rotated.cxx.

Referenced by XRotDrawHorizontalString(), XRotPaintAlignedString(), and XRotTextExtents().

#define XV_COPYRIGHT   "xvertext routines Copyright (c) 1993 Alan Richardson"

Definition at line 44 of file Rotated.cxx.

Referenced by XRotVersion().

#define XV_VERSION   5.0

Definition at line 43 of file Rotated.cxx.

Referenced by XRotVersion().


Typedef Documentation

typedef struct RotatedTextItemTemplate_t RotatedTextItem_t


Function Documentation

static XImage * MakeXImage ( Display *  dpy,
int  w,
int  h 
) [static]

Definition at line 263 of file Rotated.cxx.

References calloc(), data, image, and MSBFirst.

Referenced by XRotCreateTextItem(), and XRotMagnifyImage().

static char * my_strdup ( char *   )  [static]

Definition at line 176 of file Rotated.cxx.

References malloc(), s, and strcpy().

Referenced by XRotCreateTextItem(), XRotRetrieveFromCache(), and XRotTextExtents().

static char * my_strtok ( char *  ,
char *   
) [static]

Definition at line 191 of file Rotated.cxx.

References i, int, j, len, and start.

Referenced by XRotCreateTextItem(), and XRotTextExtents().

static void XRotAddToLinkedList ( Display *  dpy,
RotatedTextItem_t item 
) [static]

Definition at line 1093 of file Rotated.cxx.

References CACHE_SIZE_LIMIT, DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT4, DEBUG_PRINT5, RotatedTextItemTemplate_t::fAlign, RotatedTextItemTemplate_t::fAngle, RotatedTextItemTemplate_t::fCached, RotatedTextItemTemplate_t::fColsOut, RotatedTextItemTemplate_t::fid, RotatedTextItemTemplate_t::fNext, RotatedTextItemTemplate_t::fNl, RotatedTextItemTemplate_t::font_name, RotatedTextItemTemplate_t::fRowsOut, RotatedTextItemTemplate_t::fSize, RotatedTextItemTemplate_t::fText, gFirstTextItem, i, and XRotFreeTextItem().

Referenced by XRotRetrieveFromCache().

static RotatedTextItem_t * XRotCreateTextItem ( Display *  dpy,
XFontStruct *  font,
float  angle,
char *  text,
int  align 
) [static]

Definition at line 797 of file Rotated.cxx.

References TMath::Abs(), BCENTRE, BLEFT, canvas, TMath::Cos(), dir(), RotatedTextItemTemplate_t::fColsIn, RotatedTextItemTemplate_t::fColsOut, RotatedTextItemTemplate_t::fCornersX, RotatedTextItemTemplate_t::fCornersY, StyleTemplate_t::fMagnify, RotatedTextItemTemplate_t::fMaxWidth, RotatedTextItemTemplate_t::fNl, free(), RotatedTextItemTemplate_t::fRowsIn, RotatedTextItemTemplate_t::fRowsOut, RotatedTextItemTemplate_t::fXimage, gRotStyle, height, i, int, j, M_PI, MakeXImage(), malloc(), MCENTRE, MLEFT, my_strdup(), my_strtok(), NONE, TMath::Sin(), TMath::Tan(), TCENTRE, TLEFT, and XRotMagnifyImage().

Referenced by XRotRetrieveFromCache().

int XRotDrawAlignedImageString ( Display *  ,
XFontStruct *  ,
float  ,
Drawable  ,
GC  ,
int  ,
int  ,
char *  ,
int   
)

Definition at line 318 of file Rotated.cxx.

References XRotPaintAlignedString().

Referenced by TGX11::DrawText().

int XRotDrawAlignedString ( Display *  ,
XFontStruct *  ,
float  ,
Drawable  ,
GC  ,
int  ,
int  ,
char *  ,
int   
)

Definition at line 307 of file Rotated.cxx.

References XRotPaintAlignedString().

Referenced by TGX11::DrawText().

static int XRotDrawHorizontalString ( Display *  dpy,
XFontStruct *  font,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  text,
int  align,
int  bg 
) [static]

Definition at line 561 of file Rotated.cxx.

References DEBUG_PRINT1, dir(), height, i, int, MCENTRE, MLEFT, MRIGHT, NONE, TCENTRE, TLEFT, and TRIGHT.

Referenced by XRotPaintAlignedString().

int XRotDrawImageString ( Display *  ,
XFontStruct *  ,
float  ,
Drawable  ,
GC  ,
int  ,
int  ,
char *   
)

Definition at line 296 of file Rotated.cxx.

References NONE, and XRotPaintAlignedString().

int XRotDrawString ( Display *  ,
XFontStruct *  ,
float  ,
Drawable  ,
GC  ,
int  ,
int  ,
char *   
)

Definition at line 285 of file Rotated.cxx.

References NONE, and XRotPaintAlignedString().

static void XRotFreeTextItem ( Display *  dpy,
RotatedTextItem_t item 
) [static]

Definition at line 1197 of file Rotated.cxx.

References RotatedTextItemTemplate_t::fBitmap, RotatedTextItemTemplate_t::fCornersX, RotatedTextItemTemplate_t::fCornersY, RotatedTextItemTemplate_t::font_name, free(), RotatedTextItemTemplate_t::fText, and RotatedTextItemTemplate_t::fXimage.

Referenced by XRotAddToLinkedList(), and XRotPaintAlignedString().

static XImage * XRotMagnifyImage ( Display *  dpy,
XImage *  ximage 
) [static]

Definition at line 1220 of file Rotated.cxx.

References StyleTemplate_t::fMagnify, gRotStyle, i, int, j, MakeXImage(), t, u, x, and y.

Referenced by XRotCreateTextItem().

static int XRotPaintAlignedString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  text,
int  align,
int  bg 
) [static]

Definition at line 330 of file Rotated.cxx.

References BCENTRE, BLEFT, BRIGHT, TMath::Cos(), RotatedTextItemTemplate_t::fBitmap, RotatedTextItemTemplate_t::fCached, RotatedTextItemTemplate_t::fColsOut, RotatedTextItemTemplate_t::fCornersX, RotatedTextItemTemplate_t::fCornersY, StyleTemplate_t::fMagnify, RotatedTextItemTemplate_t::fMaxWidth, RotatedTextItemTemplate_t::fNl, free(), RotatedTextItemTemplate_t::fRowsIn, RotatedTextItemTemplate_t::fRowsOut, gRotStyle, i, int, M_PI, malloc(), MCENTRE, MLEFT, MRIGHT, NONE, TMath::Sin(), TCENTRE, TLEFT, TRIGHT, XRotDrawHorizontalString(), XRotFreeTextItem(), and XRotRetrieveFromCache().

Referenced by XRotDrawAlignedImageString(), XRotDrawAlignedString(), XRotDrawImageString(), and XRotDrawString().

static RotatedTextItem_t * XRotRetrieveFromCache ( Display *  dpy,
XFontStruct *  font,
float  angle,
char *  text,
int  align 
) [static]

Definition at line 656 of file Rotated.cxx.

References TMath::Abs(), DEBUG_PRINT1, RotatedTextItemTemplate_t::fAlign, RotatedTextItemTemplate_t::fAngle, RotatedTextItemTemplate_t::fBitmap, RotatedTextItemTemplate_t::fColsOut, RotatedTextItemTemplate_t::fid, StyleTemplate_t::fMagnify, RotatedTextItemTemplate_t::fMagnify, RotatedTextItemTemplate_t::fNext, RotatedTextItemTemplate_t::fNl, RotatedTextItemTemplate_t::font_name, RotatedTextItemTemplate_t::fRowsOut, RotatedTextItemTemplate_t::fText, RotatedTextItemTemplate_t::fXimage, gFirstTextItem, gRotStyle, my_strdup(), XA_FONT, XRotAddToLinkedList(), and XRotCreateTextItem().

Referenced by XRotPaintAlignedString().

void XRotSetBoundingBoxPad ( int   ) 

Definition at line 254 of file Rotated.cxx.

References StyleTemplate_t::fBbxPadl, and gRotStyle.

void XRotSetMagnification ( float   ) 

Definition at line 245 of file Rotated.cxx.

References StyleTemplate_t::fMagnify, and gRotStyle.

Referenced by TGX11::DrawText(), and TGX11::GetTextExtent().

XPoint * XRotTextExtents ( Display *  ,
XFontStruct *  ,
float  ,
int  ,
int  ,
char *  ,
int   
)

Definition at line 1326 of file Rotated.cxx.

References BCENTRE, BLEFT, BRIGHT, TMath::Cos(), dir(), StyleTemplate_t::fBbxPadl, StyleTemplate_t::fMagnify, free(), gRotStyle, height, i, int, M_PI, malloc(), MCENTRE, MLEFT, MRIGHT, my_strdup(), my_strtok(), NONE, TMath::Sin(), TCENTRE, TLEFT, and TRIGHT.

Referenced by TGX11::GetTextExtent().

float XRotVersion ( char *  ,
int   
)

Definition at line 235 of file Rotated.cxx.

References XV_COPYRIGHT, and XV_VERSION.


Variable Documentation

RotatedTextItem_t* gFirstTextItem = 0 [static]

Definition at line 138 of file Rotated.cxx.

Referenced by XRotAddToLinkedList(), and XRotRetrieveFromCache().

int gRotatedDebug = 0 [static]

Definition at line 92 of file Rotated.cxx.

struct StyleTemplate_t gRotStyle [static]

Referenced by XRotCreateTextItem(), XRotMagnifyImage(), XRotPaintAlignedString(), XRotRetrieveFromCache(), XRotSetBoundingBoxPad(), XRotSetMagnification(), and XRotTextExtents().


Generated on Tue Jul 5 15:58:45 2011 for ROOT_528-00b_version by  doxygen 1.5.1