aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt
diff options
context:
space:
mode:
authorJerry Quinn <jlquinn@optonline.net>2004-04-22 05:34:30 +0000
committerJerry Quinn <jlquinn@gcc.gnu.org>2004-04-22 05:34:30 +0000
commit83ef3f2baee87742cab68eecfd60e4cc85c9b528 (patch)
tree6cb06df5e40b6dd5d96bf879374df74955299a58 /libjava/java/awt
parentaa26a3f64864253d4aa1ab10f8ec7d6e25c4088d (diff)
downloadgcc-83ef3f2baee87742cab68eecfd60e4cc85c9b528.zip
gcc-83ef3f2baee87742cab68eecfd60e4cc85c9b528.tar.gz
gcc-83ef3f2baee87742cab68eecfd60e4cc85c9b528.tar.bz2
Font.java (deriveFont): Implement missing variants.
2004-04-22 Jerry Quinn <jlquinn@optonline.net> * java/awt/Font.java (deriveFont): Implement missing variants. * gnu/java/awt/peer/ClasspathFontPeer.java (deriveFont): Implement missing variants. From-SVN: r81002
Diffstat (limited to 'libjava/java/awt')
-rw-r--r--libjava/java/awt/Font.java39
1 files changed, 38 insertions, 1 deletions
diff --git a/libjava/java/awt/Font.java b/libjava/java/awt/Font.java
index 42f9f7b..4c70c73 100644
--- a/libjava/java/awt/Font.java
+++ b/libjava/java/awt/Font.java
@@ -1,5 +1,5 @@
/* Font.java -- Font object
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -650,6 +650,22 @@ private static final long serialVersionUID = -4206021311591459213L;
/**
* Produces a new {@link Font} based on the current font, adjusted to a
+ * new size and style.
+ *
+ * @param style The style of the newly created font.
+ * @param size The size of the newly created font.
+ *
+ * @return A clone of the current font, with the specified size and style.
+ *
+ * @since 1.2
+ */
+ public Font deriveFont (int style, float size)
+{
+ return peer.deriveFont (this, style, size);
+}
+
+/**
+ * Produces a new {@link Font} based on the current font, adjusted to a
* new size.
*
* @param size The size of the newly created font.
@@ -702,6 +718,27 @@ private static final long serialVersionUID = -4206021311591459213L;
}
/**
+ * Produces a new {@link Font} based on the current font, subjected
+ * to a new affine transformation.
+ *
+ * @param a The transformation to apply.
+ *
+ * @return A clone of the current font, with the specified transform.
+ *
+ * @throws IllegalArgumentException If transformation is
+ * <code>null</code>.
+ *
+ * @since 1.2
+ */
+ public Font deriveFont (AffineTransform a)
+{
+ if (a == null)
+ throw new IllegalArgumentException ("Affine transformation is null");
+
+ return peer.deriveFont (this, a);
+}
+
+/**
* Produces a new {@link Font} based on the current font, adjusted to a
* new set of attributes.
*