Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Attributes | Package Attributes
rene.zirkel.graphics.MyGraphicsEPS Class Reference
Inheritance diagram for rene.zirkel.graphics.MyGraphicsEPS:
Inheritance graph
[legend]
Collaboration diagram for rene.zirkel.graphics.MyGraphicsEPS:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MyGraphicsEPS (OutputStream out, int w, int h)
void setLineWidth (double w)
void clearRect (int x, int y, int w, int h, Color c)
void setColor (Color c)
void setColor (ConstructionObject o)
void setFillColor (ConstructionObject o)
void setLabelColor (ConstructionObject o)
void drawRect (double x, double y, double w, double h)
void drawLine (double x, double y, double x1, double y1, ConstructionObject o)
void drawLine (double x, double y, double x1, double y1)
void drawThickLine (double c1, double r1, double c2, double r2)
void drawThinLine (double c1, double r1, double c2, double r2)
void drawArc (double x, double y, double w, double h, double a, double b)
void drawThickArc (double x, double y, double w, double h, double a, double b)
void drawThinArc (double x, double y, double w, double h, double a, double b)
void drawArc (double x, double y, double w, double h, double a, double b, ConstructionObject o)
void drawString (String s, double x, double y)
void drawOval (double x, double y, double w, double h)
void drawThickOval (double x, double y, double w, double h)
void drawOval (double x, double y, double w, double h, ConstructionObject o)
void fillRect (double x, double y, double w, double h, boolean outline, boolean transparent, ConstructionObject o)
void fillArc (double x, double y, double w, double h, double a, double b, boolean outline, boolean transparent, boolean arc, ConstructionObject o)
void fillOval (double x, double y, double w, double h, boolean outline, boolean transparent, ConstructionObject o)
void fillPolygon (double x[], double y[], int n, boolean outline, boolean transparent, ConstructionObject o)
void drawImage (Image i, int x, int y, ImageObserver o)
void drawImage (Image i, int x, int y, int w, int h, ImageObserver o)
void close () throws IOException
void setDefaultFont (int h, boolean large, boolean bold)
void setFont (boolean large, boolean bold)
void setFont (int h, boolean bold)
FontMetrics getFontMetrics ()
void drawImage (Image i, double x, double y, double x1, double y1, double x2, double y2, ImageObserver o)
Graphics getGraphics ()
int stringWidth (String s)
int stringHeight (String s)
int drawStringExtended (String s, double x, double y)
int stringAscent (String s)
void setSize (double w, double h)
void drawCircleArc (double x, double y, double r, double a, double b, ConstructionObject o)
void drawCircle (double x, double y, double r, ConstructionObject o)

Static Public Attributes

static int MaxR = 1000000

Package Attributes

EPSGraphics G
double LineWidth = 1
int fsize
boolean flarge
boolean fbold
int ffactor = Global.getParameter("ffactor",130)
double W = 1000
double H = 1000

Detailed Description

Definition at line 11 of file MyGraphicsEPS.java.


Constructor & Destructor Documentation

rene.zirkel.graphics.MyGraphicsEPS.MyGraphicsEPS ( OutputStream  out,
int  w,
int  h 
) [inline]

Definition at line 16 of file MyGraphicsEPS.java.

       {      G=new EPSGraphics(out,w,h,EPSGraphics.PORTRAIT,true);
       }

Member Function Documentation

void rene.zirkel.graphics.MyGraphicsEPS.clearRect ( int  x,
int  y,
int  w,
int  h,
Color  c 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 25 of file MyGraphicsEPS.java.

       {      G.setColor(c);
              G.fillRect(x,y,w,h);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.close ( ) throws IOException [inline]

Definition at line 207 of file MyGraphicsEPS.java.

       {      G.close();
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawArc ( double  x,
double  y,
double  w,
double  h,
double  a,
double  b 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 103 of file MyGraphicsEPS.java.

       {      G.drawArc(x,y,w,h,a,b);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawArc ( double  x,
double  y,
double  w,
double  h,
double  a,
double  b,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 119 of file MyGraphicsEPS.java.

       {      if (o.getColorType()==ConstructionObject.THICK)
                     drawThickArc(x,y,w,h,a,b);
              else if (o.getColorType()==ConstructionObject.THIN)
                     drawThinArc(x,y,w,h,a,b);
              else
                     drawArc(x,y,w,h,a,b);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphics.drawCircle ( double  x,
double  y,
double  r,
ConstructionObject  o 
) [inline, inherited]

Reimplemented in rene.zirkel.graphics.MyGraphics13.

Definition at line 33 of file MyGraphics.java.

       {      drawOval(x-r,y-r,2*r,2*r,o);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphics.drawCircleArc ( double  x,
double  y,
double  r,
double  a,
double  b,
ConstructionObject  o 
) [inline, inherited]

Reimplemented in rene.zirkel.graphics.MyGraphics13.

Definition at line 25 of file MyGraphics.java.

       {      drawArc(x-r,y-r,2*r,2*r,a,b,o);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawImage ( Image  i,
int  x,
int  y,
ImageObserver  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 198 of file MyGraphicsEPS.java.

       {
       }      
void rene.zirkel.graphics.MyGraphicsEPS.drawImage ( Image  i,
int  x,
int  y,
int  w,
int  h,
ImageObserver  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 202 of file MyGraphicsEPS.java.

       {
       }      
void rene.zirkel.graphics.MyGraphicsEPS.drawImage ( Image  i,
double  x,
double  y,
double  x1,
double  y1,
double  x2,
double  y2,
ImageObserver  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 239 of file MyGraphicsEPS.java.

       {
       }
void rene.zirkel.graphics.MyGraphicsEPS.drawLine ( double  x,
double  y,
double  x1,
double  y1,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 78 of file MyGraphicsEPS.java.

       {      if (o.getColorType()==ConstructionObject.THICK)
                     drawThickLine(x,y,x1,y1);
              else if (o.getColorType()==ConstructionObject.THIN)
                     drawThinLine(x,y,x1,y1);
              else
                     drawLine(x,y,x1,y1);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawLine ( double  x,
double  y,
double  x1,
double  y1 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 87 of file MyGraphicsEPS.java.

       {      G.drawLine(x,y,x1,y1);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawOval ( double  x,
double  y,
double  w,
double  h 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 133 of file MyGraphicsEPS.java.

       {      if (w<MaxR) G.drawOval(x,y,w,h);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawOval ( double  x,
double  y,
double  w,
double  h,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 143 of file MyGraphicsEPS.java.

       {      setColor(o);
              if (o.getColorType()==ConstructionObject.THICK)
                     drawThickOval(x,y,w,h);
              else
                     drawOval(x,y,w,h);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawRect ( double  x,
double  y,
double  w,
double  h 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 74 of file MyGraphicsEPS.java.

       {      G.drawRect(x,y,w,h);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawString ( String  s,
double  x,
double  y 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 129 of file MyGraphicsEPS.java.

       {      G.drawString(s,x,y);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

int rene.zirkel.graphics.MyGraphicsEPS.drawStringExtended ( String  s,
double  x,
double  y 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 256 of file MyGraphicsEPS.java.

       {      drawString(s,x,y+getFontMetrics().getAscent());
              return getFontMetrics().getHeight(); 
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawThickArc ( double  x,
double  y,
double  w,
double  h,
double  a,
double  b 
) [inline]

Definition at line 107 of file MyGraphicsEPS.java.

       {      G.setLineWidth(3*LineWidth);
              drawArc(x+1,y+1,w-2,w-2,a,b);
              G.setLineWidth(LineWidth);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawThickLine ( double  c1,
double  r1,
double  c2,
double  r2 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 91 of file MyGraphicsEPS.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawThickOval ( double  x,
double  y,
double  w,
double  h 
) [inline]

Definition at line 137 of file MyGraphicsEPS.java.

       {      drawOval(x,y,w,h);
              drawOval(x-1,y-1,w+2,h+2);
              drawOval(x+1,y+1,w-2,h-2);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawThinArc ( double  x,
double  y,
double  w,
double  h,
double  a,
double  b 
) [inline]

Definition at line 113 of file MyGraphicsEPS.java.

       {      G.setDash(4,4);
              drawArc(x+1,y+1,w-2,w-2,a,b);
              G.clearDash();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.drawThinLine ( double  c1,
double  r1,
double  c2,
double  r2 
) [inline]

Definition at line 97 of file MyGraphicsEPS.java.

       {      G.setDash(4,4);
              G.drawLine(c1,r1,c2,r2);
              G.clearDash();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.fillArc ( double  x,
double  y,
double  w,
double  h,
double  a,
double  b,
boolean  outline,
boolean  transparent,
boolean  arc,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 162 of file MyGraphicsEPS.java.

       {      setFillColor(o);
              if (arc)
                     G.fillArc(x,y,w,h,a,b);
              else
                     G.fillChord(x,y,w,h,a,b);          
              if (outline)
              {      setColor(o);
                     G.drawArc(x,y,w,h,a,b);
              }
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.fillOval ( double  x,
double  y,
double  w,
double  h,
boolean  outline,
boolean  transparent,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 175 of file MyGraphicsEPS.java.

       {      if (w>=MaxR) return;
              setFillColor(o);
              G.fillOval(x,y,w,h);
              if (outline)
              {      setColor(o);
                     G.drawOval(x,y,w,h);
              }
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.fillPolygon ( double  x[],
double  y[],
int  n,
boolean  outline,
boolean  transparent,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 186 of file MyGraphicsEPS.java.

       {      if (o.getColorType()!=ConstructionObject.INVISIBLE)
              {      setFillColor(o);
                     G.fillPolygon(x,y,n);
              }
              if (outline)
              {      setColor(o);
                     G.drawPolygon(x,y,n);
              }
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.fillRect ( double  x,
double  y,
double  w,
double  h,
boolean  outline,
boolean  transparent,
ConstructionObject  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 152 of file MyGraphicsEPS.java.

       {      setFillColor(o);
              G.fillRect(x,y,w,h);
              if (outline)
              {      setColor(o);
                     G.drawRect(x,y,w,h);
              }
       }

Here is the call graph for this function:

FontMetrics rene.zirkel.graphics.MyGraphicsEPS.getFontMetrics ( ) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 235 of file MyGraphicsEPS.java.

       {      return G.getFontMetrics();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Graphics rene.zirkel.graphics.MyGraphicsEPS.getGraphics ( ) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 244 of file MyGraphicsEPS.java.

                                     {
              return null;
       }
void rene.zirkel.graphics.MyGraphicsEPS.setColor ( Color  c) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 30 of file MyGraphicsEPS.java.

       {      G.setColor(c);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 34 of file MyGraphicsEPS.java.

       {      if (o.isJobTarget()) setColor(ZirkelFrame.TargetColor);
              else if (o.selected()) setColor(ZirkelFrame.SelectColor);
              else if (o.getColorType()==ConstructionObject.THIN)
              {      int i=o.getColorIndex();
                     if (o.isHidden()) setColor(ZirkelFrame.BrighterLightColors[i]);
                     else setColor(ZirkelFrame.LightColors[i]);                     
              }             
              else
              {      int i=o.getColorIndex();
                     if (o.isHidden()) setColor(ZirkelFrame.BrighterColors[i]);
                     else setColor(ZirkelFrame.Colors[i]);                   
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.setDefaultFont ( int  h,
boolean  large,
boolean  bold 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 216 of file MyGraphicsEPS.java.

       {      fsize=h; flarge=large; fbold=bold;
              setFont(large,bold);
       }

Here is the call graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 49 of file MyGraphicsEPS.java.

       {      if (o.isJobTarget()) setColor(ZirkelFrame.TargetColor);
              else if (o.getColorType()!=ConstructionObject.THICK)
              {      int i=o.getColorIndex();
                     if (o.isHidden()) setColor(ZirkelFrame.BrighterLightColors[i]);
                     else setColor(ZirkelFrame.LightColors[i]);                     
              }             
              else
              {      int i=o.getColorIndex();
                     if (o.isHidden()) setColor(ZirkelFrame.BrighterColors[i]);
                     else setColor(ZirkelFrame.Colors[i]);                   
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.setFont ( boolean  large,
boolean  bold 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 221 of file MyGraphicsEPS.java.

       {      int size=fsize;
              if (large) size=size*ffactor/100;
              if (flarge) size=size*ffactor/100;
              setFont(size,bold || fbold);
       }

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsEPS.setFont ( int  h,
boolean  bold 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 228 of file MyGraphicsEPS.java.

       {      G.setFont(new Font(
                     Global.getParameter("font.name","dialog"),
                     bold?Font.BOLD:Font.PLAIN,
                     h));
       }

Here is the call graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 63 of file MyGraphicsEPS.java.

       {      if (o.labelSelected()) setColor(ZirkelFrame.SelectColor);
              else if (o.isFilled())
              {      int type=o.getColorType();
                     o.setColorType(ConstructionObject.NORMAL);
                     setColor(o);
                     o.setColorType(type);
              }
              else setColor(o);
       }

Here is the call graph for this function:

Definition at line 20 of file MyGraphicsEPS.java.

       {      LineWidth=w;
              G.setLineWidth(w);
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphics.setSize ( double  w,
double  h 
) [inline, inherited]

Definition at line 10 of file MyGraphics.java.

       {      W=w; H=h;
       } 
int rene.zirkel.graphics.MyGraphicsEPS.stringAscent ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 261 of file MyGraphicsEPS.java.

       {      return getFontMetrics().getAscent();
       }

Here is the call graph for this function:

int rene.zirkel.graphics.MyGraphicsEPS.stringHeight ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 252 of file MyGraphicsEPS.java.

       {      return getFontMetrics().getHeight();
       }

Here is the call graph for this function:

int rene.zirkel.graphics.MyGraphicsEPS.stringWidth ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 248 of file MyGraphicsEPS.java.

       {      return getFontMetrics().stringWidth(s);
       }

Here is the call graph for this function:


Member Data Documentation

Definition at line 213 of file MyGraphicsEPS.java.

Definition at line 214 of file MyGraphicsEPS.java.

Definition at line 213 of file MyGraphicsEPS.java.

Definition at line 212 of file MyGraphicsEPS.java.

Definition at line 12 of file MyGraphicsEPS.java.

double rene.zirkel.graphics.MyGraphics.H = 1000 [package, inherited]

Reimplemented in rene.zirkel.graphics.MyGraphicsPDF, and rene.zirkel.graphics.MyGraphicsSvg.

Definition at line 9 of file MyGraphics.java.

Definition at line 14 of file MyGraphicsEPS.java.

Definition at line 13 of file MyGraphicsEPS.java.

double rene.zirkel.graphics.MyGraphics.W = 1000 [package, inherited]

Reimplemented in rene.zirkel.graphics.MyGraphicsPDF, and rene.zirkel.graphics.MyGraphicsSvg.

Definition at line 9 of file MyGraphics.java.


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