Back to index

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

List of all members.

Public Member Functions

 MyGraphicsPDF (PrintWriter out, double w, double h, double linewidth)
void close ()
void appendln (String s)
void streamln (String s)
void appendxref (int offset, int number, boolean present)
String format (int n, int size)
void newObject ()
void endObject ()
double r (double x)
double ry (double y)
void setStroke (int stroke)
void clearRect (int x, int y, int w, int h, Color c)
void setColor (Color c)
void setColor (ConstructionObject o)
void setFillColor (Color c)
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 x, double y, double x1, double y1)
void drawArc (double x, double y, double r, double a, double b)
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)
void setFont (int size, boolean bold)
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 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 tranparent, 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 drawImage (Image i, int x, int y, ImageObserver o)
void drawImage (Image i, int x, int y, int w, int h, ImageObserver o)
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)

Static Public Member Functions

static void main (String args[])

Static Public Attributes

static char Translation []

Package Attributes

PrintWriter Out
StringBuffer buf
StringBuffer xref
StringBuffer stream
int nxref = 1
String prefix = ""
final int Normal = 0
final int Thin = 1
final int Thick = 2
int Stroke = Normal
boolean Bold
double W
double H
double LineWidth
Color OldColor = null
Color OldFillColor = null
int fsize
boolean flarge
boolean fbold
int ffactor = Global.getParameter("ffactor",130)

Private Attributes

PdfFontMetrics FM = new PdfFontMetrics(10)

Detailed Description

Definition at line 35 of file MyGraphicsPDF.java.


Constructor & Destructor Documentation

rene.zirkel.graphics.MyGraphicsPDF.MyGraphicsPDF ( PrintWriter  out,
double  w,
double  h,
double  linewidth 
) [inline]

Definition at line 47 of file MyGraphicsPDF.java.

       {      Out=out;
              LineWidth=linewidth;
              W=w; H=h;
              buf=new StringBuffer();
              xref=new StringBuffer();
              appendxref(0,65535,false);
              appendln("%PDF-1.4");
              newObject();
              appendln("<< /Type /Catalog");
              appendln("   /Outlines 2 0 R");
              appendln("   /Pages 3 0 R");
              appendln(">>" );
              endObject(); 
              newObject();
              appendln("<< /Type /Outlines");
              appendln("   /Count 0");
              appendln(">>");
              endObject();
              newObject();
              appendln("<< /Type /Pages");
              appendln("   /Kids [4 0 R]");
              appendln("   /Count 1");
              appendln(">>");
              endObject();
              newObject();
              appendln("<< /Type /Page");
              appendln("   /Parent 3 0 R");
              appendln("   /MediaBox [0 0 "+w+" "+h+"]");
              appendln("   /Contents 5 0 R");
              appendln("   /Resources << /ProcSet 6 0 R");
              appendln("                 /Font << /F1 7 0 R");
              appendln("                          /F2 7 0 R " +
                     "                                                       /F3 7 0 R >>");
              appendln("              >>");
              appendln(">>");
              endObject();         
              newObject();
              stream=new StringBuffer();
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

void rene.zirkel.graphics.MyGraphicsPDF.appendln ( String  s) [inline]

Definition at line 139 of file MyGraphicsPDF.java.

       {      buf.append(prefix+s);
              buf.append((char)13); buf.append((char)10);
       }

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsPDF.appendxref ( int  offset,
int  number,
boolean  present 
) [inline]

Definition at line 149 of file MyGraphicsPDF.java.

       {      xref.append(format(offset,10)+" "+format(number,5)+(present?" n":" f"));
              xref.append((char)13); xref.append((char)10);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 202 of file MyGraphicsPDF.java.

{}

Definition at line 88 of file MyGraphicsPDF.java.

       {      appendln("<< /Length "+stream.length()+" >>");
              prefix=""; appendln("stream");
              buf.append(stream.toString());
              appendln("endstream");
              endObject();
              newObject();
              appendln("[/PDF]");
              endObject();
              newObject();
              appendln("<< /Type /Font");
              appendln("   /Subtype /Type1");
              appendln("   /Name /F1");
              appendln("   /BaseFont /Helvetica");
              appendln("   /Encoding /WinAnsiEncoding");
              appendln(">>");
              endObject();
              newObject();
              appendln("<< /Type /Font");
              appendln("   /Subtype /Type1");
              appendln("   /Name /F2");
              appendln("   /BaseFont /Symbol");
              appendln("   /Encoding /WinAnsiEncoding");
              appendln(">>");
              endObject();
              newObject();
              appendln("<< /Type /Font");
              appendln("   /Subtype /Type1");
              appendln("   /Name /F3");
              appendln("   /BaseFont /Helvetica-Bold");
              appendln("   /Encoding /WinAnsiEncoding");
              appendln(">>");
              endObject();
              appendln("");
              appendln("xref");
              int xrefstart=buf.length();
              appendln(0+" "+nxref);
              buf.append(xref.toString());
              appendln("");
              appendln("trailer");
              appendln("<< /Size "+nxref);
              appendln("   /Root 1 0 R");
              appendln(">>");
              appendln("");
              appendln("startxref");
              appendln(""+xrefstart);
              appendln("");
              appendln("%%EOF");
              Out.write(buf.toString());  
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsPDF.drawArc ( double  x,
double  y,
double  r,
double  a,
double  b 
) [inline]

Definition at line 324 of file MyGraphicsPDF.java.

       {      double f=r/Math.cos(b/3);
              streamln(r(x+Math.cos(a+b/3)*f)+" "+ry(y-Math.sin(a+b/3)*f)+" "+
                     r(x+Math.cos(a+2*b/3)*f)+" "+ry(y-Math.sin(a+2*b/3)*f)+" "+
                     r(x+Math.cos(a+b)*r)+" "+ry(y-Math.sin(a+b)*r)+" c");                 
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 331 of file MyGraphicsPDF.java.

       {      setStroke(Normal);
              double r=w/2;
              x+=r; y+=r;
              a=a/180*Math.PI; b=b/180*Math.PI;
              int n=(int)(r*b/10);
              if (n<4) n=4;
              streamln(r(x+Math.cos(a)*r)+" "+ry(y-Math.sin(a)*r)+" m");
              for (int i=0; i<n; i++)
              {      drawArc(x,y,r,a+i*b/n,b/n);
              }
              streamln("S");
       }

Here is the call graph for this function:

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

       {      double r=w/2;
              x+=r; y+=r;
              a=a/180*Math.PI; b=b/180*Math.PI;
              int n=(int)(r*b/10);
              if (n<4) n=4;
              streamln(r(x+Math.cos(a)*r)+" "+ry(y+-Math.sin(a)*r)+" m");
              for (int i=0; i<n; i++)
              {      drawArc(x,y,r,a+i*b/n,b/n);
              }
              streamln("S");
       }

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 473 of file MyGraphicsPDF.java.

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 474 of file MyGraphicsPDF.java.

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

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 302 of file MyGraphicsPDF.java.

       {      streamln(r(x)+" "+ry(y)+" m");
              streamln(r(x1)+" "+ry(y1)+" l");
              streamln("S");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 309 of file MyGraphicsPDF.java.

       {      setStroke(Normal);
              streamln(r(x)+" "+ry(y)+" m");
              streamln(r(x1)+" "+ry(y1)+" l");
              streamln("S");
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 420 of file MyGraphicsPDF.java.

       {      drawArc(x,y,w,h,0,360);
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 424 of file MyGraphicsPDF.java.

       {      drawArc(x,y,w,h,0,360,o);
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 297 of file MyGraphicsPDF.java.

       {      streamln(r(x)+" "+ry(y+h)+" "+r(w)+" "+r(h)+" "+"re");
              streamln("S");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 370 of file MyGraphicsPDF.java.

       {      if (s.length()==1)
              {      char c=s.charAt(0);
                     for (int i=0; i<Translation.length/2; i++)
                     {      if (Translation[2*i+1]==c)
                            {      streamln("BT");
                                   streamln("/F2 "+FM.Size+" Tf");
                                   streamln(r(x)+" "+ry(y)+" Td");
                                   streamln("("+Translation[2*i]+") Tj");
                                   streamln("ET");
                                   return;
                            } 
                     }
              }
              streamln("BT");
              if (Bold) streamln("/F3 "+FM.Size+" Tf");
              else streamln("/F1 "+FM.Size+" Tf");
              streamln(r(x)+" "+ry(y)+" Td");
              streamln("("+s+") Tj");
              streamln("ET");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 534 of file MyGraphicsPDF.java.

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

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 316 of file MyGraphicsPDF.java.

       {      setStroke(Thick);
              streamln(r(x)+" "+ry(y)+" m");
              streamln(r(x1)+" "+ry(y1)+" l");
              streamln("S");
              setStroke(Normal);
       }

Here is the call graph for this function:

Definition at line 169 of file MyGraphicsPDF.java.

       {      prefix="";
              appendln("endobj");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

       {      setFillColor(o);
              if (outline) setColor(o);
              double r=w/2;
              x+=r; y+=r;
              a=a*Math.PI/180; b=b*Math.PI/180;
              int n=(int)(r*b/10);
              if (n<4) n=4;
              streamln(r(x+Math.cos(a)*r)+" "+ry(y-Math.sin(a)*r)+" m");
              for (int i=0; i<n; i++)
              {      drawArc(x,y,r,a+i*b/n,b/n);
              }
              if (arc)
              {      streamln(r(x)+" "+ry(y)+" l");
              }
              streamln(outline?"b":"f");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

       {      fillArc(x,y,w,h,0,360,outline,transparent,true,o);
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 442 of file MyGraphicsPDF.java.

       {      setFillColor(o);
              if (outline) setColor(o);
              streamln(r(x[0])+" "+ry(y[0])+" m");
              for (int i=1; i<n; i++)
              {      streamln(r(x[i])+" "+ry(y[i])+" l");
              }
              streamln(outline?"b*":"f*");
       }

Here is the call graph for this function:

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

       {      setFillColor(o);
              if (outline) setColor(o);
              streamln(r(x)+" "+ry(y+h)+" "+r(w)+" "+r(h)+" "+"re");
              streamln(outline?"b":"f");
       }

Here is the call graph for this function:

String rene.zirkel.graphics.MyGraphicsPDF.format ( int  n,
int  size 
) [inline]

Definition at line 154 of file MyGraphicsPDF.java.

       {      String s=""+n;
              while (s.length()<size) s="0"+s;
              return s;
       }

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 365 of file MyGraphicsPDF.java.

       {      if (FM==null) FM=new PdfFontMetrics(20); 
              return FM; 
       }

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 522 of file MyGraphicsPDF.java.

                                     {
              return null;
       }
static void rene.zirkel.graphics.MyGraphicsPDF.main ( String  args[]) [inline, static]

Definition at line 477 of file MyGraphicsPDF.java.

       {      try
              {      ConstructionObject o=new ConstructionObject(new Construction());
                     PrintWriter out=new PrintWriter(
                            new FileOutputStream("test.pdf"));
                     MyGraphicsPDF pdf=new MyGraphicsPDF(out,1000,1000,1);
                     pdf.streamln("1 0 0 -1 0 1000 cm");
                     pdf.drawRect(300,300,400,400);
                     for (int i=0; i<180; i++)
                     {      double s=i/180.0*Math.PI,t=(i+1)/180.0*Math.PI;
                            pdf.drawLine(500+Math.cos(s)*200,500+Math.sin(s)*200,
                                   500+Math.cos(s)*200,500+Math.sin(s)*200);
                     }
                     pdf.setColor(Color.red);
                     pdf.drawArc(-300,-300,1000,1000,0,360);
                     pdf.close();
                     out.close();
              }
              catch (Exception e)
              {      System.out.println(e);
              }
       }

Here is the call graph for this function:

Definition at line 160 of file MyGraphicsPDF.java.

       {      int n=buf.length();
              appendln("");
              appendln(nxref+" "+0+" obj");
              appendxref(n,0,true);
              nxref++;
              prefix="  ";
       }

Here is the call graph for this function:

Here is the caller graph for this function:

double rene.zirkel.graphics.MyGraphicsPDF.r ( double  x) [inline]

Definition at line 174 of file MyGraphicsPDF.java.

       {      return Math.round(x*100.0)/100.0;
       }

Here is the caller graph for this function:

double rene.zirkel.graphics.MyGraphicsPDF.ry ( double  y) [inline]

Definition at line 178 of file MyGraphicsPDF.java.

       {      return Math.round((H-y)*100.0)/100.0;
       }

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsPDF.setColor ( Color  c) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 206 of file MyGraphicsPDF.java.

       {      if (OldColor!=null && 
                     c.getRed()==OldColor.getRed() &&
                     c.getGreen()==OldColor.getGreen() &&
                     c.getBlue()==OldColor.getBlue()) return;
              streamln(
                     r(c.getRed()/255.0)+" "+
                     r(c.getGreen()/255.0)+" "+
                     r(c.getBlue()/255.0)+" rg");
              OldColor=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 218 of file MyGraphicsPDF.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]);                   
                     }
              }
              if (o.getColorType()==ConstructionObject.THIN)
              {      setStroke(Thin);
              }
              else if (o.getColorType()==ConstructionObject.THICK)
              {      setStroke(Thick);
              }
              else
              {      setStroke(Normal);
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 504 of file MyGraphicsPDF.java.

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

Here is the call graph for this function:

Definition at line 247 of file MyGraphicsPDF.java.

       {      if (OldFillColor!=null && 
                     c.getRed()==OldFillColor.getRed() &&
                     c.getGreen()==OldFillColor.getGreen() &&
                     c.getBlue()==OldFillColor.getBlue()) return;
              streamln(
                     r(c.getRed()/255.0)+" "+
                     r(c.getGreen()/255.0)+" "+
                     r(c.getBlue()/255.0)+" rg");
              OldFillColor=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 259 of file MyGraphicsPDF.java.

       {      setStroke(Normal);
              if (o.isJobTarget()) setColor(ZirkelFrame.TargetColor);
              else if ((o instanceof PointObject) && o.indicated())
                     setFillColor(ZirkelFrame.IndicateColor);
              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:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 359 of file MyGraphicsPDF.java.

       {      Bold=bold;
              FM=new PdfFontMetrics(size); 
              streamln("/F1 "+size+" Tf");
       }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 510 of file MyGraphicsPDF.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 278 of file MyGraphicsPDF.java.

       {      if (o.labelSelected()) setFillColor(ZirkelFrame.SelectColor);
              else if (o.isFilled())
              {      int type=o.getColorType();
                     o.setColorType(ConstructionObject.NORMAL);
                     int i=o.getColorIndex();
                     setFillColor(ZirkelFrame.Colors[i]);                    
                     o.setColorType(type);
              }
              else
              {      int type=o.getColorType();
                     o.setColorType(ConstructionObject.NORMAL);
                     int i=o.getColorIndex();
                     if (o.isHidden()) setFillColor(ZirkelFrame.BrighterColors[i]);
                     else setFillColor(ZirkelFrame.Colors[i]);               
                     o.setColorType(type);
              }
       }

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;
       } 
void rene.zirkel.graphics.MyGraphicsPDF.setStroke ( int  stroke) [inline]

Definition at line 182 of file MyGraphicsPDF.java.

       {      if (Stroke==stroke) return;
              Stroke=stroke;
              switch (Stroke)
              {      case Normal :
                            streamln(r(LineWidth)+" w"); 
                            streamln("[] 0 d");
                            break;
                     case Thick :
                            streamln(r(3*LineWidth)+" w"); 
                            streamln("[] 0 d");
                            break;
                     case Thin :
                            streamln(LineWidth+" w");
                            streamln("["+r(3*LineWidth)+" "+r(3*LineWidth)+"] 0 d");
                     break;
              }
       
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.zirkel.graphics.MyGraphicsPDF.streamln ( String  s) [inline]

Definition at line 144 of file MyGraphicsPDF.java.

       {      stream.append(prefix+s);
              stream.append((char)13); stream.append((char)10);
       }

Here is the caller graph for this function:

int rene.zirkel.graphics.MyGraphicsPDF.stringAscent ( String  s) [inline, virtual]

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 539 of file MyGraphicsPDF.java.

       {      return getFontMetrics().getAscent();
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 530 of file MyGraphicsPDF.java.

       {      return getFontMetrics().getHeight();
       }

Here is the call graph for this function:

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

Implements rene.zirkel.graphics.MyGraphics.

Definition at line 526 of file MyGraphicsPDF.java.

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 43 of file MyGraphicsPDF.java.

Definition at line 37 of file MyGraphicsPDF.java.

Definition at line 501 of file MyGraphicsPDF.java.

Definition at line 502 of file MyGraphicsPDF.java.

Definition at line 501 of file MyGraphicsPDF.java.

Definition at line 42 of file MyGraphicsPDF.java.

Definition at line 500 of file MyGraphicsPDF.java.

Reimplemented from rene.zirkel.graphics.MyGraphics.

Definition at line 44 of file MyGraphicsPDF.java.

Definition at line 45 of file MyGraphicsPDF.java.

Definition at line 40 of file MyGraphicsPDF.java.

Definition at line 38 of file MyGraphicsPDF.java.

Definition at line 204 of file MyGraphicsPDF.java.

Definition at line 245 of file MyGraphicsPDF.java.

Definition at line 36 of file MyGraphicsPDF.java.

Definition at line 39 of file MyGraphicsPDF.java.

Definition at line 37 of file MyGraphicsPDF.java.

Definition at line 41 of file MyGraphicsPDF.java.

Definition at line 40 of file MyGraphicsPDF.java.

final int rene.zirkel.graphics.MyGraphicsPDF.Thin = 1 [package]

Definition at line 40 of file MyGraphicsPDF.java.

Initial value:
       {      'a','\u03B1','A','\u0391',
              'b','\u03B2','B','\u0392',
              'c','\u03B3','C','\u0393',
              'd','\u03B4','D','\u0394',
              'e','\u03B5','E','\u0395',
              'f','\u03D5','F','\u03A6',
              'g','\u03B3','G','\u0393',
              'h','\u03B7','H','\u0397',
              'i','\u03B9','I','\u0399',
              'k','\u03BA','K','\u039A',
              'l','\u03BB','L','\u039B',
              'm','\u03BC','M','\u039C',
              'n','\u03BD','N','\u039D',
              'o','\u03BF','O','\u03A9',
              'p','\u03C0','P','\u03A0',
              'q','\u03C7','Q','\u03A7',
              'r','\u03C1','R','\u03A1',
              's','\u03C3','S','\u03A3',
              't','\u03C4','T','\u03A4',
              'u','\u03C5','U','\u03A5',
              'v','\u03C8','V','\u03A8',
              'w','\u03C9','W','\u03A9',
              'x','\u03BE','X','\u039E',
              'y','\u03C7','Y','\u03A7',
              'z','\u03B6','Z','\u0396',         
       }

Definition at line 392 of file MyGraphicsPDF.java.

Reimplemented from rene.zirkel.graphics.MyGraphics.

Definition at line 44 of file MyGraphicsPDF.java.

Definition at line 37 of file MyGraphicsPDF.java.


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