Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes | Protected Attributes
empty_grid_rep Struct Reference
Inheritance diagram for empty_grid_rep:
Inheritance graph
[legend]
Collaboration diagram for empty_grid_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 empty_grid_rep ()
array< grid_curveget_curves (point lim1, point lim2, bool b)
 operator tree ()
point find_closest_point (point p, point pmin, point pmax)
virtual void set_aspect (tree aspect)
virtual array< grid_curveget_curves_around (point p, double delta, frame f)
virtual point find_point_around (point p, double delta, frame f)

Public Attributes

int ref_count

Protected Attributes

array< SIsubd
array< stringcol
point center

Detailed Description

Definition at line 88 of file grid.cpp.


Constructor & Destructor Documentation

Definition at line 89 of file grid.cpp.

                   :
    grid_rep () {}

Member Function Documentation

point empty_grid_rep::find_closest_point ( point  p,
point  pmin,
point  pmax 
) [virtual]

Implements grid_rep.

Definition at line 100 of file grid.cpp.

                                                                   {
  (void) pmin; (void) pmax;
/*double x= floor (10.0*p[0] + 0.5);
  double y= floor (10.0*p[1] + 0.5);
  return point (x / 10.0, y / 10.0);*/
  return p;
}
point grid_rep::find_point_around ( point  p,
double  delta,
frame  f 
) [virtual, inherited]

Definition at line 76 of file grid.cpp.

                                                           {
  point p2= f (p);
  point pmin, pmax;
  pmin= f[point (p2[0]-delta, p2[1]-delta)];
  pmax= f[point (p2[0]+delta, p2[1]+delta)];
  return find_closest_point (p, pmin, pmax);
}

Here is the call graph for this function:

array<grid_curve> empty_grid_rep::get_curves ( point  lim1,
point  lim2,
bool  b 
) [inline, virtual]

Implements grid_rep.

Definition at line 91 of file grid.cpp.

                                                                {
    (void) lim1; (void) lim2; (void) b;
    array<grid_curve> res;
    return res; }
array< grid_curve > grid_rep::get_curves_around ( point  p,
double  delta,
frame  f 
) [virtual, inherited]

Reimplemented in cartesian_rep.

Definition at line 67 of file grid.cpp.

                                                           {
  point p2= f (p);
  point pmin, pmax;
  pmin= f[point (p2[0]-delta, p2[1]-delta)];
  pmax= f[point (p2[0]+delta, p2[1]+delta)];
  return get_curves (pmin, pmax, true);
}

Here is the call graph for this function:

empty_grid_rep::operator tree ( ) [inline, virtual]

Implements grid_rep.

Definition at line 95 of file grid.cpp.

{ return "empty_grid"; }
void grid_rep::set_aspect ( tree  aspect) [virtual, inherited]

Definition at line 21 of file grid.cpp.

                                 {
  subd= array<SI> (2);
  subd[0]= 0;
  subd[1]= 1;
  col= array<string> (2);
  col[0]= "#808080";
  col[1]= "#c0c0c0";
  if (is_tuple (aspect)) {
    int i;
    bool b= false;
    subd= array<SI> (N(aspect));
    col= array<string> (N(aspect));
    for (i=0; i<N(aspect); i++) {
       if (is_tuple (aspect[i], "axes", 1)) {
         subd[i]= 0;
         b= true;
       }
       else {
         subd[i]= as_int (aspect[i][0]);
       }
       col[i]= as_string (aspect[i][1]);
    }
    if (!b) {
      array<SI> subd0 (1);
      array<string> col0 (1);
      subd0[0]= 0;
      col0[0]= "#e0e0ff";
      subd= subd0 << subd;
      col= col0 << col;
    }
    do {
      b= true;
      for (i=1; i<N(subd); i++)
         if (subd[i-1]>subd[i]) {
           SI j;
           string c;
           j= subd[i-1];subd[i-1]= subd[i];subd[i]= j;
           c= col[i-1];col[i-1]= col[i];col[i]= c;
           b= false;
         }
    }
    while (!b);
  }
}

Here is the call graph for this function:


Member Data Documentation

point grid_rep::center [protected, inherited]

Definition at line 38 of file grid.hpp.

array<string> grid_rep::col [protected, inherited]

Definition at line 37 of file grid.hpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.

array<SI> grid_rep::subd [protected, inherited]

Definition at line 36 of file grid.hpp.


The documentation for this struct was generated from the following file: