• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Shear类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javafx.scene.transform.Shear的典型用法代码示例。如果您正苦于以下问题:Java Shear类的具体用法?Java Shear怎么用?Java Shear使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Shear类属于javafx.scene.transform包,在下文中一共展示了Shear类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ShearSample

import javafx.scene.transform.Shear; //导入依赖的package包/类
public ShearSample() {
    super(125,160);

    //create rectangle
    Rectangle rect = new Rectangle(75, 75, Color.web("#ed4b00", 0.5));
    rect.setTranslateY(50);
    
    Shear shear = new Shear(0.7, 0);
    rect.getTransforms().add(shear);

    //show the rectangles
    getChildren().addAll(rect);

    // REMOVE ME
    setControls(
            new SimplePropertySheet.PropDesc("Shear X", shear.xProperty(), 0d, 1d),
            new SimplePropertySheet.PropDesc("Shear Y", shear.yProperty(), 0d, 1d),
            new SimplePropertySheet.PropDesc("Shear Pivot X", shear.pivotXProperty(), 0d, 50d),
            new SimplePropertySheet.PropDesc("Shear Pivot Y", shear.pivotYProperty(), 0d, 50d)
    );
    // END REMOVE ME

}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:24,代码来源:ShearSample.java


示例2: createIconContent

import javafx.scene.transform.Shear; //导入依赖的package包/类
public static Node createIconContent() {
    final Rectangle r1 = new Rectangle (22, 0, 64, 64);
    r1.setArcHeight(4);
    r1.setArcWidth(4);
    r1.setFill(Color.web("#ed4b00",0.5));
    r1.getTransforms().add(new Shear(-0.35, 0));

    Polygon polygon = createArrow();
    polygon.setLayoutX(-5);
    polygon.setLayoutY(-2);
    polygon.setRotate(90);
    

    Rectangle r2 = new Rectangle (0, 0, 64, 64);
    r2.setArcHeight(4);
    r2.setArcWidth(4);
    r2.setFill(Color.web("#ed4b00", 0.25));
    javafx.scene.Group g = new javafx.scene.Group(r2,r1, polygon);
    return new javafx.scene.Group(g);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:21,代码来源:ShearSample.java


示例3: shearSelectedObject

import javafx.scene.transform.Shear; //导入依赖的package包/类
public void shearSelectedObject(double x, double y) {
    GUIState guiState = mainController.getGUIController().getGuiState();

    FocusOutline focusOutline = guiState.getFocusOutline();

    Shear shearing = new Shear();
    shearing.setX(x);
    shearing.setY(y);

    shearing.setPivotX(focusOutline.getRotateAnchor().getCenterX());
    shearing.setPivotY(focusOutline.getRotateAnchor().getCenterY());

    focusOutline.getFocusRectangle().getTransforms().add(shearing);
    focusOutline.getRotateAnchor().getTransforms().add(shearing);

    guiState.getSelectedObject().getTransforms().add(shearing);

    for (ResizeAnchor resizeAnchor : focusOutline.getResizeAnchors()) {
        resizeAnchor.getTransforms().add(shearing);
    }
}
 
开发者ID:pfolta,项目名称:Shapify,代码行数:22,代码来源:Document.java


示例4: GetTransformation

import javafx.scene.transform.Shear; //导入依赖的package包/类
private Transform GetTransformation(int width, int height)
{
	double centerX = width * GetDoubleAttribute("X") / MaximumX;
	double centerY = height * GetDoubleAttribute("Y") / MaximumY;

	double skewX = 90 * (GetDoubleAttribute("SkewX") - MaximumX / 2.0) / MaximumX;
	double skewY = 90 * (GetDoubleAttribute("SkewY") - MaximumY / 2.0) / MaximumY;

	double scaleX = GetDoubleAttribute("Width");
	double scaleY = GetDoubleAttribute("Height");

	double rotation = (GetDoubleAttribute("Rotation") / MaximumX) * 360;
	
	Shear skewTransform = new Shear(skewX, skewY, centerX, centerY);
	Rotate rotateTransform = new Rotate(rotation, centerX, centerY);
	Scale scaleTransform = new Scale(scaleX, scaleY, centerX, centerY);

	return rotateTransform.createConcatenation(scaleTransform).createConcatenation(skewTransform);
}
 
开发者ID:andrewsarnold,项目名称:FlagMaker-2,代码行数:20,代码来源:OverlayTransformer.java


示例5: Digit

import javafx.scene.transform.Shear; //导入依赖的package包/类
public Digit(Color onColor, Color offColor, Effect onEffect, Effect offEffect) {
    this.onColor = onColor;
    this.offColor = offColor;
    this.onEffect = onEffect;
    this.offEffect = offEffect;
    getChildren().addAll(polygons);
    getTransforms().add(new Shear(-0.1,0));
    showNumber(0);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:DigitalClock.java


示例6: getTransforms

import javafx.scene.transform.Shear; //导入依赖的package包/类
public static String getTransforms(Node object) {
    String transforms = "";

    for (Transform transform : object.getTransforms()) {
        StringBuilder currentTransform = new StringBuilder();

        if (!transforms.isEmpty()) {
            currentTransform.append(" ");
        }

        if (transform instanceof Rotate) {
            Rotate rotate = (Rotate) transform;

            currentTransform.append("rotate(");
            currentTransform.append(rotate.getAngle());
            currentTransform.append(" ");
            currentTransform.append(rotate.getPivotX());
            currentTransform.append(" ");
            currentTransform.append(rotate.getPivotY());
            currentTransform.append(")");
        }

        if (transform instanceof Shear) {
            Shear shear = (Shear) transform;

            currentTransform.append("matrix(");
            currentTransform.append("1");
            currentTransform.append(", ");
            currentTransform.append(shear.getY());
            currentTransform.append(", ");
            currentTransform.append(shear.getX());
            currentTransform.append(", ");
            currentTransform.append("1");
            currentTransform.append(", ");
            currentTransform.append("0");
            currentTransform.append(", ");
            currentTransform.append("0");
            currentTransform.append(")");
        }

        transforms += currentTransform.toString();
    }

    return transforms;
}
 
开发者ID:pfolta,项目名称:Shapify,代码行数:46,代码来源:ShapeUtils.java


示例7: setShear

import javafx.scene.transform.Shear; //导入依赖的package包/类
/**
 * @param shear the shear to set
 */
public void setShear(Shear shear) {
    this.shear = shear;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:7,代码来源:TransformTest.java


示例8: getShear

import javafx.scene.transform.Shear; //导入依赖的package包/类
/**
 * @return the shear
 */
public Shear getShear() {
    return shear;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:7,代码来源:TransformTest.java



注:本文中的javafx.scene.transform.Shear类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ContentTypeImpl类代码示例发布时间:2022-05-23
下一篇:
Java StringInterner类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap