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)));
}
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);
}
Aggregations