Back to index

texmacs  1.0.7.15
Classes | Functions
grid.hpp File Reference
#include "frame.hpp"
#include "curve.hpp"
#include "renderer.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  grid_curve_rep
class  grid_curve
class  grid_rep
class  grid

Functions

 CONCRETE_NULL_CODE (grid_curve)
 ABSTRACT_NULL_CODE (grid)
grid empty_grid ()
grid cartesian (array< SI > subd, array< string > col, point o, double step)
grid polar (array< SI > subd, array< string > col, point o, double step, SI astep)
grid logarithmic (array< SI > subd, array< string > col, point o, double step, SI base)
grid as_grid (tree t)
tree as_tree (grid g)
bool operator== (grid g1, grid g2)
bool operator!= (grid g1, grid g2)

Function Documentation

grid as_grid ( tree  t)

Definition at line 494 of file grid.cpp.

                 {
  array<SI> subd (0, 1);
  array<string> col ("black", "black");
  grid gr= empty_grid ();
  double step= 1.0;
  point center= point (0.0, 0.0);
  if (is_tuple (t, "empty"))
    gr= empty_grid ();
  else
  if (is_tuple (t, "cartesian")) {
    if (is_tuple (t, "cartesian", 0)) ;
    else
    if (is_tuple (t, "cartesian", 1))
      step= as_double (t[1]);
    else
    if (is_tuple (t, "cartesian", 2)) {
      center= as_point (t[1]);
      step= as_double (t[2]);
    }
    gr= cartesian (subd, col, center, step);
  }
  else
  if (is_tuple (t, "polar")) {
    SI astep= 8;
    if (is_tuple (t, "polar", 0)) ;
    else
    if (is_tuple (t, "polar", 1))
      step= as_double (t[1]);
    else
    if (is_tuple (t, "polar", 2)) {
      step= as_double (t[1]);
      astep= as_int (t[2]);
    }
    else
    if (is_tuple (t, "polar", 3)) {
      center= as_point (t[1]);
      step= as_double (t[2]);
      astep= as_int (t[3]);
    }
    gr=polar (subd, col, center, step, astep);
  }
  else
  if (is_tuple (t, "logarithmic")) {
    SI base= 10;
    if (is_tuple (t, "logarithmic", 0)) ;
    else
    if (is_tuple (t, "logarithmic", 1))
      step= as_double (t[1]);
    else
    if (is_tuple (t, "logarithmic", 2)) {
      step= as_double (t[1]);
      base= as_int (t[2]);
    }
    else
    if (is_tuple (t, "logarithmic", 3)) {
      center= as_point (t[1]);
      step= as_double (t[2]);
      base= as_int (t[3]);
    }
    gr= logarithmic (subd, col, center, step, base);
  }
  return gr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

tree as_tree ( grid  g)

Definition at line 559 of file grid.cpp.

                 {
  return (tree) g;
}
grid cartesian ( array< SI subd,
array< string col,
point  o,
double  step 
)

Definition at line 247 of file grid.cpp.

                                                                    {
  return tm_new<cartesian_rep> (subd, col, o, step);
}

Here is the caller graph for this function:

Definition at line 109 of file grid.cpp.

              {
  return tm_new<empty_grid_rep> ();
}

Here is the caller graph for this function:

grid logarithmic ( array< SI subd,
array< string col,
point  o,
double  step,
SI  base 
)

Definition at line 485 of file grid.cpp.

                                                                               {
  return tm_new<logarithmic_rep> (subd, col, o, step, base);
}

Here is the caller graph for this function:

bool operator!= ( grid  g1,
grid  g2 
) [inline]

Definition at line 73 of file grid.hpp.

                                           {
  return as_tree (g1) != as_tree(g2); }

Here is the call graph for this function:

bool operator== ( grid  g1,
grid  g2 
) [inline]

Definition at line 71 of file grid.hpp.

                                           {
  return as_tree (g1) == as_tree(g2); }

Here is the call graph for this function:

grid polar ( array< SI subd,
array< string col,
point  o,
double  step,
SI  astep 
)

Definition at line 370 of file grid.cpp.

                                                                          {
  return tm_new<polar_rep> (subd, col, o, step, astep);
}

Here is the caller graph for this function: