Class SwingTGraphics

java.lang.Object
com.treemap.crossplatform.AbstractTGraphics<Color,Font>
com.treemap.swing.crossplatform.SwingTGraphics
All Implemented Interfaces:
TGraphics<Color,Font>

public class SwingTGraphics extends AbstractTGraphics<Color,Font>
ToDo: <Color,Font,Shape,Image>
  • Field Details

  • Constructor Details

    • SwingTGraphics

      public SwingTGraphics(Graphics2D gc)
  • Method Details

    • getColorFactory

      public com.macrofocus.igraphics.CPColorFactory<Color> getColorFactory()
    • paintLabel

      public void paintLabel(com.macrofocus.labeling.EnhancedLabel<Color,Font> l, int x, int y, int w, int h)
    • sizeLabel

      public PreferredSize sizeLabel(com.macrofocus.labeling.EnhancedLabel<Color,Font> l, int w, int h)
    • save

      public void save()
    • restore

      public void restore()
    • draw3DRect

      public void draw3DRect(int x, int y, int width, int height, boolean raised)
    • fill3DRect

      public void fill3DRect(int x, int y, int width, int height, boolean raised)
    • stroke

      public void stroke(com.macrofocus.geom.Shape s)
    • fillText

      public void fillText(String str, int x, int y)
    • fillText

      public void fillText(String str, float x, float y)
    • fill

      public void fill(com.macrofocus.geom.Shape s)
    • setPaint

      public void setPaint(Paint paint)
    • setLineWidth

      public void setLineWidth(double lw)
    • setLineDash

      public void setLineDash(double[] dashPattern)
    • isInterpolationBilinear

      public boolean isInterpolationBilinear()
    • setInterpolationBilinear

      public void setInterpolationBilinear(boolean bilinear)
    • isAntialias

      public boolean isAntialias()
    • setAntialias

      public void setAntialias(boolean antialias)
    • isTextAntialias

      public boolean isTextAntialias()
    • setTextAntialias

      public void setTextAntialias(boolean antialias)
    • translate

      public void translate(int x, int y)
    • translate

      public void translate(double tx, double ty)
    • rotate

      public void rotate(double theta)
    • rotate

      public void rotate(double theta, double x, double y)
    • scale

      public void scale(double sx, double sy)
    • shear

      public void shear(double shx, double shy)
    • transform

      public void transform(com.macrofocus.geom.AffineTransform Tx)
    • setTransform

      public void setTransform(com.macrofocus.geom.AffineTransform Tx)
    • getTransform

      public com.macrofocus.geom.AffineTransform getTransform()
    • setGlobalAlpha

      public void setGlobalAlpha(double alpha)
    • setBackground

      public void setBackground(com.macrofocus.igraphics.CPColor<Color> color)
    • getBackground

      public Color getBackground()
    • clip

      public void clip(com.macrofocus.geom.Shape s)
    • setFill

      public void setFill(com.macrofocus.igraphics.CPColor<Color> c)
    • setStroke

      public void setStroke(com.macrofocus.igraphics.CPColor<Color> c)
    • setColor

      public void setColor(com.macrofocus.igraphics.CPColor<Color> c)
    • setRadialGradient

      public void setRadialGradient()
    • isPaintingForPrint

      public boolean isPaintingForPrint()
    • setPaintingForPrint

      public void setPaintingForPrint(boolean paintingForPrint)
    • getNativeGraphics

      public Object getNativeGraphics()
    • getIGraphics

      public com.macrofocus.igraphics.IGraphics<Color,Font> getIGraphics()
    • getFont

      public Font getFont()
    • setFont

      public void setFont(Font font)
    • getStringWidth

      public double getStringWidth(String text)
    • strokeLine

      public void strokeLine(int x1, int y1, int x2, int y2)
    • fillRect

      public void fillRect(int x, int y, int width, int height)
    • drawRect

      public void drawRect(int x, int y, int width, int height)
    • clearRect

      public void clearRect(int x, int y, int width, int height)
    • strokeRect

      public void strokeRect(double x, double y, double width, double height)
    • fillRect

      public void fillRect(double x, double y, double width, double height)
    • strokeRoundRect

      public void strokeRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
    • fillRoundRect

      public void fillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
    • drawOval

      public void drawOval(int x, int y, int width, int height)
    • fillOval

      public void fillOval(int x, int y, int width, int height)
    • drawArc

      public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
    • fillArc

      public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
    • drawPolyline

      public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
    • drawPolygon

      public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
    • drawPolygon

      public void drawPolygon(com.macrofocus.geom.Polygon p)
    • fillPolygon

      public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
    • fillPolygon

      public void fillPolygon(com.macrofocus.geom.Polygon p)
    • createImage

      public BufferedImage createImage(int width, int height)
    • drawNativeImage

      public boolean drawNativeImage(Image img, int x, int y)
    • drawImage

      public boolean drawImage(com.macrofocus.igraphics.CPImage img, int x, int y)
    • drawImage

      public boolean drawImage(com.macrofocus.igraphics.CPImage img, int x, int y, int width, int height)
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getClipRect

      @Deprecated public com.macrofocus.geom.Rectangle getClipRect()
      Deprecated.
    • hitClip

      public boolean hitClip(int x, int y, int width, int height)
    • getClipBounds

      public com.macrofocus.geom.Rectangle getClipBounds(com.macrofocus.geom.Rectangle r)
    • drawClippedImage

      public boolean drawClippedImage(com.macrofocus.igraphics.CPImage img, int x, int y, int w, int h, int width, int height, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)
      Specified by:
      drawClippedImage in interface TGraphics<Color,Font>
      Overrides:
      drawClippedImage in class AbstractTGraphics<Color,Font>
    • softClip

      public void softClip(com.macrofocus.geom.Shape shape)
      Specified by:
      softClip in interface TGraphics<Color,Font>
      Overrides:
      softClip in class AbstractTGraphics<Color,Font>
    • hitClip

      public boolean hitClip(com.macrofocus.geom.Rectangle bounds)
      Specified by:
      hitClip in interface TGraphics<Color,Font>
      Overrides:
      hitClip in class AbstractTGraphics<Color,Font>