diff options
author | Jerry Quinn <jlquinn@optonline.net> | 2004-04-22 05:34:30 +0000 |
---|---|---|
committer | Jerry Quinn <jlquinn@gcc.gnu.org> | 2004-04-22 05:34:30 +0000 |
commit | 83ef3f2baee87742cab68eecfd60e4cc85c9b528 (patch) | |
tree | 6cb06df5e40b6dd5d96bf879374df74955299a58 /libjava/gnu/java/awt/peer/ClasspathFontPeer.java | |
parent | aa26a3f64864253d4aa1ab10f8ec7d6e25c4088d (diff) | |
download | gcc-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/gnu/java/awt/peer/ClasspathFontPeer.java')
-rw-r--r-- | libjava/gnu/java/awt/peer/ClasspathFontPeer.java | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/libjava/gnu/java/awt/peer/ClasspathFontPeer.java b/libjava/gnu/java/awt/peer/ClasspathFontPeer.java index 287c271b..6b753aa 100644 --- a/libjava/gnu/java/awt/peer/ClasspathFontPeer.java +++ b/libjava/gnu/java/awt/peer/ClasspathFontPeer.java @@ -1,5 +1,5 @@ /* ClasspathFontPeer.java -- Font peer used by GNU Classpath. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -395,6 +395,23 @@ public abstract class ClasspathFontPeer } /** + * Implementation of {@link Font#deriveFont(int, float)} + * + * @param font the font this peer is being called from. This may be + * useful if you are sharing peers between Font objects. Otherwise it may + * be ignored. + */ + + public Font deriveFont (Font font, int style, float size) + { + Map attrs = new HashMap (); + getStandardAttributes (attrs); + copyStyleToAttrs (style, attrs); + copySizeToAttrs (size, attrs); + return tk().getFont (logicalName, attrs); + } + + /** * Implementation of {@link Font#deriveFont(float)} * * @param font the font this peer is being called from. This may be @@ -444,6 +461,22 @@ public abstract class ClasspathFontPeer } /** + * Implementation of {@link Font#deriveFont(AffineTransform)} + * + * @param font the font this peer is being called from. This may be + * useful if you are sharing peers between Font objects. Otherwise it may + * be ignored. + */ + + public Font deriveFont (Font font, AffineTransform t) + { + Map attrs = new HashMap (); + getStandardAttributes (attrs); + copyTransformToAttrs (t, attrs); + return tk().getFont (logicalName, attrs); + } + + /** * Implementation of {@link Font#deriveFont(Map)} * * @param font the font this peer is being called from. This may be |