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 void
clearRect(double x, double y, double w, double h)
static javafx.scene.paint.Color
createColor(long color)
void
drawDashedLine(double srcx, double srcy, double targetx, double targety, int[] dashPattern)
void
drawLine(double x, double y, double x1, double y1)
void
drawPolygon(IPolygon polygon)
void
drawRect(double x, double y, double width, double height)
void
drawText(java.lang.String s, double x, double y, boolean centerHorz, boolean centerVert)
void
fillElipse(double x, double y, double rx, double ry)
void
fillPolygon(double[] px, double[] py, int i)
void
fillRect(double x, double y, double w, double h)
void
fillText(java.lang.String str, double x, double y)
java.awt.Dimension
getBounds(java.lang.String s)
javafx.scene.canvas.GraphicsContext
getContext()
java.lang.String
getFont()
javafx.scene.canvas.GraphicsContext
getNative()
void
restore()
void
save()
void
setFill(long color)
void
setFont(java.lang.String name, double size, boolean bold)
void
setLineWidth(double i)
void
setStroke(long color)
void
strokeLine(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:
getNative
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawLine
public void drawLine(double x, double y, double x1, double y1)
- Specified by:
drawLine
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawDashedLine
public void drawDashedLine(double srcx, double srcy, double targetx, double targety, int[] dashPattern)
- Specified by:
drawDashedLine
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawPolygon
public void drawPolygon(IPolygon polygon)
- Specified by:
drawPolygon
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
getBounds
public java.awt.Dimension getBounds(java.lang.String s)
- Specified by:
getBounds
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setFont
public void setFont(java.lang.String name, double size, boolean bold)
- Specified by:
setFont
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
getFont
public java.lang.String getFont()
- Specified by:
getFont
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setFill
public void setFill(long color)
- Specified by:
setFill
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillText
public void fillText(java.lang.String str, double x, double y)
- Specified by:
fillText
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
save
public void save()
- Specified by:
save
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
restore
public void restore()
- Specified by:
restore
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawRect
public void drawRect(double x, double y, double width, double height)
- Specified by:
drawRect
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
drawText
public void drawText(java.lang.String s, double x, double y, boolean centerHorz, boolean centerVert)
- Specified by:
drawText
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
clearRect
public void clearRect(double x, double y, double w, double h)
- Specified by:
clearRect
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setStroke
public void setStroke(long color)
- Specified by:
setStroke
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillElipse
public void fillElipse(double x, double y, double rx, double ry)
- Specified by:
fillElipse
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillRect
public void fillRect(double x, double y, double w, double h)
- Specified by:
fillRect
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
strokeLine
public void strokeLine(double x, double y, double x1, double y1)
- Specified by:
strokeLine
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
fillPolygon
public void fillPolygon(double[] px, double[] py, int i)
- Specified by:
fillPolygon
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
setLineWidth
public void setLineWidth(double i)
- Specified by:
setLineWidth
in interfaceIDrawContext<javafx.scene.canvas.GraphicsContext>
-
-