JavaFX ShearingShearing is a kind of transformation which changes the slope of the object with respect to any of the axis. There are two Shear transformations that are X-shear and Y-shear. The X-shear transformation changes the X-coordinate values while the Y-shear changes the Y-coordinate values. In both kind of shearing, only one coordinate changes the value while the other remains same. The following image shows the object after applying the X-shear transformation to it. The y-coordinate of the rectangle remain unchanged while the X-coordinate shifts by some factor. In JavaFX, the class javafx.scene.transform.Shear represents the Shear Transformation. PropertiesThe properties of the class along with the setter methods are described in the following table.
ConstructorsThe class contains three constructors
Example:The following example illustrates the implementation of Shearing Transformation. Here, we have created three rectangles which are filled with the blue, dark-grey and pink color respectively. The dark-grey rectangle is the original one while the blue rectangle is X-sheared and the pink rectangle is Y-sheared. Next TopicJavaFX Multiple Transformations |