Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GraphicsContextImpl

        public GraphicsContextImpl​(javafx.scene.canvas.GraphicsContext graphicsContext2D)
    • 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 interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • drawLine

        public void drawLine​(double x,
                             double y,
                             double x1,
                             double y1)
        Specified by:
        drawLine in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • drawDashedLine

        public void drawDashedLine​(double srcx,
                                   double srcy,
                                   double targetx,
                                   double targety,
                                   int[] dashPattern)
        Specified by:
        drawDashedLine in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • getBounds

        public java.awt.Dimension getBounds​(java.lang.String s)
        Specified by:
        getBounds in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • setFont

        public void setFont​(java.lang.String name,
                            double size,
                            boolean bold)
        Specified by:
        setFont in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • getFont

        public java.lang.String getFont()
        Specified by:
        getFont in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • setFill

        public void setFill​(long color)
        Specified by:
        setFill in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • fillText

        public void fillText​(java.lang.String str,
                             double x,
                             double y)
        Specified by:
        fillText in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • save

        public void save()
        Specified by:
        save in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • restore

        public void restore()
        Specified by:
        restore in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • drawRect

        public void drawRect​(double x,
                             double y,
                             double width,
                             double height)
        Specified by:
        drawRect in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • drawText

        public void drawText​(java.lang.String s,
                             double x,
                             double y,
                             boolean centerHorz,
                             boolean centerVert)
        Specified by:
        drawText in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • clearRect

        public void clearRect​(double x,
                              double y,
                              double w,
                              double h)
        Specified by:
        clearRect in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • setStroke

        public void setStroke​(long color)
        Specified by:
        setStroke in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • fillElipse

        public void fillElipse​(double x,
                               double y,
                               double rx,
                               double ry)
        Specified by:
        fillElipse in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • fillRect

        public void fillRect​(double x,
                             double y,
                             double w,
                             double h)
        Specified by:
        fillRect in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • strokeLine

        public void strokeLine​(double x,
                               double y,
                               double x1,
                               double y1)
        Specified by:
        strokeLine in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • fillPolygon

        public void fillPolygon​(double[] px,
                                double[] py,
                                int i)
        Specified by:
        fillPolygon in interface IDrawContext<javafx.scene.canvas.GraphicsContext>
      • setLineWidth

        public void setLineWidth​(double i)
        Specified by:
        setLineWidth in interface IDrawContext<javafx.scene.canvas.GraphicsContext>