## class Grafport

> (abstract) grafport class (primitive drawing functions).

## Inheritance:

### Public Methods

  | Grafport ()
  virtual | ~Grafport ()
  virtual bool | DrawsXor ()
  virtual void | ClearArea (int x, int y, int wd, int ht)
  virtual void | UpdateSize (int, int)
  virtual int | GetWidth ()
  virtual int | GetHeight ()
  virtual void | Redraw (int, int, int, int, int, int)
  virtual void | SetFont (XFont *f) Make this the current font.
  XFont* | GetFont () Get the current font.
  virtual void | SetBackgroundColor (const char *colorName)
  virtual void | SetBackgroundColor (const string *colorName)
  virtual void | SetForegroundColor (const char *colorName)
  virtual void | SetForegroundColor (const string *colorName)
  const string* | GetBackgroundColor ()
  const string* | GetForegroundColor ()
  List <Color *> * | GetColors ()
  void | SetLineStyle (LineStyle::Type s)
  LineStyle::Type | GetLineStyle ()
  void | SetFillStyle (FillStyle::Type s)
  FillStyle::Type | GetFillStyle ()
  virtual void | SetLineWidth (unsigned n)
  unsigned | GetLineWidth ()
  void | SetZoomValue (double newValue) set zoom value.
  double | GetZoomValue ()
  int | Zoom (int x)
  int | ZoomCorrect (int x)
  virtual void | DrawRectangle (int x, int y, int wd, int ht)
  virtual void | FillRectangle (int x, int y, int wd, int ht)
  virtual void | DrawRoundedRectangle ( int x, int y, int wd, int ht, int rd)
  virtual void | FillRoundedRectangle ( int x, int y, int wd, int ht, int rd)
  virtual void | DrawEllipsedRectangle ( int x, int y, int wd, int ht, int rd)
  virtual void | FillEllipsedRectangle ( int x, int y, int wd, int ht, int rd)
  void | DrawRectangles (const Rectangle *rects, int n) Draw list of n rectangles.
  void | FillRectangles (const Rectangle *rects, int n)
  virtual void | DrawEditDashedRectangle (int, int, int, int) Draw dashed rectangle (not zoomed, not printed)
  virtual void | DrawUnzoomedRectangle (int, int, int, int)
  virtual void | DrawStringLeft (int x, int y, const char *str) Draw string with topleft at (x,y)
  virtual void | DrawStringCentered (int x, int y, const char *str) Draw string centered at (x,y)
  virtual void | DrawStringRight (int x, int y, const char *str) Draw string with topright at (x,y)
  virtual void | DrawStringLeftUnderlined (int x, int y, const char *str) Draw string with topleft underlined at (x,y)
  virtual void | DrawStringCenteredUnderlined ( int x, int y, const char *str) Draw string centered underlined at (x,y)
  virtual void | DrawStringRightUnderlined (int x, int y, const char *str) Draw string with topright underlined at (x,y)
  Point | DrawStringsCentered (int x, int y, const string *str, bool ul, int cursor=0) returns cursor position.
  Point | DrawStringsLeft ( int topLeftx, int topLefty, const string *str, bool ul, int cursor=0) draw n-line string left aligned, returns cursor position.
  Point | DrawStringsRight ( int topRightx, int topRighty, const string *str, bool ul, int cursor=0) draw n-line string right aligned, return cursor position.
  unsigned | CursorPosition ( int x, int y, const string *str, int hitX, int hitY) return cursor place closest to hitX, hitY.
  virtual void | DrawUnzoomedStringLeft (int, int, const char *)
  virtual void | DrawUnzoomedStringCentered (int, int, const char *)
  virtual void | DrawLine (const Point *p1, const Point *p2)
  virtual void | DrawLine (int x1, int y1, int x2, int y2)
  virtual void | DrawCurve (const Point *p1, const Point *p2, const Point *p3, const Point *p4)
  virtual void | DrawEditLine (int, int, int, int) not zoomed not printed.
  virtual void | DrawEditLine (const Point *, const Point *) not zoomed not printed.
  virtual void | DrawEditDottedGridLine (int, int, int, int) not zoomed or printed. Uses special dot pattern.
  virtual void | DrawEditDottedLine (int, int, int, int)
  virtual void | DrawEditPoint (int, int) not zoomed or printed.
  virtual void | DrawEditPoint (const Point *) not zoomed or printed.
  virtual void | DrawUnzoomedLine (int, int, int, int)
  virtual void | DrawPoint (int x, int y)
  virtual void | DrawPoint (const Point *p)
  virtual void | DrawEllipse (int x, int y, int wd, int ht)
  virtual void | FillEllipse (int x, int y, int wd, int ht)
  virtual void | DrawArc (int x, int y, int wd, int ht, int arc1, int arc2)
  virtual void | FillArc (int x, int y, int wd, int ht, int arc1, int arc2)
  virtual void | DrawDisk ( int x, int y, int wd, int ht, int ellipse_ht) disk is an ellipse, two vert. lines and a half ellipse
  virtual void | FillDisk ( int x, int y, int wd, int ht, int ellipse_ht)
  virtual void | DrawPolygon (const Point *plist, int n) draw lines between the first n points in plist.
  virtual void | FillPolygon (const Point *plist, int n)
  virtual void | DrawActiveCaret (int, int) Draw active cursor sign.
  virtual void | DrawDeactiveCaret (int, int) Draw deactive cursor sign.

### Public

  | Zooming in/out.
  | Draws n-line string centered (underlined?) at (x,y),

### Protected Methods

  Point | CursorPosition (int x, int y, const string *buf, int cursor)
  Color* | LookupColor (const string *colorName)
  Color* | LookupColor (const char *colorName)
  void | AddColor (const string *colorName, unsigned long pixel)
  void | AddColor (const char *colorName, unsigned long pixel)
  void | AddColor (Color *c)
  virtual void | InitColors ()
  void | RecalcPolygon (const Point *points, int nrPoints, Point *newPoints, int d)

## Documentation

> (abstract) grafport class (primitive drawing functions).

`Grafport()`

`virtual ~Grafport()`

`virtual bool DrawsXor()`

`virtual void ClearArea(int x, int y, int wd, int ht)`

`virtual void UpdateSize(int, int)`

`virtual int GetWidth()`

`virtual int GetHeight()`

`virtual void Redraw(int, int, int, int, int, int)`

`virtual void SetFont(XFont *f)`
  Make this the current font.

`XFont* GetFont()`
  Get the current font.

`virtual void SetBackgroundColor(const char *colorName)`

`virtual void SetBackgroundColor(const string *colorName)`

`virtual void SetForegroundColor(const char *colorName)`

`virtual void SetForegroundColor(const string *colorName)`

`const string* GetBackgroundColor()`

`const string* GetForegroundColor()`

`List <Color *> * GetColors()`

`void SetLineStyle(LineStyle::Type s)`

`LineStyle::Type GetLineStyle()`

`void SetFillStyle(FillStyle::Type s)`

`FillStyle::Type GetFillStyle()`

`virtual void SetLineWidth(unsigned n)`

`unsigned GetLineWidth()`

``
  Zooming in/out.

`void SetZoomValue(double newValue)`
  set zoom value.

`double GetZoomValue()`

`int Zoom(int x)`

`int ZoomCorrect(int x)`

`virtual void DrawRectangle(int x, int y, int wd, int ht)`

`virtual void FillRectangle(int x, int y, int wd, int ht)`

`virtual void DrawRoundedRectangle( int x, int y, int wd, int ht, int rd)`

`virtual void FillRoundedRectangle( int x, int y, int wd, int ht, int rd)`

`virtual void DrawEllipsedRectangle( int x, int y, int wd, int ht, int rd)`

`virtual void FillEllipsedRectangle( int x, int y, int wd, int ht, int rd)`

`void DrawRectangles(const Rectangle *rects, int n)`
  Draw list of n rectangles.

`void FillRectangles(const Rectangle *rects, int n)`

`virtual void DrawEditDashedRectangle(int, int, int, int)`
  Draw dashed rectangle (not zoomed, not printed)

`virtual void DrawUnzoomedRectangle(int, int, int, int)`

`virtual void DrawStringLeft(int x, int y, const char *str)`
  Draw string with topleft at (x,y)

`virtual void DrawStringCentered(int x, int y, const char *str)`
  Draw string centered at (x,y)

`virtual void DrawStringRight(int x, int y, const char *str)`
  Draw string with topright at (x,y)

`virtual void DrawStringLeftUnderlined(int x, int y, const char *str)`
  Draw string with topleft underlined at (x,y)

`virtual void DrawStringCenteredUnderlined( int x, int y, const char *str)`
  Draw string centered underlined at (x,y)

`virtual void DrawStringRightUnderlined(int x, int y, const char *str)`
  Draw string with topright underlined at (x,y)

``
  Draws n-line string centered (underlined?) at (x,y),

`Point DrawStringsCentered(int x, int y, const string *str, bool ul, int cursor=0)`
  returns cursor position.

`Point DrawStringsLeft( int topLeftx, int topLefty, const string *str, bool ul, int cursor=0)`
  draw n-line string left aligned, returns cursor position.

`Point DrawStringsRight( int topRightx, int topRighty, const string *str, bool ul, int cursor=0)`
  draw n-line string right aligned, return cursor position.

`unsigned CursorPosition( int x, int y, const string *str, int hitX, int hitY)`
  return cursor place closest to hitX, hitY.

`virtual void DrawUnzoomedStringLeft(int, int, const char *)`

`virtual void DrawUnzoomedStringCentered(int, int, const char *)`

`virtual void DrawLine(const Point *p1, const Point *p2)`

`virtual void DrawLine(int x1, int y1, int x2, int y2)`

`virtual void DrawCurve(const Point *p1, const Point *p2, const Point *p3, const Point *p4)`

`virtual void DrawEditLine(int, int, int, int)`
  not zoomed not printed.

`virtual void DrawEditLine(const Point *, const Point *)`
  not zoomed not printed.

`virtual void DrawEditDottedGridLine(int, int, int, int)`
  not zoomed or printed. Uses special dot pattern.

`virtual void DrawEditDottedLine(int, int, int, int)`

`virtual void DrawEditPoint(int, int)`
  not zoomed or printed.

`virtual void DrawEditPoint(const Point *)`
  not zoomed or printed.

`virtual void DrawUnzoomedLine(int, int, int, int)`

`virtual void DrawPoint(int x, int y)`

`virtual void DrawPoint(const Point *p)`

`virtual void DrawEllipse(int x, int y, int wd, int ht)`

`virtual void FillEllipse(int x, int y, int wd, int ht)`

`virtual void DrawArc(int x, int y, int wd, int ht, int arc1, int arc2)`

`virtual void FillArc(int x, int y, int wd, int ht, int arc1, int arc2)`

`virtual void DrawDisk( int x, int y, int wd, int ht, int ellipse_ht)`
  disk is an ellipse, two vert. lines and a half ellipse

`virtual void FillDisk( int x, int y, int wd, int ht, int ellipse_ht)`

`virtual void DrawPolygon(const Point *plist, int n)`
  draw lines between the first n points in plist.

`virtual void FillPolygon(const Point *plist, int n)`

`virtual void DrawActiveCaret(int, int)`
  Draw active cursor sign.

`virtual void DrawDeactiveCaret(int, int)`
  Draw deactive cursor sign.

`Point CursorPosition(int x, int y, const string *buf, int cursor)`

`Color* LookupColor(const string *colorName)`

`Color* LookupColor(const char *colorName)`

`void AddColor(const string *colorName, unsigned long pixel)`

`void AddColor(const char *colorName, unsigned long pixel)`

`void AddColor(Color *c)`

`virtual void InitColors()`

`void RecalcPolygon(const Point *points, int nrPoints, Point *newPoints, int d)`

Direct child classes:
  XGrafport
  PSGrafport
  FigGrafport

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de