Back to index

texmacs  1.0.7.15
Classes | Functions
math_boxes.cpp File Reference
#include "Boxes/composite.hpp"
#include "Boxes/construct.hpp"
#include "Boxes/Composite/italic_correct.hpp"

Go to the source code of this file.

Classes

struct  frac_box_rep
struct  sqrt_box_rep
struct  neg_box_rep
struct  tree_box_rep
struct  wide_box_rep

Functions

void left_italic_correct (box b)
void left_italic_restore (box b)
void right_italic_correct (box b)
void right_italic_restore (box b)
SI italic_correction (box L, box R)
box frac_box (path ip, box b1, box b2, font fn, font sfn, color c)
box sqrt_box (path ip, box b1, box b2, box sqrtb, font fn, color c)
box neg_box (path ip, box b, font fn, color c)
box tree_box (path ip, array< box > bs, font fn, color line_c)
box wide_box (path ip, box ref, box hi, font fn, SI sep, bool above)

Function Documentation

box frac_box ( path  ip,
box  b1,
box  b2,
font  fn,
font  sfn,
color  c 
)

Definition at line 368 of file math_boxes.cpp.

                                                               {
  return tm_new<frac_box_rep> (ip, b1, b2, fn, sfn, c);
}

Here is the caller graph for this function:

SI italic_correction ( box  L,
box  R 
)

Definition at line 27 of file math_boxes.cpp.

                                 {
  double slope_L= L->right_slope ();
  double slope_R= R->left_slope ();
  if (slope_L == slope_R) return 0;
  if (slope_L * slope_R == 0.0)
    return L->right_correction () + R->left_correction ();
  double M= (slope_L <= slope_R? slope_R: slope_L);
  if (M<0) M= (slope_L >= slope_R? slope_R: slope_L);
  double factor= (slope_R- slope_L) / M;
  if (factor < 0) factor= -factor;
  return (SI) (factor * (L->right_correction () + R->left_correction ()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void left_italic_correct ( box  b) [inline]

Definition at line 21 of file math_boxes.cpp.

{ b->x1 -= b->left_correction (); }
void left_italic_restore ( box  b) [inline]

Definition at line 22 of file math_boxes.cpp.

{ b->x1 += b->left_correction (); }
box neg_box ( path  ip,
box  b,
font  fn,
color  c 
)

Definition at line 378 of file math_boxes.cpp.

                                           {
  return tm_new<neg_box_rep> (ip, b, fn, c);
}

Here is the caller graph for this function:

void right_italic_correct ( box  b) [inline]

Definition at line 23 of file math_boxes.cpp.

{ b->x2 += b->right_correction (); }

Here is the caller graph for this function:

void right_italic_restore ( box  b) [inline]

Definition at line 24 of file math_boxes.cpp.

{ b->x2 -= b->right_correction (); }

Here is the caller graph for this function:

box sqrt_box ( path  ip,
box  b1,
box  b2,
box  sqrtb,
font  fn,
color  c 
)

Definition at line 373 of file math_boxes.cpp.

                                                                {
  return tm_new<sqrt_box_rep> (ip, b1, b2, sqrtb, fn, c);
}

Here is the caller graph for this function:

box tree_box ( path  ip,
array< box bs,
font  fn,
color  line_c 
)

Definition at line 383 of file math_boxes.cpp.

                                                         {
  return tm_new<tree_box_rep> (ip, bs, fn, line_c);
}

Here is the caller graph for this function:

box wide_box ( path  ip,
box  ref,
box  hi,
font  fn,
SI  sep,
bool  above 
)

Definition at line 388 of file math_boxes.cpp.

                                                                 {
  return tm_new<wide_box_rep> (ip, ref, hi, fn, sep, above);
}