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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.scene.paint.ColorawtColorToJavaFX(java.awt.Color c)javafx.scene.shape.StrokeLineCapawtToJavaFXLineCap(int c)javafx.scene.shape.StrokeLineJoinawtToJavaFXLineJoin(int j)voidclearRect(int x, int y, int width, int height)voidclip(com.macrofocus.geom.Shape s)java.awt.image.BufferedImagecreateImage(int width, int height)com.macrofocus.geom.GeneralPathcreatePolygon(int[] xPoints, int[] yPoints, int nPoints, boolean close)voiddrawArc(int x, int y, int width, int height, int startAngle, int arcAngle)booleandrawImage(com.macrofocus.igraphics.CPImage image, int x, int y)booleandrawImage(com.macrofocus.igraphics.CPImage image, int x, int y, int w, int h)booleandrawNativeImage(java.awt.Image img, int x, int y)voiddrawOval(int x, int y, int width, int height)voiddrawPolygon(int[] xPoints, int[] yPoints, int nPoints)voiddrawPolyline(int[] xPoints, int[] yPoints, int nPoints)voidfill(com.macrofocus.geom.Shape s)voidfillArc(int x, int y, int width, int height, int startAngle, int arcAngle)voidfillOval(int x, int y, int width, int height)voidfillPolygon(int[] xPoints, int[] yPoints, int nPoints)voidfillRect(double x, double y, double width, double height)voidfillRect(int x, int y, int width, int height)voidfillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)voidfillText(java.lang.String str, float x, float y)voidfillText(java.lang.String str, int x, int y)double[]floatToDoubleArray(float[] f)javafx.scene.paint.ColorgetBackground()com.macrofocus.igraphics.CPColorFactory<javafx.scene.paint.Color>getColorFactory()javafx.scene.text.FontgetFont()com.macrofocus.igraphics.IGraphics<javafx.scene.paint.Color,javafx.scene.text.Font>getIGraphics()java.lang.ObjectgetNativeGraphics()com.macrofocus.geom.Rectangle2DgetStringBounds(java.lang.String text)doublegetStringWidth(java.lang.String text)com.macrofocus.geom.AffineTransformgetTransform()javafx.scene.shape.ArcTypeintToArcType(int t)booleanisAntialias()booleanisInterpolationBilinear()booleanisPaintingForPrint()booleanisTextAntialias()voidpaintLabel(com.macrofocus.labeling.EnhancedLabel<javafx.scene.paint.Color,javafx.scene.text.Font> l, int x, int y, int w, int h)voidrestore()voidrotate(double theta)voidrotate(double theta, double x, double y)voidsave()voidscale(double sx, double sy)voidsetAntialias(boolean antialias)voidsetBackground(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> color)voidsetColor(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)voidsetFill(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)voidsetFont(javafx.scene.text.Font font)voidsetGlobalAlpha(double alpha)voidsetInterpolationBilinear(boolean bilinear)voidsetLineDash(double[] dashPattern)voidsetLineWidth(double lw)voidsetPaint(java.awt.Paint paint)voidsetPaintingForPrint(boolean paintingForPrint)voidsetRadialGradient()voidsetStroke(com.macrofocus.igraphics.CPColor<javafx.scene.paint.Color> c)voidsetTextAntialias(boolean antialias)voidsetTransform(com.macrofocus.geom.AffineTransform t)voidshapeToPath(com.macrofocus.geom.Shape s)voidshear(double shx, double shy)PreferredSizesizeLabel(com.macrofocus.labeling.EnhancedLabel<javafx.scene.paint.Color,javafx.scene.text.Font> l, int w, int h)voidstroke(com.macrofocus.geom.Shape s)voidstrokeLine(int x1, int y1, int x2, int y2)voidstrokeRect(double x, double y, double width, double height)voidstrokeRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)voidtransform(com.macrofocus.geom.AffineTransform t)voidtranslate(double tx, double ty)voidtranslate(int tx, int ty)-
Methods inherited from class com.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)
-
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)
-
-