Package com.actelion.research.jfx.gui
Class GraphicsContextImpl
- java.lang.Object
-
- com.actelion.research.jfx.gui.GraphicsContextImpl
-
- All Implemented Interfaces:
IDrawContext<javafx.scene.canvas.GraphicsContext>
public class GraphicsContextImpl extends java.lang.Object implements IDrawContext<javafx.scene.canvas.GraphicsContext>
Project: User: rufenec Date: 11/24/2014 Time: 6:24 PM
-
-
Constructor Summary
Constructors Constructor Description GraphicsContextImpl(javafx.scene.canvas.GraphicsContext graphicsContext2D)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearRect(double x, double y, double w, double h)static javafx.scene.paint.ColorcreateColor(long color)voiddrawDashedLine(double srcx, double srcy, double targetx, double targety, int[] dashPattern)voiddrawLine(double x, double y, double x1, double y1)voiddrawPolygon(IPolygon polygon)voiddrawRect(double x, double y, double width, double height)voiddrawText(java.lang.String s, double x, double y, boolean centerHorz, boolean centerVert)voidfillElipse(double x, double y, double rx, double ry)voidfillPolygon(double[] px, double[] py, int i)voidfillRect(double x, double y, double w, double h)voidfillText(java.lang.String str, double x, double y)java.awt.DimensiongetBounds(java.lang.String s)javafx.scene.canvas.GraphicsContextgetContext()java.lang.StringgetFont()javafx.scene.canvas.GraphicsContextgetNative()voidrestore()voidsave()voidsetFill(long color)voidsetFont(java.lang.String name, double size, boolean bold)voidsetLineWidth(double i)voidsetStroke(long color)voidstrokeLine(double x, double y, double x1, double y1)
-
-
-
Method Detail
-
getContext
public javafx.scene.canvas.GraphicsContext getContext()
-
createColor
public static javafx.scene.paint.Color createColor(long color)
-
getNative
public javafx.scene.canvas.GraphicsContext getNative()
- Specified by:
getNativein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawLine
public void drawLine(double x, double y, double x1, double y1)- Specified by:
drawLinein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawDashedLine
public void drawDashedLine(double srcx, double srcy, double targetx, double targety, int[] dashPattern)- Specified by:
drawDashedLinein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawPolygon
public void drawPolygon(IPolygon polygon)
- Specified by:
drawPolygonin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
getBounds
public java.awt.Dimension getBounds(java.lang.String s)
- Specified by:
getBoundsin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setFont
public void setFont(java.lang.String name, double size, boolean bold)- Specified by:
setFontin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
getFont
public java.lang.String getFont()
- Specified by:
getFontin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setFill
public void setFill(long color)
- Specified by:
setFillin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillText
public void fillText(java.lang.String str, double x, double y)- Specified by:
fillTextin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
save
public void save()
- Specified by:
savein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
restore
public void restore()
- Specified by:
restorein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawRect
public void drawRect(double x, double y, double width, double height)- Specified by:
drawRectin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawText
public void drawText(java.lang.String s, double x, double y, boolean centerHorz, boolean centerVert)- Specified by:
drawTextin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
clearRect
public void clearRect(double x, double y, double w, double h)- Specified by:
clearRectin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setStroke
public void setStroke(long color)
- Specified by:
setStrokein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillElipse
public void fillElipse(double x, double y, double rx, double ry)- Specified by:
fillElipsein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillRect
public void fillRect(double x, double y, double w, double h)- Specified by:
fillRectin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
strokeLine
public void strokeLine(double x, double y, double x1, double y1)- Specified by:
strokeLinein interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillPolygon
public void fillPolygon(double[] px, double[] py, int i)- Specified by:
fillPolygonin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setLineWidth
public void setLineWidth(double i)
- Specified by:
setLineWidthin interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
-