Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes
glyph_rep Struct Reference

#include <bitmap_font.hpp>

Inheritance diagram for glyph_rep:
Inheritance graph
[legend]
Collaboration diagram for glyph_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 glyph_rep (int w, int h, int xoff, int yoff, int depth, int status=0)
 ~glyph_rep ()
int get_1 (int i, int j)
void set_1 (int i, int j, int with)
int get_x (int i, int j)
void set_x (int i, int j, int with)
int get (int i, int j)
void set (int i, int j, int with)
void adjust_bot ()
void adjust_top ()

Public Attributes

short depth
short width
short height
short xoff
short yoff
short lwidth
short status
QNraster
int ref_count

Detailed Description

Definition at line 35 of file bitmap_font.hpp.


Constructor & Destructor Documentation

glyph_rep::glyph_rep ( int  w,
int  h,
int  xoff,
int  yoff,
int  depth,
int  status = 0 
)

Definition at line 20 of file glyph.cpp.

{
  depth   = depth2;
  width   = w2;
  height  = h2;
  xoff    = xoff2;
  yoff    = yoff2;
  lwidth  = w2;
  status  = status2;

  int i, n= (depth==1? (width*height+7)/8: width*height);
  raster= tm_new_array<QN> (n);
  for (i=0; i<n; i++) raster[i]=0;
}

Definition at line 36 of file glyph.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 86 of file glyph.cpp.

                       {
  int i;
  if (height<=2) return;
  for (i=0; i<width; i++) set_x (i, height-1, get_x (i, height-2));
}

Here is the call graph for this function:

Definition at line 93 of file glyph.cpp.

                       {
  int i;
  if (height<=2) return;
  for (i=0; i<width; i++) set_x (i, 0, get_x (i, 1));
}

Here is the call graph for this function:

int glyph_rep::get ( int  i,
int  j 
)

Definition at line 72 of file glyph.cpp.

                            {
  return get_x (i+xoff, yoff-j);
}

Here is the call graph for this function:

int glyph_rep::get_1 ( int  i,
int  j 
) [inline]

Definition at line 62 of file bitmap_font.hpp.

                              {
  int bit= j*width+i;
  return (raster[bit>>3] >> (bit&7)) & 1;
}
int glyph_rep::get_x ( int  i,
int  j 
)

Definition at line 49 of file glyph.cpp.

                              {
  if ((i<0) || (i>=width))  return 0;
  if ((j<0) || (j>=height)) return 0;
  if (depth==1) {
    int bit= j*width+i;
    return (raster[bit>>3] >> (bit&7)) & 1;
  }
  else return raster[j*width+i];
}

Here is the caller graph for this function:

void glyph_rep::set ( int  i,
int  j,
int  with 
)

Definition at line 77 of file glyph.cpp.

                                      {
  set_x (i+xoff, yoff-j, with);
}

Here is the call graph for this function:

void glyph_rep::set_1 ( int  i,
int  j,
int  with 
) [inline]

Definition at line 68 of file bitmap_font.hpp.

                                        {
  int bit= j*width+i;
  if (with==0) raster[bit>>3] &= ~(1 << (bit&7));
  else raster[bit>>3] |= (1 << (bit&7));
}
void glyph_rep::set_x ( int  i,
int  j,
int  with 
)

Definition at line 60 of file glyph.cpp.

                                        {
  if ((i<0) || (i>=width)) FAILED ("bad x-index");
  if ((j<0) || (j>=height)) FAILED ("bad y-index");
  if (depth==1) {
    int bit= j*width+i;
    if (with==0) raster[bit>>3] &= ~(1 << (bit&7));
    else raster[bit>>3] |= (1 << (bit&7));
  }
  else raster [j*width+ i]= with;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 36 of file bitmap_font.hpp.

Definition at line 37 of file bitmap_font.hpp.

Definition at line 39 of file bitmap_font.hpp.

Definition at line 41 of file bitmap_font.hpp.

int concrete_struct::ref_count [inherited]

Definition at line 135 of file basic.hpp.

Definition at line 40 of file bitmap_font.hpp.

Definition at line 37 of file bitmap_font.hpp.

Definition at line 38 of file bitmap_font.hpp.

Definition at line 38 of file bitmap_font.hpp.


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