1909 * Transforms the geometry of this path using the specified 1910 * {@link AffineTransform}. 1911 * The geometry is transformed in place, which permanently changes the 1912 * boundary defined by this object. 1913 * 1914 * @param at the {@code AffineTransform} used to transform the area 1915 * @since 1.6 1916 */ 1917 public abstract void transform(AffineTransform at); 1918 1919 /** 1920 * Returns a new {@code Shape} representing a transformed version 1921 * of this {@code Path2D}. 1922 * Note that the exact type and coordinate precision of the return 1923 * value is not specified for this method. 1924 * The method will return a Shape that contains no less precision 1925 * for the transformed geometry than this {@code Path2D} currently 1926 * maintains, but it may contain no more precision either. 1927 * If the tradeoff of precision vs. storage size in the result is 1928 * important then the convenience constructors in the 1929 * {@link Path2D.Float#Path2D.Float(Shape, AffineTransform) Path2D.Float} 1930 * and 1931 * {@link Path2D.Double#Path2D.Double(Shape, AffineTransform) Path2D.Double} 1932 * subclasses should be used to make the choice explicit. 1933 * 1934 * @param at the {@code AffineTransform} used to transform a 1935 * new {@code Shape}. 1936 * @return a new {@code Shape}, transformed with the specified 1937 * {@code AffineTransform}. 1938 * @since 1.6 1939 */ 1940 public final synchronized Shape createTransformedShape(AffineTransform at) { 1941 Path2D p2d = (Path2D) clone(); 1942 if (at != null) { 1943 p2d.transform(at); 1944 } 1945 return p2d; 1946 } 1947 1948 /** 1949 * {@inheritDoc} 1950 * @since 1.6 1951 */ | 1909 * Transforms the geometry of this path using the specified 1910 * {@link AffineTransform}. 1911 * The geometry is transformed in place, which permanently changes the 1912 * boundary defined by this object. 1913 * 1914 * @param at the {@code AffineTransform} used to transform the area 1915 * @since 1.6 1916 */ 1917 public abstract void transform(AffineTransform at); 1918 1919 /** 1920 * Returns a new {@code Shape} representing a transformed version 1921 * of this {@code Path2D}. 1922 * Note that the exact type and coordinate precision of the return 1923 * value is not specified for this method. 1924 * The method will return a Shape that contains no less precision 1925 * for the transformed geometry than this {@code Path2D} currently 1926 * maintains, but it may contain no more precision either. 1927 * If the tradeoff of precision vs. storage size in the result is 1928 * important then the convenience constructors in the 1929 * {@link Path2D.Float#Float(Shape, AffineTransform) Path2D.Float} 1930 * and 1931 * {@link Path2D.Double#Double(Shape, AffineTransform) Path2D.Double} 1932 * subclasses should be used to make the choice explicit. 1933 * 1934 * @param at the {@code AffineTransform} used to transform a 1935 * new {@code Shape}. 1936 * @return a new {@code Shape}, transformed with the specified 1937 * {@code AffineTransform}. 1938 * @since 1.6 1939 */ 1940 public final synchronized Shape createTransformedShape(AffineTransform at) { 1941 Path2D p2d = (Path2D) clone(); 1942 if (at != null) { 1943 p2d.transform(at); 1944 } 1945 return p2d; 1946 } 1947 1948 /** 1949 * {@inheritDoc} 1950 * @since 1.6 1951 */ |