Package com.treemap.javafx.crossplatform

# Class JavaFXTGraphics

java.lang.Object
com.treemap.crossplatform.AbstractTGraphics<javafx.scene.paint.Color,javafx.scene.text.Font>
com.treemap.javafx.crossplatform.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.

- ## Field Summary

  ### Fields inherited from class com.treemap.crossplatform.AbstractTGraphics

  `MINIMUM_FONT_SIZE_TO_DISPLAY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavaFXTGraphics(javafx.scene.canvas.GraphicsContext gc)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `javafx.scene.paint.Color`
  `awtColorToJavaFX(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)`
  `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(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(String str, float x, float y)`
  `void`
  `fillText(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()`
  `Object`
  `getNativeGraphics()`
  `com.macrofocus.geom.Rectangle2D`
  `getStringBounds(String text)`
  `double`
  `getStringWidth(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(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 com.treemap.crossplatform.AbstractTGraphics

  `drawClippedImage, findMaxFontSize, fitTextInsideRectangle, hitClip, softClip`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JavaFXTGraphics

    public JavaFXTGraphics(javafx.scene.canvas.GraphicsContext gc)

- ## Method Details

  - ### 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(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 Object getNativeGraphics()

  - ### getIGraphics

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

  - ### awtColorToJavaFX

    public javafx.scene.paint.Color awtColorToJavaFX(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(String text)

  - ### getStringWidth

    public double getStringWidth(String text)

  - ### fillText

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

  - ### fillText

    public void fillText(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 BufferedImage createImage(int width, int height)

  - ### drawNativeImage

    public boolean drawNativeImage(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)