Class JavaFXTGraphics
- java.lang.Object
-
- com.macrofocus.treemap.crossplatform.AbstractTGraphics<javafx.scene.paint.Color,javafx.scene.text.Font>
-
- com.macrofocus.treemap.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.macrofocus.treemap.crossplatform.AbstractTGraphics
MINIMUM_FONT_SIZE_TO_DISPLAY
-
-
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(java.awt.Shape s)
java.awt.image.BufferedImage
createImage(int width, int height)
java.awt.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(java.awt.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()
java.lang.Object
getRenderingHint(java.awt.RenderingHints.Key hintKey)
java.awt.geom.Rectangle2D
getStringBounds(java.lang.String text)
double
getStringWidth(java.lang.String text)
java.awt.geom.AffineTransform
getTransform()
javafx.scene.shape.ArcType
intToArcType(int t)
boolean
isPaintingForPrint()
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
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
setLineDash(double[] dashPattern)
void
setLineWidth(double lw)
void
setPaint(java.awt.Paint paint)
void
setPaintingForPrint(boolean paintingForPrint)
void
setRadialGradient()
void
setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
void
setStroke(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)
void
setTransform(java.awt.geom.AffineTransform t)
void
shapeToPath(java.awt.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(java.awt.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(java.awt.geom.AffineTransform t)
void
translate(double tx, double ty)
void
translate(int tx, int ty)
-
Methods inherited from class com.macrofocus.treemap.crossplatform.AbstractTGraphics
drawClippedImage, findMaxFontSize, fitTextInsideRectangle, hitClip, softClip
-
-
-
-
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)
-
getRenderingHint
public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key hintKey)
-
setRenderingHint
public void setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
-
stroke
public void stroke(java.awt.Shape s)
-
shapeToPath
public void shapeToPath(java.awt.Shape s)
-
intToArcType
public javafx.scene.shape.ArcType intToArcType(int t)
-
fill
public void fill(java.awt.Shape s)
-
getFont
public javafx.scene.text.Font getFont()
-
setFont
public void setFont(javafx.scene.text.Font font)
-
getStringBounds
public java.awt.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(java.awt.geom.AffineTransform t)
-
getTransform
public java.awt.geom.AffineTransform getTransform()
-
setTransform
public void setTransform(java.awt.geom.AffineTransform t)
-
clip
public void clip(java.awt.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 java.awt.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)
-
-