本文整理了Java中javafx.scene.image.ImageView.setScaleX()
方法的一些代码示例,展示了ImageView.setScaleX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setScaleX()
方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:setScaleX
暂无
代码示例来源:origin: com.guigarage/animations
@Override
protected void interpolate(double frac) {
node.setTranslateX(50 - (frac * 100.0));
node.setScaleX(1.2 + 0.4 * frac);
node.setScaleY(1.2 + 0.4 * frac);
}
}
代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX
private ImageView createScaledView(Image img, double scale) {
ImageView view = new ImageView(img);
view.setScaleX(scale);
view.setScaleY(scale);
return view;
}
代码示例来源:origin: com.guigarage/animations
public KenBurnsTransition(ImageView node, Duration duration) {
super(duration);
this.node = node;
statusProperty().addListener(e -> {
if(getStatus().equals(Status.RUNNING)) {
node.setTranslateX(50);
node.setScaleX(1.2);
node.setScaleY(1.2);
}
});
}
代码示例来源:origin: com.bitplan.dragtop/com.bitplan.dragtop
/**
* create a drag item for the given file
*
* @param file
*/
public DragItem(File file) {
this.item=file;
String filePath = file.getAbsolutePath();
if (debug) {
LOGGER.log(Level.INFO,"Dragitem for file "+filePath+" created");
}
image = FileIcon.getFileIcon(file);
ImageView imageView = new ImageView();
imageView.setImage(image);
imageView.setScaleX(iconSize/image.getWidth());
imageView.setScaleY(iconSize/image.getHeight());
setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
setGraphic(imageView);
Tooltip tooltip = new Tooltip(filePath);
setTooltip(tooltip);
activateDrag();
}
代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX
control.travelingEastProperty().addListener((observable, oldValue, newValue) -> {
int dir = control.isTravelingEast() ? -1 : 1;
shipIconView.setScaleX(ICON_SCALE * dir);
});
shipIconView.setScaleX(ICON_SCALE * directionFactor);
shipIconView.setScaleY(ICON_SCALE);
shield = createShield(vessel);
代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX
double scale = destinationWidth / unscaled.getWidth();
ImageView steeringWheel = new ImageView(unscaled);
steeringWheel.setScaleX(scale);
steeringWheel.setScaleY(scale);
steeringWheel.setRotate(angle);
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
cashPile.setScaleX(0.5);
代码示例来源:origin: com.github.almasb/fxgl-base
imageView.setScaleX(radius.x * 2 / image.getWidth());
imageView.setScaleY(radius.y * 2 / image.getHeight());
imageView.setLayoutX(x);
代码示例来源:origin: com.github.almasb/fxgl-effects
imageView.setScaleX(radius.x * 2 / image.getWidth());
imageView.setScaleY(radius.y * 2 / image.getHeight());
imageView.setLayoutX(x);
内容来源于网络,如有侵权,请联系作者删除!