Search in sources :

Example 1 with Setter

use of php.runtime.annotation.Reflection.Setter in project jphp by jphp-compiler.

the class UXMediaPlayer method setCurrentTimeAsPercent.

@Setter
public void setCurrentTimeAsPercent(long percent) {
    if (percent > 100) {
        percent = 100;
    }
    Duration duration = getWrappedObject().getMedia().getDuration();
    getWrappedObject().seek(Duration.millis(Math.round(duration.toMillis() * percent / 100.0)));
}
Also used : Duration(javafx.util.Duration) Setter(php.runtime.annotation.Reflection.Setter)

Example 2 with Setter

use of php.runtime.annotation.Reflection.Setter in project jphp by jphp-compiler.

the class PImageDraw method setTextAntialiasing.

@Setter
protected void setTextAntialiasing(Memory value) {
    Object _value = RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
    switch(value.toString().toUpperCase()) {
        case "GASP":
            _value = RenderingHints.VALUE_TEXT_ANTIALIAS_GASP;
            break;
        case "LCD_HBGR":
            _value = RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR;
            break;
        case "LCD_HRGB":
            _value = RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB;
            break;
        case "LCD_VBGR":
            _value = RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR;
            break;
        case "LCD_VRGB":
            _value = RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB;
            break;
        default:
            if (value.toBoolean()) {
                _value = RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
            }
    }
    gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, _value);
}
Also used : BaseObject(php.runtime.lang.BaseObject) Setter(php.runtime.annotation.Reflection.Setter)

Aggregations

Setter (php.runtime.annotation.Reflection.Setter)2 Duration (javafx.util.Duration)1 BaseObject (php.runtime.lang.BaseObject)1