Back to index

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

List of all members.

Public Member Functions

 MyGraphics11 (Graphics g)
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 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 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 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 drawImage (Image i, double x, double y, double x1, double y1, double x2, double y2, ImageObserver o)
void setFont (int h, boolean bold)
void setDefaultFont (int h, boolean large, boolean bold)
void setFont (boolean large, boolean bold)
Graphics getGraphics ()
int stringWidth (String s)
int stringHeight (String s)
int stringAscent (String s)
int drawStringExtended (String s, double x, double y)
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

Graphics G
int xx [] = new int[64]
int yy [] = new int[64]
FontStruct FS = new FontStruct()
int fsize
boolean flarge
boolean fbold
int ffactor = Global.getParameter("ffactor",130)
double W = 1000
double H = 1000

Static Package Attributes

static int px [] = new int[500]
static int py [] = new int[500]

Detailed Description

Definition at line 10 of file MyGraphics11.java.


Constructor & Destructor Documentation

Definition at line 14 of file MyGraphics11.java.

       {      G=g;
       }

Member Function Documentation

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 18 of file MyGraphics11.java.

       {      G.setColor(c);
              G.fillRect(x,y,w,h);
       }
void rene.zirkel.graphics.MyGraphics11.drawArc ( double  x,
double  y,
double  w,
double  h,
double  a,
double  b 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 92 of file MyGraphics11.java.

       {      int aa=(int)(a),bb=(int)(a+b+1);
              if (w<MaxR) G.drawArc((int)x,(int)y,(int)w,(int)h,aa,bb-aa);
              else if (b<1)
              {      double x1=x+w/2,y1=y+h/2,r=w/2,r2=h/2;
                     int ia=(int)(x1+Math.cos(a/180*Math.PI)*r),
                            ja=(int)(y1-Math.sin(a/180*Math.PI)*r2);
                     int ib=(int)(x1+Math.cos((a+b)/180*Math.PI)*r),
                            jb=(int)(y1-Math.sin((a+b)/180*Math.PI)*r2);
                     drawLine(ia,ja,ib,jb);
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

       {      if (o.getColorType()==ConstructionObject.THICK)
                     drawThickArc(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.MyGraphics11.drawImage ( Image  i,
int  x,
int  y,
ImageObserver  o 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 219 of file MyGraphics11.java.

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 223 of file MyGraphics11.java.

       {      G.drawImage(i,x,y,w,h,o);
       }      
void rene.zirkel.graphics.MyGraphics11.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 228 of file MyGraphics11.java.

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 73 of file MyGraphics11.java.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 80 of file MyGraphics11.java.

       {      G.drawLine((int)x,(int)y,(int)x1,(int)y1);
       }
void rene.zirkel.graphics.MyGraphics11.drawOval ( double  x,
double  y,
double  w,
double  h 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 127 of file MyGraphics11.java.

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

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 137 of file MyGraphics11.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.MyGraphics11.drawRect ( double  x,
double  y,
double  w,
double  h 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 69 of file MyGraphics11.java.

       {      G.drawRect((int)x,(int)y,(int)w,(int)h);
       }
void rene.zirkel.graphics.MyGraphics11.drawString ( String  s,
double  x,
double  y 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 123 of file MyGraphics11.java.

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

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 282 of file MyGraphics11.java.

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

Here is the call graph for this function:

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

Definition at line 105 of file MyGraphics11.java.

       {      drawArc(x-1,y-1,w+2,w+2,a,b);
              drawArc(x+1,y+1,w-2,w-2,a,b);
              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.MyGraphics11.drawThickLine ( double  c1,
double  r1,
double  c2,
double  r2 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 84 of file MyGraphics11.java.

       {      drawLine(c1+1,r1,c2+1,r2);
              drawLine(c1-1,r1,c2-1,r2);
              drawLine(c1,r1+1,c2,r2+1);
              drawLine(c1,r1-1,c2,r2-1);
              drawLine(c1,r1,c2,r2);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 131 of file MyGraphics11.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.MyGraphics11.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 158 of file MyGraphics11.java.

       {      int aa=(int)(a),bb=(int)(a+b+1);
              if (w>=MaxR) return;
              setFillColor(o);
              if (arc)
              {      G.fillArc((int)x,(int)y,(int)(w+1),(int)(h+1),aa,bb-aa);
              }
              else
              {      double t=a/180*Math.PI;
                     double a1=(a+b)/180*Math.PI;
                     x+=w/2; y+=w/2;
                     px[0]=(int)(x+w/2*Math.cos(t)); py[0]=(int)(y-h/2*Math.sin(t));
                     int i=1;
                     while (t<a1)
                     {      t+=2*Math.PI/490;
                            px[i]=(int)(x+w/2*Math.cos(t)); py[i]=(int)(y-h/2*Math.sin(t));
                            i++;
                            if (i>=499) break;
                     }
                     px[i]=(int)(x+w/2*Math.cos((a+b)/180*Math.PI));
                     py[i]=(int)(y-h/2*Math.sin((a+b)/180*Math.PI));
                     i++;
                     G.fillPolygon(px,py,i);
                     x-=w/2; y-=w/2;
              }
              if (outline)
              {      setColor(o);
                     G.drawArc((int)x,(int)y,(int)w,(int)h,aa,bb-aa);
              }
       }

Here is the call graph for this function:

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

       {      if (w>=MaxR) return;
              if (o.getColorType()!=ConstructionObject.INVISIBLE)
              {      setFillColor(o);
                     G.fillOval((int)x,(int)y,(int)(w+1),(int)(h+1));
              }
              if (outline)
              {      setColor(o);
                     G.drawOval((int)x,(int)y,(int)w,(int)h);
              }
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 205 of file MyGraphics11.java.

       {      setFillColor(o);
              for (int i=0; i<n; i++) xx[i]=(int)(x[i]);
              for (int i=0; i<n; i++) yy[i]=(int)(y[i]);
              if (o.getColorType()!=ConstructionObject.INVISIBLE)
              {      G.fillPolygon(xx,yy,n);
              }
              if (outline)
              {      setColor(o);
                     G.drawPolygon(xx,yy,n);
              }
       }

Here is the call graph for this function:

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

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

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 119 of file MyGraphics11.java.

       {      return G.getFontMetrics();
       }

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 266 of file MyGraphics11.java.

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 23 of file MyGraphics11.java.

       {      G.setColor(c);
       }

Here is the caller graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 27 of file MyGraphics11.java.

       {      if (o.isJobTarget()) setColor(ZirkelFrame.TargetColor);
              else if (o.indicated()) setColor(ZirkelFrame.IndicateColor);
              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.MyGraphics11.setDefaultFont ( int  h,
boolean  large,
boolean  bold 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 253 of file MyGraphics11.java.

       {      fsize=h; flarge=large; fbold=bold;
              ffactor=Global.getParameter("ffactor",130);
              setFont(large,bold);
       }

Here is the call graph for this function:

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 43 of file MyGraphics11.java.

       {      if (o.isJobTarget()) setColor(ZirkelFrame.TargetColor);
              else if ((o instanceof PointObject) && o.indicated()) setColor(ZirkelFrame.IndicateColor);
              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.MyGraphics11.setFont ( int  h,
boolean  bold 
) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 235 of file MyGraphics11.java.

       {      Font f=FS.getFont(h,bold);
              if (f!=null) G.setFont(f);
              else
              {      f=new Font(
                            Global.getParameter("font.name","dialog"),
                            bold?Font.BOLD:Font.PLAIN,
                            h);
                     FS.storeFont(h,bold,f);
                     G.setFont(f);
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 259 of file MyGraphics11.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 58 of file MyGraphics11.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:

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.MyGraphics11.stringAscent ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 278 of file MyGraphics11.java.

                                         {
              return 0;
       }
int rene.zirkel.graphics.MyGraphics11.stringHeight ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 274 of file MyGraphics11.java.

       {      return getFontMetrics().getHeight();
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 270 of file MyGraphics11.java.

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 250 of file MyGraphics11.java.

Definition at line 251 of file MyGraphics11.java.

Definition at line 250 of file MyGraphics11.java.

Definition at line 233 of file MyGraphics11.java.

Definition at line 249 of file MyGraphics11.java.

Definition at line 11 of file MyGraphics11.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 12 of file MyGraphics11.java.

int rene.zirkel.graphics.MyGraphics11.px[] = new int[500] [static, package]

Definition at line 156 of file MyGraphics11.java.

int rene.zirkel.graphics.MyGraphics11.py[] = new int[500] [static, package]

Definition at line 156 of file MyGraphics11.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.

int rene.zirkel.graphics.MyGraphics11.xx[] = new int[64] [package]

Definition at line 203 of file MyGraphics11.java.

int rene.zirkel.graphics.MyGraphics11.yy[] = new int[64] [package]

Definition at line 203 of file MyGraphics11.java.


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