Class JavaFXTGraphics

  • All Implemented Interfaces:
    TGraphics<javafx.scene.paint.Color,​javafx.scene.text.Font>

    public class JavaFXTGraphics
    extends AbstractTGraphics<javafx.scene.paint.Color,​javafx.scene.text.Font>
    Created by luc on 25.04.17.
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaFXTGraphics​(javafx.scene.canvas.GraphicsContext gc)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.scene.paint.Color awtColorToJavaFX​(java.awt.Color c)  
      javafx.scene.shape.StrokeLineCap awtToJavaFXLineCap​(int c)  
      javafx.scene.shape.StrokeLineJoin awtToJavaFXLineJoin​(int j)  
      void clearRect​(int x, int y, int width, int height)  
      void clip​(com.macrofocus.geom.Shape s)  
      java.awt.image.BufferedImage createImage​(int width, int height)  
      com.macrofocus.geom.GeneralPath createPolygon​(int[] xPoints, int[] yPoints, int nPoints, boolean close)  
      void drawArc​(int x, int y, int width, int height, int startAngle, int arcAngle)  
      boolean drawImage​(com.macrofocus.igraphics.CPImage image, int x, int y)  
      boolean drawImage​(com.macrofocus.igraphics.CPImage image, int x, int y, int w, int h)  
      boolean drawNativeImage​(java.awt.Image img, int x, int y)  
      void drawOval​(int x, int y, int width, int height)  
      void drawPolygon​(int[] xPoints, int[] yPoints, int nPoints)  
      void drawPolyline​(int[] xPoints, int[] yPoints, int nPoints)  
      void fill​(com.macrofocus.geom.Shape s)  
      void fillArc​(int x, int y, int width, int height, int startAngle, int arcAngle)  
      void fillOval​(int x, int y, int width, int height)  
      void fillPolygon​(int[] xPoints, int[] yPoints, int nPoints)  
      void fillRect​(double x, double y, double width, double height)  
      void fillRect​(int x, int y, int width, int height)  
      void fillRoundRect​(double x, double y, double width, double height, double arcWidth, double arcHeight)  
      void fillText​(java.lang.String str, float x, float y)  
      void fillText​(java.lang.String str, int x, int y)  
      double[] floatToDoubleArray​(float[] f)  
      javafx.scene.paint.Color getBackground()  
      com.macrofocus.igraphics.CPColorFactory<javafx.scene.paint.Color> getColorFactory()  
      javafx.scene.text.Font getFont()  
      com.macrofocus.igraphics.IGraphics<javafx.scene.paint.Color,​javafx.scene.text.Font> getIGraphics()  
      java.lang.Object getNativeGraphics()  
      com.macrofocus.geom.Rectangle2D getStringBounds​(java.lang.String text)  
      double getStringWidth​(java.lang.String text)  
      com.macrofocus.geom.AffineTransform getTransform()  
      javafx.scene.shape.ArcType intToArcType​(int t)  
      boolean isAntialias()  
      boolean isInterpolationBilinear()  
      boolean isPaintingForPrint()  
      boolean isTextAntialias()  
      void paintLabel​(com.macrofocus.labeling.EnhancedLabel<javafx.scene.paint.Color,​javafx.scene.text.Font> l, int x, int y, int w, int h)  
      void restore()  
      void rotate​(double theta)  
      void rotate​(double theta, double x, double y)  
      void save()  
      void scale​(double sx, double sy)  
      void setAntialias​(boolean antialias)  
      void setBackground​(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> color)  
      void setColor​(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)  
      void setFill​(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)  
      void setFont​(javafx.scene.text.Font font)  
      void setGlobalAlpha​(double alpha)  
      void setInterpolationBilinear​(boolean bilinear)  
      void setLineDash​(double[] dashPattern)  
      void setLineWidth​(double lw)  
      void setPaint​(java.awt.Paint paint)  
      void setPaintingForPrint​(boolean paintingForPrint)  
      void setRadialGradient()  
      void setStroke​(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)  
      void setTextAntialias​(boolean antialias)  
      void setTransform​(com.macrofocus.geom.AffineTransform t)  
      void shapeToPath​(com.macrofocus.geom.Shape s)  
      void shear​(double shx, double shy)  
      PreferredSize sizeLabel​(com.macrofocus.labeling.EnhancedLabel<javafx.scene.paint.Color,​javafx.scene.text.Font> l, int w, int h)  
      void stroke​(com.macrofocus.geom.Shape s)  
      void strokeLine​(int x1, int y1, int x2, int y2)  
      void strokeRect​(double x, double y, double width, double height)  
      void strokeRoundRect​(double x, double y, double width, double height, double arcWidth, double arcHeight)  
      void transform​(com.macrofocus.geom.AffineTransform t)  
      void translate​(double tx, double ty)  
      void translate​(int tx, int ty)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaFXTGraphics

        public JavaFXTGraphics​(javafx.scene.canvas.GraphicsContext gc)
    • Method Detail

      • getColorFactory

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

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

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

        public void save()
      • restore

        public void restore()
      • setGlobalAlpha

        public void setGlobalAlpha​(double alpha)
      • setPaint

        public void setPaint​(java.awt.Paint paint)
      • setFill

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

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

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

        public void setRadialGradient()
      • isPaintingForPrint

        public boolean isPaintingForPrint()
      • setPaintingForPrint

        public void setPaintingForPrint​(boolean paintingForPrint)
      • getNativeGraphics

        public java.lang.Object getNativeGraphics()
      • getIGraphics

        public com.macrofocus.igraphics.IGraphics<javafx.scene.paint.Color,​javafx.scene.text.Font> getIGraphics()
      • awtColorToJavaFX

        public javafx.scene.paint.Color awtColorToJavaFX​(java.awt.Color c)
      • getBackground

        public javafx.scene.paint.Color getBackground()
      • setBackground

        public void setBackground​(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> color)
      • setLineWidth

        public void setLineWidth​(double lw)
      • setLineDash

        public void setLineDash​(double[] dashPattern)
      • awtToJavaFXLineCap

        public javafx.scene.shape.StrokeLineCap awtToJavaFXLineCap​(int c)
      • awtToJavaFXLineJoin

        public javafx.scene.shape.StrokeLineJoin awtToJavaFXLineJoin​(int j)
      • floatToDoubleArray

        public double[] floatToDoubleArray​(float[] f)
      • 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)
      • stroke

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

        public void shapeToPath​(com.macrofocus.geom.Shape s)
      • intToArcType

        public javafx.scene.shape.ArcType intToArcType​(int t)
      • fill

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

        public javafx.scene.text.Font getFont()
      • setFont

        public void setFont​(javafx.scene.text.Font font)
      • getStringBounds

        public com.macrofocus.geom.Rectangle2D getStringBounds​(java.lang.String text)
      • getStringWidth

        public double getStringWidth​(java.lang.String text)
      • fillText

        public void fillText​(java.lang.String str,
                             int x,
                             int y)
      • fillText

        public void fillText​(java.lang.String str,
                             float x,
                             float y)
      • translate

        public void translate​(int tx,
                              int ty)
      • 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 t)
      • getTransform

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

        public void setTransform​(com.macrofocus.geom.AffineTransform t)
      • clip

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

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

        public void fillRect​(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)
      • fillPolygon

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

        public com.macrofocus.geom.GeneralPath createPolygon​(int[] xPoints,
                                                             int[] yPoints,
                                                             int nPoints,
                                                             boolean close)
      • createImage

        public java.awt.image.BufferedImage createImage​(int width,
                                                        int height)
      • drawNativeImage

        public boolean drawNativeImage​(java.awt.Image img,
                                       int x,
                                       int y)
      • drawImage

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

        public boolean drawImage​(com.macrofocus.igraphics.CPImage image,
                                 int x,
                                 int y,
                                 int w,
                                 int h)