diff options
author | jlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-22 05:34:30 +0000 |
---|---|---|
committer | jlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-22 05:34:30 +0000 |
commit | feb0f3815cd0afe893bb3930c6ddb77f4b7bcc5d (patch) | |
tree | 6cb06df5e40b6dd5d96bf879374df74955299a58 /libjava/java | |
parent | 141efd27417ceb7f5799ad0ea395579ddceee0b9 (diff) | |
download | ppe42-gcc-feb0f3815cd0afe893bb3930c6ddb77f4b7bcc5d.tar.gz ppe42-gcc-feb0f3815cd0afe893bb3930c6ddb77f4b7bcc5d.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/awt/Font.java | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/libjava/java/awt/Font.java b/libjava/java/awt/Font.java index 42f9f7b85eb..4c70c735797 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. * |