本文整理汇总了Java中javafx.scene.effect.PerspectiveTransform.setLry方法的典型用法代码示例。如果您正苦于以下问题:Java PerspectiveTransform.setLry方法的具体用法?Java PerspectiveTransform.setLry怎么用?Java PerspectiveTransform.setLry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.effect.PerspectiveTransform
的用法示例。
在下文中一共展示了PerspectiveTransform.setLry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createIconContent
import javafx.scene.effect.PerspectiveTransform; //导入方法依赖的package包/类
public static Node createIconContent() {
javafx.scene.Group g = new javafx.scene.Group(
createKey("A", 0d, 28d),
createKey("S", 25d, 28d),
createKey("D", 50d, 28d),
createKey("W", 20d, 0d)
);
g.setLayoutX(30);
g.setLayoutY(20);
PerspectiveTransform pt = new PerspectiveTransform();
pt.setLlx(0);
pt.setLly(90);
pt.setLrx(90);
pt.setLry(90);
pt.setUlx(15);
pt.setUly(10);
pt.setUrx(80);
pt.setUry(5);
g.setEffect(pt);
return g;
}
示例2: drawImage
import javafx.scene.effect.PerspectiveTransform; //导入方法依赖的package包/类
/** Draws the current image.
* @param topLeft where the top-left corner of the current image should be rendered
* @param topRight where the top-right corner of the current image should be rendered
* @param bottomRight where the bottom-right corner of the current image should be rendered
* @param bottomLeft where the bottom-left corner of the current image should be rendered
*/
public void drawImage(Point2D topLeft, Point2D topRight, Point2D bottomRight, Point2D bottomLeft) {
ensureRealized();
PerspectiveTransform t = new PerspectiveTransform();
t.setUlx(topLeft.getX());
t.setUly(topLeft.getY());
t.setUrx(topRight.getX());
t.setUry(topRight.getY());
t.setLrx(bottomRight.getX());
t.setLry(bottomRight.getY());
t.setLlx(bottomLeft.getX());
t.setLly(bottomLeft.getY());
context.setEffect(t);
context.drawImage(currentImage, 0, 0);
if (autoFlush) {
flush();
}
}
示例3: getNamedEffectList
import javafx.scene.effect.PerspectiveTransform; //导入方法依赖的package包/类
List<NamedEffect> getNamedEffectList() {
List<NamedEffect> nes = new ArrayList<NamedEffect>();
PerspectiveTransform pt = new PerspectiveTransform();
pt.setUlx(10);
pt.setUly(10);
pt.setUrx(150);
pt.setUry(50);
pt.setLrx(150);
pt.setLry(100);
pt.setLlx(10);
pt.setLly(70);
nes.add(new NamedEffect("perspective", pt));
return nes;
}