Back to index

wims  3.65+svn20090927
Public Member Functions | Package Functions | Package Attributes | Static Package Attributes
rene.zirkel.graphics.MyGraphicsFig Class Reference

This is the Graphics class, you need to implement. More...

Inheritance diagram for rene.zirkel.graphics.MyGraphicsFig:
Inheritance graph
[legend]
Collaboration diagram for rene.zirkel.graphics.MyGraphicsFig:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MyGraphicsFig (PrintWriter out, int w, int h)
void close ()
void setColor (Color c)
void setFillcolor (Color c)
void setColor (ConstructionObject o)
void setFillColor (ConstructionObject o)
void setLabelColor (ConstructionObject o)
void clearRect (int x, int y, int w, int h, Color c)
void drawRect (double x, double y, double w, double h)
void drawLine (double x, double y, double x1, double y1)
void drawThickLine (double x, double y, double x1, double y1)
void drawLine (double x, double y, double x1, double y1, ConstructionObject o)
void drawArc (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)
FontMetrics getFontMetrics ()
void drawString (String s, double x, double y)
void drawOval (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 setLayer (int n)
int pushLayer ()
void pushLayer (boolean flag)
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 setFont (int h, boolean bold)
void setDefaultFont (int h, boolean large, boolean bold)
void setFont (boolean large, boolean bold)
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)

Package Functions

String ColorString (Color c)
void append (String s)
void append (int n)
void append (double x)

Package Attributes

PrintWriter Out
int Stroke = STROKE_NORMAL
int Red
int Green
int Blue
MyFontMetrics MFM
int yoffset = 6000
String[] FigColorsArray
int FigLastcolor = 31
int FigColor = 0
int FigFillcolor = 0
int FigLinestyle = STYLE_NORMAL
int FigLayer = 10000
boolean PushLayer = true
int xfactor = 15
int yfactor = 15
StringBuffer FigFirstpart
StringBuffer FigLastpart
int fsize
boolean flarge
boolean fbold
int ffactor = Global.getParameter("ffactor",130)
double W = 1000
double H = 1000

Static Package Attributes

static final int STROKE_NORMAL = 1
static final int STROKE_THIN = 1
static final int STROKE_THICK = 2
static final int STYLE_NORMAL = 0
static final int STYLE_THIN = 1
static final int STYLE_THICK = 0

Detailed Description

This is the Graphics class, you need to implement.

Definition at line 38 of file MyGraphicsFig.java.


Constructor & Destructor Documentation

rene.zirkel.graphics.MyGraphicsFig.MyGraphicsFig ( PrintWriter  out,
int  w,
int  h 
) [inline]

Definition at line 59 of file MyGraphicsFig.java.

       {
              FigFirstpart=new StringBuffer(); 
              FigLastpart=new StringBuffer(); 
              //     FigFirstpart.append("#primera linea\n");
              //     FigFirstpart.append("#segona linea\n");
              FigFirstpart.append("#FIG 3.2\n"); 
              FigFirstpart.append("Landscape\n"); 
              FigFirstpart.append("Center\n"); 
              FigFirstpart.append("Metric\n"); 
              FigFirstpart.append("A4\n"); 
              FigFirstpart.append("100.00\n"); 
              FigFirstpart.append("Single\n"); 
              FigFirstpart.append("-2\n"); 
              FigFirstpart.append("1200 2\n"); 
              MFM=new MyFontMetrics(); 
              Out=out; 
              FigColorsArray=new String[543]; 
       }

Member Function Documentation

void rene.zirkel.graphics.MyGraphicsFig.append ( String  s) [inline, package]

Definition at line 587 of file MyGraphicsFig.java.

       {      FigLastpart.append(s);
       }

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsFig.append ( int  n) [inline, package]

Definition at line 590 of file MyGraphicsFig.java.

       {      FigLastpart.append(""+n);
       }
void rene.zirkel.graphics.MyGraphicsFig.append ( double  x) [inline, package]

Definition at line 593 of file MyGraphicsFig.java.

       {      FigLastpart.append(""+((int)x));
       }
