0N/A/*
2362N/A * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.java2d.loops;
0N/A
0N/Aimport java.awt.Font;
0N/Aimport java.awt.geom.AffineTransform;
0N/A
0N/Aimport sun.font.Font2D;
0N/Aimport sun.font.FontStrike;
0N/Aimport sun.font.FontStrikeDesc;
0N/A
0N/A/*
0N/A * A FontInfo object holds all calculated or derived data needed
0N/A * to handle rendering operations based on a particular set of
0N/A * Graphics2D rendering attributes.
0N/A * Note that this does not use a Font2DHandle, and also has a reference
0N/A * to the strike which also references the Font2D.
0N/A * So presently, until SG2D objects no longer reference this FontInfo,
0N/A * there is still some potential for a bad Font2D to be used for a short
0N/A * time. I am reluctant to add the overhead of that machinery here without
0N/A * a proven benefit.
0N/A */
0N/Apublic class FontInfo implements Cloneable {
0N/A public Font font;
0N/A public Font2D font2D;
0N/A public FontStrike fontStrike;
0N/A public double[] devTx;
0N/A public double[] glyphTx;
0N/A public int pixelHeight;
0N/A public float originX;
0N/A public float originY;
0N/A public int aaHint;
0N/A public boolean lcdRGBOrder;
0N/A /* lcdSubPixPos is used if FM is ON for HRGB/HBGR LCD text mode */
0N/A public boolean lcdSubPixPos;
0N/A
0N/A public String mtx(double[] matrix) {
0N/A return ("["+
0N/A matrix[0]+", "+
0N/A matrix[1]+", "+
0N/A matrix[2]+", "+
0N/A matrix[3]+
0N/A "]");
0N/A }
0N/A
0N/A public Object clone() {
0N/A try {
0N/A return super.clone();
0N/A } catch (CloneNotSupportedException e) {
0N/A return null;
0N/A }
0N/A }
0N/A
0N/A public String toString() {
0N/A return ("FontInfo["+
0N/A "font="+font+", "+
0N/A "devTx="+mtx(devTx)+", "+
0N/A "glyphTx="+mtx(glyphTx)+", "+
0N/A "pixelHeight="+pixelHeight+", "+
0N/A "origin=("+originX+","+originY+"), "+
0N/A "aaHint="+aaHint+", "+
0N/A "lcdRGBOrder="+(lcdRGBOrder ? "RGB" : "BGR")+
0N/A "lcdSubPixPos="+lcdSubPixPos+
0N/A "]");
0N/A }
0N/A}