JavaFX css border-radius issue

后端 未结 3 1620
悲&欢浪女
悲&欢浪女 2021-01-23 00:53

I am trying to simulate the effect one would get from this css example:

border-radius: 50%;

From searching the API and reading posts on forums

3条回答
  •  我在风中等你
    2021-01-23 01:20

    In one Line with Circle as Clip.You can use setClip(any shape).:

    imageView.setClip(new Circle(width,height,radius);
    

    The width,height,radius have to be slighty smaller that ImageView size to work.

    Inspired by GuiGarage web site.

提交回复
热议问题