javafx.scene.image.ImageView.setSmooth()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中javafx.scene.image.ImageView.setSmooth()方法的一些代码示例,展示了ImageView.setSmooth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setSmooth()方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:setSmooth

ImageView.setSmooth介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

/**
 * Creates a container with the given animation type and duration.
 *
 * @param duration          the duration of the animation
 * @param animationProducer the {@link KeyFrame} instances that define the animation
 */
public ExtendedAnimatedFlowContainer(Duration duration, Function<AnimatedFlowContainer, List<KeyFrame>>
  animationProducer) {
  this.view = new StackPane();
  this.duration = duration;
  this.animationProducer = animationProducer;
  placeholder = new ImageView();
  placeholder.setPreserveRatio(true);
  placeholder.setSmooth(true);
}

代码示例来源:origin: stackoverflow.com

ImageView scaledImageView = new ImageView(image);
scaledImageView.setSmooth(false);

代码示例来源:origin: stackoverflow.com

Image fullImage = new Image(imageURL);

// define crop in image coordinates:
Rectangle2D croppedPortion = new Rectangle2D(x, y, width, height);

// target width and height:
double scaledWidth = ... ;
double scaledHeight = ... ;

ImageView imageView = new ImageView(fullImage);
imageView.setViewport(croppedPortion);
imageView.setFitWidth(scaledWidth);
imageView.setFitHeight(scaledHeight);
imageView.setSmooth(true);

代码示例来源:origin: stackoverflow.com

imgv.setFitWidth(15);
imgv.setPreserveRatio(true);
imgv.setSmooth(true);
hb.setGraphic(imgv);
hb.setTooltip(ControlFactory.getTooltip("Klient entfernen"));

代码示例来源:origin: io.datafx/flow

/**
 *    Creates a container with the given animation type and duration
 * @param duration  the duration of the animation
 * @param animationProducer   the {@link KeyFrame} instances that define the animation
 */
public AnimatedFlowContainer(Duration duration, Function<AnimatedFlowContainer, List<KeyFrame>> animationProducer) {
  this.root = new StackPane();
  this.duration = duration;
  this.animationProducer = animationProducer;
  placeholder = new ImageView();
  placeholder.setPreserveRatio(true);
  placeholder.setSmooth(true);
}

代码示例来源:origin: stackoverflow.com

img.setFitHeight(10d);
img.setPreserveRatio(true);
img.setSmooth(true);
setGraphic(img);
setContentDisplay(ContentDisplay.RIGHT);

代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan

/**
 * init the Image
 */
public void initImage() {
 // simple displays ImageView the image as is
 imageView = new ImageView();
 imageView.setImage(getImage());
 imageView.setSmooth(true);
 imageView.setCache(true);
}

代码示例来源:origin: stackoverflow.com

// resizes the image to have width and height of 100 while preserving the ratio and using
 // higher quality filtering method; this ImageView is also cached to 
// improve performance

ImageView iv2 =newImageView();     iv2.setImage(image);
iv2.setFitHeight(100);  iv2.setFitWidth(100);  iv2.setPreserveRatio(true); iv2.setSmooth(true); iv2.setCache(true);

代码示例来源:origin: org.controlsfx/controlsfx

/**
   * {@inheritDoc}
   */
  @Override protected void updateItem(Image item, boolean empty) {
    super.updateItem(item, empty);
    
    if (empty) {
      setGraphic(null);
    } else {
      if (preserveImageProperties) {
        imageView.setPreserveRatio(item.isPreserveRatio());
        imageView.setSmooth( item.isSmooth());
      }
      imageView.setImage(item);
      setGraphic(imageView);
    }
  }
}

代码示例来源:origin: stackoverflow.com

public GridPane moonpane() {
   GridPane Moonpane = new GridPane();
   Moonpane.setId("moonpane");
   Moonpane.getColumnConstraints().setAll(
       ColumnConstraintsBuilder.create().prefWidth(160).minWidth(160).build(),
       ColumnConstraintsBuilder.create().prefWidth(100).minWidth(100).build()     
   );
   Moonpane.setHgap(10);
   Moonpane.setMaxHeight(50);
   ImageView Moon_img = new ImageView(new Image(getClass().getResourceAsStream("/Images/Moon/100%.png")));      
   Moon_img.setFitWidth(100);
   Moon_img.setFitHeight(100);
   Moon_img.setPreserveRatio(true);
   Moon_img.setSmooth(true);
   Moon_Image_Label.setGraphic(Moon_img);
   Moonpane.setConstraints(Moon_Image_Label, 1, 0);
   Moonpane.getChildren().add(Moon_Image_Label); 
   Moon_Date_Label.setId("moon-text-english");
   Moonpane.setConstraints(Moon_Date_Label, 0, 0);
   Moonpane.getChildren().add(Moon_Date_Label);
   Reflection r = new Reflection();
   r.setFraction(0.15f);
   Moonpane.setEffect(r);
   Moonpane.setGridLinesVisible(true);
   return Moonpane;
 }

代码示例来源:origin: stackoverflow.com

imgView.setFitWidth(12);
imgView.setPreserveRatio(true);
imgView.setSmooth(true);
imgView.setCache(true);
setGraphic(imgView);

代码示例来源:origin: com.guigarage/imaging

imageView.setSmooth(true);
imageView.fitWidthProperty().bind(widthProperty());
imageView.fitHeightProperty().bind(heightProperty());

相关文章