void rene.zirkel.graphics.MyGraphicsFig.clearRect ( int  x,
int  y,
int  w,
int  h,
Color  c 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 225 of file MyGraphicsFig.java.

{}

Definition at line 79 of file MyGraphicsFig.java.

       {
              append("#End\n"); 
              Out.print(FigFirstpart); 
              Out.print(FigLastpart); 
       }

Here is the call graph for this function:

String rene.zirkel.graphics.MyGraphicsFig.ColorString ( Color  c) [inline, package]

Definition at line 86 of file MyGraphicsFig.java.

       {
              int r,g,b; 
              String str,stg,stb,coded="#"; 
              str=Integer.toHexString(c.getRed()); 
              if (str.length()==1) {
                     str="0"+str; 
              }
              stg=Integer.toHexString(c.getGreen()); 
              if (stg.length()==1) {
                     stg="0"+stg; 
              }
              stb=Integer.toHexString(c.getBlue()); 
              if (stb.length()==1) {
                     stb="0"+stb; 
              }
              //     coded.concat(str);//.concat(stg).concat(stb);
              coded+=str; 
              coded+=stg; 
              coded+=stb; 
              //     append(coded);
              return coded; 
       }

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 316 of file MyGraphicsFig.java.

       {
              append("# drawArc"); 
              append("\n"); 
              int x1,x2,x3,y1,y2,y3; 
              double cx,cy,rx,ry,arad,brad; 
              rx=(double)(w)/2; 
              ry=(double)(h)/2; 
              cx=x+rx; 
              cy=y+ry; 
              arad=a*Math.PI/180.0; 
              brad=b*Math.PI/180.0; 
              x1=(int)(cx+rx*Math.cos(arad)); 
              y1=(int)(cy+ry*Math.sin(arad)); 
              x2=(int)(cx+rx*Math.cos(arad+brad/2)); 
              y2=(int)(cy+ry*Math.sin(arad+brad/2)); 
              x3=(int)(cx+rx*Math.cos(arad+brad)); 
              y3=(int)(cy+ry*Math.sin(arad+brad)); 
              append("5 1 "); 
              append(FigLinestyle); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 0 1 0 0 "); 
              append(xfactor*cx); append(" "); 
              append(yfactor*cy); append(" "); 
              append(xfactor*x1); append(" "); 
              append(yfactor*y1); append(" "); 
              append(xfactor*x2); append(" "); 
              append(yfactor*y2); append(" "); 
              append(xfactor*x3); append(" "); 
              append(yfactor*y3); 
              append("\n"); 
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsFig.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 352 of file MyGraphicsFig.java.

       {
              append("# drawArc ConstructionObject"); 
              append("\n"); 
              int x1,x2,x3,y1,y2,y3; 
              double cx,cy,rx,ry,arad,brad; 
              rx=(double)(w)/2; 
              ry=(double)(h)/2; 
              cx=x+rx; 
              cy=y+ry; 
              arad=a*Math.PI/180.0; 
              brad=b*Math.PI/180.0; 
              x1=(int)(cx+rx*Math.cos(arad)); 
              y1=(int)(cy-ry*Math.sin(arad)); 
              x2=(int)(cx+rx*Math.cos(arad+brad/2)); 
              y2=(int)(cy-ry*Math.sin(arad+brad/2)); 
              x3=(int)(cx+rx*Math.cos(arad+brad)); 
              y3=(int)(cy-ry*Math.sin(arad+brad)); 
              append("5 1 "); 
              append(FigLinestyle); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigColor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 0 1 0 0 "); 
              //     append("5 1 0 1 0 7 50 0 -1 0.000 0 1 0 0 ");
              append(xfactor*cx); append(" "); 
              append(yfactor*cy); append(" "); 
              append(xfactor*x1); append(" "); 
              append(yfactor*y1); append(" "); 
              append(xfactor*x2); append(" "); 
              append(yfactor*y2); append(" "); 
              append(xfactor*x3); append(" "); 
              append(yfactor*y3); 
              append("\n"); 
       }

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.MyGraphicsFig.drawImage ( Image  i,
int  x,
int  y,
ImageObserver  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 606 of file MyGraphicsFig.java.

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 609 of file MyGraphicsFig.java.

       {
       }
void rene.zirkel.graphics.MyGraphicsFig.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 633 of file MyGraphicsFig.java.

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 253 of file MyGraphicsFig.java.

       {
              append("# drawLine"); 
              append("\n"); 
              append("2 1 "); 
              //     append(FigLinestyle);append(" ");
              append(0); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 0 0 -1 0 0 2"); 
              append("\n"); 
              //     append("2 2 0 1 0 1 50 0 20 0.000 0 0 -1 0 0 2");
              append(xfactor*x); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*x1); append(" "); 
              append(yfactor*y1); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 295 of file MyGraphicsFig.java.

       {
              append("# drawLine ConstructionObject"); 
              append("\n"); 
              append("2 1 "); 
              append(FigLinestyle); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 0 0 -1 0 0 2"); 
              append("\n"); 
              //     append("2 1 0 1 0 1 50 0 -1 0.000 0 0 -1 0 0 2");
              append(xfactor*x); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*x1); append(" "); 
              append(yfactor*y1); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 409 of file MyGraphicsFig.java.

       {
              double cx,cy,rx,ry; 
              rx=(double)(w)/2; 
              ry=(double)(h)/2; 
              cx=x+rx; 
              cy=y+ry; 
              append("#drawOval"); 
              append("\n"); 
              append("1 1 "); 
              append(0); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 1 0.000 "); 
              append((int)(xfactor*cx)); append(" "); 
              append((int)(yfactor*cy)); append(" "); 
              append((int)(xfactor*rx)); append(" "); 
              append((int)(yfactor*ry)); append(" "); 
              append("0 0 0 0"); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 433 of file MyGraphicsFig.java.

       {
              double cx,cy,rx,ry; 
              rx=(double)(w)/2; 
              ry=(double)(h)/2; 
              cx=x+rx; 
              cy=y+ry; 
              append("#drawOval ConstructionObject"); 
              append("\n"); 
              append("1 1 "); 
              append(FigLinestyle); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 1 0.000 "); 
              append((int)(xfactor*cx)); append(" "); 
              append((int)(yfactor*cy)); append(" "); 
              append((int)(xfactor*rx)); append(" "); 
              append((int)(yfactor*ry)); append(" "); 
              append("0 0 0 0"); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 227 of file MyGraphicsFig.java.

       {
              append("# drawRect"); 
              append("\n"); 
              append("2 2 "); 
              //     append(FigLinestyle);append(" ");
              append(0); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 0 0 -1 0 0 5"); 
              append("\n"); 
              append(xfactor*x); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*(x+w)-1); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*(x+w)-1); append(" "); 
              append((yfactor*(y+h)-1)); append(" "); 
              append(xfactor*x); append(" "); 
              append((yfactor*(y+h)-1)); append(" "); 
              append(xfactor*x); append(" "); 
              append(yfactor*y); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 394 of file MyGraphicsFig.java.

       {
              append("#drawString"); 
              append("\n"); 
              append("4 0 "); 
              append(FigColor); append(" "); 
              append(pushLayer()); 
              append(" 0 4 12 0.000 2 0 0 "); 
              append(xfactor*x); append(" "); 
              append(yfactor*(y+10)); append(" "); 
              append(s); 
              append("\\001"); 
              append("\n"); 
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 650 of file MyGraphicsFig.java.

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

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 274 of file MyGraphicsFig.java.

       {
              append("# drawThickLine"); 
              append("\n"); 
              append("2 1 "); 
              //     append(FigLinestyle);append(" ");
              append(0); append(" "); 
              append(STROKE_THICK); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              append(" 0 -1 0.000 0 0 -1 0 0 2"); 
              append("\n"); 
              //     append("2 2 0 1 0 1 50 0 20 0.000 0 0 -1 0 0 2");
              append(xfactor*x); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*x1); append(" "); 
              append(yfactor*y1); 
              append("\n"); 
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsFig.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 488 of file MyGraphicsFig.java.

       {
              setColor(o);
              setFillColor(o);
              append("#fillArc2"); 
              append("\n"); 
              int x1,x2,x3,y1,y2,y3; 
              double cx,cy,rx,ry,arad,brad; 
              rx=(double)(w-1)/2; 
              ry=(double)(h-1)/2; 
              cx=x+rx; 
              cy=y+ry; 
              arad=a*Math.PI/180.0; 
              brad=b*Math.PI/180.0; 
              x1=(int)(cx+rx*Math.cos(arad)); 
              y1=(int)(cy-ry*Math.sin(arad)); 
              x2=(int)(cx+rx*Math.cos(arad+brad/2)); 
              y2=(int)(cy-ry*Math.sin(arad+brad/2)); 
              x3=(int)(cx+rx*Math.cos(arad+brad)); 
              y3=(int)(cy-ry*Math.sin(arad+brad)); 
              append("5 2 "); 
              append(outline?FigLinestyle:STYLE_NORMAL); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              if (transparent) append(" 0 20 0.000 0 1 0 0 "); 
              else append(" 0 30 0.000 0 1 0 0 "); 
              append(xfactor*cx); append(" "); 
              append(yfactor*cy); append(" "); 
              append(xfactor*x1); append(" "); 
              append(yfactor*y1); append(" "); 
              append(xfactor*x2); append(" "); 
              append(yfactor*y2); append(" "); 
              append(xfactor*x3); append(" "); 
              append(yfactor*y3); 
              append("\n"); 
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsFig.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 528 of file MyGraphicsFig.java.

       {
              setColor(o);
              setFillColor(o);
              append("#fillOval"); 
              append("\n"); 
              double cx,cy,rx,ry; 
              rx=(double)(w-1)/2; 
              ry=(double)(h-1)/2; 
              cx=x+rx; 
              cy=y+ry; 
              append("1 1 "); 
              append(outline?FigLinestyle:STYLE_NORMAL); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              if (transparent) append(" 0 20 0.000 1 0.000 "); 
              else append(" 0 30 0.000 1 0.000 "); 
              append((int)(xfactor*cx)); append(" "); 
              append((int)(yfactor*cy)); append(" "); 
              append((int)(xfactor*rx)); append(" "); 
              append((int)(yfactor*ry)); append(" "); 
              append("0 0 0 0"); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 556 of file MyGraphicsFig.java.

       {
              setColor(o);
              setFillColor(o);
              append("#fillPolygon"); 
              append("\n"); 
              append("2 1 "); 
              append(outline?FigLinestyle:STYLE_NORMAL);
                     append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              if (transparent) append(" 0 20 0.000 0 0 -1 0 0 "); 
              else append(" 0 30 0.000 0 0 -1 0 0 "); 
              append(n+1); 
              append("\n"); 
              for (int i=0; i < n; i++) {
                     append(xfactor*x[i]); append(" "); 
                     append(yfactor*y[i]); append(" "); 
              }
              append(xfactor*x[0]); append(" "); 
              append(yfactor*y[0]); append(" "); 
              append("\n"); 
       }

Here is the call graph for this function:

void rene.zirkel.graphics.MyGraphicsFig.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 459 of file MyGraphicsFig.java.

       {      
              setColor(o);
              setFillColor(o);
              append("# fillRect"); 
              append("\n"); 
              append("2 2 "); 
              append(outline?FigLinestyle:STYLE_NORMAL); append(" "); 
              append(Stroke); append(" "); 
              append(FigColor); append(" "); 
              append(FigFillcolor); append(" "); 
              append(pushLayer()); 
              if (transparent) append(" 0 20 0.000 0 0 -1 0 0 5"); 
              else append(" 0 30 0.000 0 0 -1 0 0 5"); 
              append("\n"); 
              append(xfactor*x); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*(x+w)-1); append(" "); 
              append(yfactor*y); append(" "); 
              append(xfactor*(x+w)-1); append(" "); 
              append(yfactor*(y+h)-1); append(" "); 
              append(xfactor*x); append(" "); 
              append(yfactor*(y+h)-1); append(" "); 
              append(xfactor*x); append(" "); 
              append(yfactor*y); 
              append("\n"); 
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 390 of file MyGraphicsFig.java.

       {      return MFM; 
       }

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 638 of file MyGraphicsFig.java.

                                     {
              return null;
       }

Definition at line 597 of file MyGraphicsFig.java.

       {      if (PushLayer) FigLayer--;
              return FigLayer;
       }

Here is the caller graph for this function:

Definition at line 602 of file MyGraphicsFig.java.

       {      PushLayer=flag;
       }
void rene.zirkel.graphics.MyGraphicsFig.setColor ( Color  c) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 111 of file MyGraphicsFig.java.

       {
              String codedcolor=ColorString(c); 
              boolean newcolor=true; 
              for (int i=32; i<= FigLastcolor; i++) {
                     if (codedcolor.equals(FigColorsArray[i])) {
                            FigColor=i; 
                            newcolor=false; 
                            break; 
                     }
              }
              if (newcolor) {
                     FigLastcolor+=1; 
                     FigColor=FigLastcolor; 
                     FigColorsArray[FigLastcolor]=codedcolor; 
                     FigFirstpart.append("0 "); 
                     //         Out.print("0 ");
                     FigFirstpart.append(FigLastcolor); 
                     FigFirstpart.append(" "); 
                     //         Out.print(FigLastcolor);Out.print(" ");
                     FigFirstpart.append(codedcolor); 
                     FigFirstpart.append("\n"); 
                     //         Out.println(codedcolor);
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 165 of file MyGraphicsFig.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]); 
                     }
                     if (o.getColorType()==ConstructionObject.THIN)
                     {
                            Stroke=STROKE_THIN; 
                            FigLinestyle=STYLE_THIN; 
                     }
                     else if (o.getColorType()==ConstructionObject.THICK)
                     {
                            Stroke=STROKE_THICK; 
                            FigLinestyle=STYLE_THICK; 
                     }
                     else
                     {
                            Stroke=STROKE_NORMAL; 
                            FigLinestyle=STYLE_NORMAL; 
                     }
              }
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 621 of file MyGraphicsFig.java.

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

Here is the call graph for this function:

Definition at line 137 of file MyGraphicsFig.java.

       {
              String codedcolor=ColorString(c); 
              boolean newcolor=true; 
              for (int i=32; i<= FigLastcolor; i++) {
                     if (codedcolor.equals(FigColorsArray[i])) {
                            FigFillcolor=i; 
                            newcolor=false; 
                            break; 
                     }
              }
              if (newcolor) {
                     FigLastcolor+=1; 
                     FigFillcolor=FigLastcolor; 
                     FigColorsArray[FigLastcolor]=codedcolor; 
                     FigFirstpart.append("0 "); 
                     //         Out.print("0 ");
                     FigFirstpart.append(FigLastcolor); 
                     FigFirstpart.append(" "); 
                     //         Out.print(FigLastcolor);Out.print(" ");
                     FigFirstpart.append(codedcolor); 
                     FigFirstpart.append("\n"); 
                     //         Out.println(codedcolor);
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 198 of file MyGraphicsFig.java.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 613 of file MyGraphicsFig.java.

       {
       }

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 626 of file MyGraphicsFig.java.

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

Here is the call graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 214 of file MyGraphicsFig.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 583 of file MyGraphicsFig.java.

       {      FigLayer=n; 
       }
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.MyGraphicsFig.stringAscent ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 655 of file MyGraphicsFig.java.

       {      return getFontMetrics().getAscent();
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 646 of file MyGraphicsFig.java.

       {      return getFontMetrics().getHeight();
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 642 of file MyGraphicsFig.java.

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 44 of file MyGraphicsFig.java.

Definition at line 618 of file MyGraphicsFig.java.

Definition at line 619 of file MyGraphicsFig.java.

Definition at line 49 of file MyGraphicsFig.java.

Definition at line 47 of file MyGraphicsFig.java.

Definition at line 50 of file MyGraphicsFig.java.

Definition at line 56 of file MyGraphicsFig.java.

Definition at line 48 of file MyGraphicsFig.java.

Definition at line 57 of file MyGraphicsFig.java.

Definition at line 52 of file MyGraphicsFig.java.

Definition at line 51 of file MyGraphicsFig.java.

Definition at line 618 of file MyGraphicsFig.java.

Definition at line 617 of file MyGraphicsFig.java.

Definition at line 44 of file MyGraphicsFig.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 45 of file MyGraphicsFig.java.

Definition at line 40 of file MyGraphicsFig.java.

Definition at line 53 of file MyGraphicsFig.java.

Definition at line 44 of file MyGraphicsFig.java.

Definition at line 43 of file MyGraphicsFig.java.

final int rene.zirkel.graphics.MyGraphicsFig.STROKE_NORMAL = 1 [static, package]

Definition at line 41 of file MyGraphicsFig.java.

final int rene.zirkel.graphics.MyGraphicsFig.STROKE_THICK = 2 [static, package]

Definition at line 41 of file MyGraphicsFig.java.

final int rene.zirkel.graphics.MyGraphicsFig.STROKE_THIN = 1 [static, package]

Definition at line 41 of file MyGraphicsFig.java.

final int rene.zirkel.graphics.MyGraphicsFig.STYLE_NORMAL = 0 [static, package]

Definition at line 42 of file MyGraphicsFig.java.

final int rene.zirkel.graphics.MyGraphicsFig.STYLE_THICK = 0 [static, package]

Definition at line 42 of file MyGraphicsFig.java.

final int rene.zirkel.graphics.MyGraphicsFig.STYLE_THIN = 1 [static, package]

Definition at line 42 of file MyGraphicsFig.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.

Definition at line 54 of file MyGraphicsFig.java.

Definition at line 55 of file MyGraphicsFig.java.

Definition at line 46 of file MyGraphicsFig.java.


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