Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ZoomableSurfaceView Class Reference

#include <zoomablesurfaceview.h>

Inheritance diagram for ZoomableSurfaceView:

Inheritance graph
[legend]
Collaboration diagram for ZoomableSurfaceView:

Collaboration graph
[legend]

Public Member Functions

void pen (unsigned char r, unsigned char g, unsigned char b, double thickness)
void get_pen (unsigned char &r, unsigned char &g, unsigned char &b, double &thickness)
void clear_rect (double, double, double, double)
void repaint_rect (double, double, double, double)
void get_rect (double &, double &, double &, double &)
void line (double x1, double y1, double x2, double y2)
void rectangle (double x1, double y1, double x2, double y2)
void dot (double x1, double y1)
void circle (double x1, double y1, double radius)
void arc (double x1, double y1, double radius, double an1, double an2)
void bezier (double x1, double y1, double x2, double y2, double x3, double y3)
virtual void fill_h_triangle (double x1, double y1, double x2, double y2, double x3)
virtual void fill_v_triangle (double x1, double y1, double x2, double y2, double y3)
virtual void fillrect (double x1, double y1, double x2, double y2, unsigned char fr, unsigned char fg, unsigned char fb)
void textout (double x1, double y1, const char *text)
void textrect (double x1, double y1, double x2, double y2, const char *text)
void setfontsize (double)
void set_object_magnification (double)
double zoom (double factor)
double get_zoom (void)
double get_thickness1 (void)
void center (double, double)
void scroll (double, double)
bool rectfits (double, double, double, double)
void get_scenemousepos (double &, double &)
 ZoomableSurfaceView (SurfaceDriver *, int x, int y, int w, int h, unsigned char pbkgr, unsigned char pbkgg, unsigned char pbkgb)
void put_image (Image *, int destx, int desty, double imgzoom=1.)

Protected Member Functions

double scene2screenx (double p)
double scene2screeny (double p)
double screen2scenex (double p)
double screen2sceney (double p)

Protected Attributes

double object_magnification
double view_magnification
 View's absolute magnification.

double thickness1
 View's inverse of absolute magnification.


Constructor & Destructor Documentation

ZoomableSurfaceView::ZoomableSurfaceView (  SurfaceDriver *  ,
int  x,
int  y,
int  w,
int  h,
unsigned char  pbkgr,
unsigned char  pbkgg,
unsigned char  pbkgb
) 
 


Member Function Documentation

double ZoomableSurfaceView::scene2screenx (  double  p  )  [inline, protected]
 

double ZoomableSurfaceView::scene2screeny (  double  p  )  [inline, protected]
 

double ZoomableSurfaceView::screen2scenex (  double  p  )  [inline, protected]
 

double ZoomableSurfaceView::screen2sceney (  double  p  )  [inline, protected]
 

void ZoomableSurfaceView::pen (  unsigned char  r,
unsigned char  g,
unsigned char  b,
double  thickness
)  [virtual]
 

Implements ZoomableView.

Here is the call graph for this function:

void ZoomableSurfaceView::get_pen (  unsigned char &  r,
unsigned char &  g,
unsigned char &  b,
double &  thickness
)  [virtual]
 

Implements ZoomableView.

Here is the call graph for this function:

void ZoomableSurfaceView::clear_rect (  double  ,
double  ,
double  ,
double 
)  [virtual]
 

Implements ZoomableView.

Here is the call graph for this function:

void ZoomableSurfaceView::repaint_rect (  double  ,
double  ,
double  ,
double 
)  [virtual]
 

Implements ZoomableView.

Here is the call graph for this function:

void ZoomableSurfaceView::get_rect (  double &  ,
double &  ,
double &  ,
double & 
)  [virtual]
 

Implements ZoomableView.

void ZoomableSurfaceView::line (  double  x1,
double  y1,
double  x2,
double  y2
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::rectangle (  double  x1,
double  y1,
double  x2,
double  y2
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::dot (  double  x1,
double  y1
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::circle (  double  x1,
double  y1,
double  radius
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::arc (  double  x1,
double  y1,
double  radius,
double  an1,
double  an2
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::bezier (  double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::fill_h_triangle (  double  x1,
double  y1,
double  x2,
double  y2,
double  x3
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::fill_v_triangle (  double  x1,
double  y1,
double  x2,
double  y2,
double  y3
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::fillrect (  double  x1,
double  y1,
double  x2,
double  y2,
unsigned char  fr,
unsigned char  fg,
unsigned char  fb
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::textout (  double  x1,
double  y1,
const char *  text
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::textrect (  double  x1,
double  y1,
double  x2,
double  y2,
const char *  text
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::setfontsize (  double   )  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::set_object_magnification (  double   ) 
 

use this function to tell the view that the object is initially visible at magnification m and thus should be resized accordingly.

double ZoomableSurfaceView::zoom (  double  factor  )  [virtual]
 

Implements ZoomableView.

double ZoomableSurfaceView::get_zoom (  void   )  [virtual]
 

Implements ZoomableView.

double ZoomableSurfaceView::get_thickness1 (  void   )  [virtual]
 

Implements ZoomableView.

void ZoomableSurfaceView::center (  double  ,
double 
)  [virtual]
 

Reimplemented from ScrollableView.

void ZoomableSurfaceView::scroll (  double  ,
double 
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

bool ZoomableSurfaceView::rectfits (  double  ,
double  ,
double  ,
double 
)  [virtual]
 

This function is used when deciding scenenode visibility (including for paint events)

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::get_scenemousepos (  double &  ,
double & 
) 
 

Reimplemented from ScrollableView.

Here is the call graph for this function:

void ZoomableSurfaceView::put_image (  Image *  ,
int  destx,
int  desty,
double  imgzoom = 1.
)  [virtual]
 

Reimplemented from ScrollableView.

Here is the call graph for this function:


Field Documentation

double ZoomableSurfaceView::object_magnification [protected]
 

this value is used in determining how much the graphics should be scaled

double ZoomableSurfaceView::view_magnification [protected]
 

View's absolute magnification.

double ZoomableSurfaceView::thickness1 [protected]
 

View's inverse of absolute magnification.


The documentation for this class was generated from the following files:
Generated on Wed Jun 23 18:47:40 2004 for cZUI by doxygen 1.3.5