Example usage for javafx.scene.text FontSmoothingType LCD

List of usage examples for javafx.scene.text FontSmoothingType LCD

Introduction

In this page you can find the example usage for javafx.scene.text FontSmoothingType LCD.

Prototype

FontSmoothingType LCD

To view the source code for javafx.scene.text FontSmoothingType LCD.

Click Source Link

Document

Specifies sub-pixel LCD text, which utilises characteristics of digital LCD display panels to achieve increased pixel resolution.

Usage

From source file:nars.rl.util.ThreeDView.java

public void addPoint(Object o, double radius, double x, double y, double z) {

    Term t = (Term) o;//w w w. ja  v  a  2 s.  c o  m

    final PhongMaterial mat = new PhongMaterial();
    Color c = Color.hsb(255.0 * Video.hashFloat(o.toString().hashCode()), 0.75f, 0.85f);
    mat.setDiffuseColor(c);
    System.out.println(o.getClass());
    Sphere point = new Sphere(radius / t.complexity());
    point.setOpacity(0.85);
    point.setTranslateX(x);
    point.setTranslateY(y);
    point.setTranslateZ(z);
    point.setMaterial(mat);

    space.getChildren().add(point);

    Text text = new Text(o.toString());
    text.setFill(c);
    text.setFontSmoothingType(FontSmoothingType.LCD);
    text.setSmooth(true);
    text.setTextAlignment(TextAlignment.CENTER);
    text.setFont(font);
    /*
    text.setScaleX(0.05);
    text.setScaleY(0.05);
    text.setScaleZ(0.05);
    */
    text.setTranslateX(x);
    text.setTranslateY(y);
    text.setTranslateZ(z);
    space.getChildren().add(text);

}