|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagejava.awt.font
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
TheClass FontRenderContext, constructor FontRenderContext(AffineTransform, boolean, boolean)FontRenderContext
class is a container for the information needed to correctly measure text. The measurement of text can vary because of rules that map outlines to pixels and rendering hints provided by an application.One such piece of information is a transform that scales typographical points to pixels. (A point is defined to be exactly 1/72 of an inch which is slightly different than the traditional mechanical measurement of a point.) A character that is rendered at 12pt on a 600dpi device might have a different size than the same character rendered at 12pt on a 72dpi device because of such factors as rounding to pixel boundaries and hints that the font designer may have specified.
Anti-aliasing and Fractional-metrics specified by an application can also affect the size of a character because of rounding to pixel boundaries.
Typically instances of
FontRenderContext
are obtained from a Graphics2D object. AFontRenderContext
which is directly constructed will most likely not represent any actual graphics device and may lead to unexpected or incorrect results.@see java.awt.RenderingHints#KEY_TEXT_ANTIALIASING @see java.awt.RenderingHints#KEY_FRACTIONALMETRICS @see java.awt.Graphics2D#getFontRenderContext @see java.awt.font.LineMetrics
Constructs aFontRenderContext
object from an optional AffineTransform and twoboolean
values that determine if the newly constructed object has anti-aliasing or fractional metrics. @param tx theoptionaltransform which is used to scale typographical points to pixels in this. If null an identity tranform is used. @param isAntiAliased determines if the newly contructed object has anti-aliasing @param usesFractionalMetrics determines if the newly constructed object uses fractional metrics
AffineTransformFontRenderContext
Constructs information about the justification properties of a glyph. @param weight the weight of this glyph when allocating space. Must be non-negative. @param growAbsorb iftrue
this glyph absorbs all extra space at this priority and lower priority levels when it grows @param growPriority the priority level of this glyph when it grows @param growLeftLimit the maximum amount by which the left side of this glyph can grow. Must be non-negative. @param growRightLimit the maximum amount by which the right side of this glyph can grow. Must be non-negative. @param shrinkAbsorb iftrue
this glyph absorbs all remaining shrinkage at this and lower priority levels when it shrinks @param shrinkPriority the priority level of this glyph when it shrinks @param shrinkLeftLimit the maximum amount by which the left side of this glyph can shrink.(aMustpositivebenumber)non-negative. @param shrinkRightLimit the maximum amount by which the right side of this glyph can shrink.(aMustpostivebenumber)non-negative.
Returns an array of glyphcodes for the specified glyphs. The contents of this return value are meaningless to anything other than aClass GlyphVector, float[] getGlyphPositions(int, int, float[])Font
and can be used to ask theFont
about the existence of ligatures and other context sensitive information. This method is used for convenience and performance when processing glyphcodes. If no array is passed in an array is created. @param beginGlyphIndex the index into thisGlyphVector
at which to start retrieving glyphcodes for the corresponding glyphs @param numEntries theoffset from beginGlyphIndexnumberat whichof glyphs tostop retrieving glyphcodesretrieve @param codeReturn the array that receives the glyphcodes and is then returned @return an array of glyphcodes for the specified glyphs. @throws IllegalArgumentException ifnumEntries
is less than 0 @throws IndexOutOfBoundsException ifbeginGlyphIndex
is less than 0 @throws IndexOutOfBoundsException if the sum ofbeginGlyphIndex
andnumEntries
is greater than the number of glyphs in thisGlyphVector
Returns an array of glyph positions for the specified glyphs. The position of each glyph corresponds to the leading edge of the baseline for that glyph. This method is used for convenience and performance when processing glyph positions. If no array is passed in a new array is created. Even numbered array entries beginning with position zero are the X coordinates of the glyph numbered beginGlyphIndex + position/2. Odd numbered array entries beginning with position one are the Y coordinates of the glyph numbered beginGlyphIndex + (position-1)/2. IfbeginGlyphIndex
equals the number of of glyphs in thisGlyphVector
this method gets the position after the last glyph and this position is used to define the advance of the entireGlyphVector
. @param beginGlyphIndex the index at which to begin retrieving glyph positions @param numEntries theoffset from beginGlyphIndexnumberat whichof glyphs tostop retrieving glyph positionsretrieve @param positionReturn the array that receives the glyph positions and is then returned. @return an array of glyph positions specified bybeginGlyphIndex
andnumEntries
. @throws IllegalArgumentException ifnumEntries
is less than 0 @throws IndexOutOfBoundsException ifbeginGlyphIndex
is less than 0 @throws IndexOutOfBoundsException if the sum ofbeginGlyphIndex
andnumEntries
is greater than the number of glyphs in thisGlyphVector
plus one
Constructs aClass LineBreakMeasurer, constructor LineBreakMeasurer(AttributedCharacterIterator, FontRenderContext)LineBreakMeasurer
for the specified text. @param text the text for which thisLineBreakMeasurer
producesTextLayout
objects. The text must contain at least one character. If the text available throughiter
changes further calls to thisLineBreakMeasurer
instance are undefined (except in some cases wheninsertChar
ordeleteChar
are invoked afterward - see below). @param breakIter the BreakIterator which defines line breaks @param frcthecontainsFontRenderContextinformationinabout a graphics device which is needed to measure the textiscorrectly. Text measurements can vary slightly depending on the devicemeasuredresolution and attributes such as antialiasing. This parameter does not specify a translation between theLineBreakMeasurer
and user space. @see LineBreakMeasurer#insertChar @see LineBreakMeasurer#deleteChar
Constructs aClass LineBreakMeasurer, void deleteChar(AttributedCharacterIterator, int)LineBreakMeasurer
for the specified text. @param text the text for which thisLineBreakMeasurer
producesTextLayout
objects. The text must contain at least one character. If the text available throughiter
changes further calls to thisLineBreakMeasurer
instance are undefined (except in some cases wheninsertChar
ordeleteChar
are invoked afterward - see below). @param frcthecontainsFontRenderContextinformationinabout a graphics device which is needed to measure the textiscorrectly. Text measurements can vary slightly depending on the device resolutionmeasuredand attributes such as antialiasing. This parameter does not specify a translation between theLineBreakMeasurer
and user space. @see LineBreakMeasurer#insertChar @see LineBreakMeasurer#deleteChar
Updates this LineBreakMeasurer
after a single character is deleted from the text and sets the current position to the beginning of the paragraph. @param newParagraph the text after the deletion @param deletePos the position in the text at which the character is deleted @see #insertChar
Class LineBreakMeasurer, void insertChar(AttributedCharacterIterator, int)Updates this LineBreakMeasurer
after a single character is inserted into the text and sets the current position to the beginning of the paragraph. @param newParagraph the text after the insertion @param insertPos the position in the text at which the character is inserted @see #deleteChar
Class LineBreakMeasurer, TextLayout nextLayout(float)Returns the next layout and updates the current position. @paramClass LineBreakMeasurer, TextLayout nextLayout(float, int, boolean)maxAdvancewrappingWidth the maximum visible advance permitted for the text in the next layout @return aTextLayout
beginning at the current position which represents the next line fitting within.
maxAdvancewrappingWidth
Returns the next layout and updates the current position. @param wrappingWidth the maximum visible advance permitted for the text in the next layout @param offsetLimit the first character that can not be included in the next layout even if the text after the limit would fit within the wrapping width.Class LineBreakMeasurer, int nextOffset(float)offsetLimit
must be greater than the current position. @param requireNextWord iftrue
and if the entire word at the current position does not fit within the wrapping widthnull
is returned. Iffalse
a valid layout is returned that includes at least the character at the current position. @return aTextLayout
beginning at the current position that represents the next line fitting within. If the current position is at the end of the text used by this
maxAdvancewrappingWidthLineBreakMeasurer
null
is returned.
Returns the position at the end of the next layout. Does NOT update the current position of thisLineBreakMeasurer
. @parammaxAdvancewrappingWidth the maximum visible advance permitted for the text in the next layout @return an offset in the text representing the limit of the nextTextLayout
.
Constructs aClass TextLayout, constructor TextLayout(String, Font, FontRenderContext)TextLayout
from an iterator over styled text.The iterator must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm. @param text the styled text to display @param frc contains
theinformation about a graphics device which is needed tocorrectlymeasure the text correctly. Text measurements can vary slightly depending on the device resolution and attributes such as antialiasing. This parameter does not specify a translation between theTextLayout
and user space.
Constructs aClass TextLayout, constructor TextLayout(String, Map, FontRenderContext)TextLayout
from aString
and a Font All the text is styled using the specifiedFont
.The
String
must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm. @param str the text to display @param font aFont
used to style the text @param frc containstheinformation about a graphics device which is needed tocorrectlymeasure the text correctly. Text measurements can vary slightly depending on the device resolution and attributes such as antialiasing. This parameter does not specify a translation between theTextLayout
and user space.
Constructs aClass TextLayout, float[] getCaretInfo(TextHitInfo, Rectangle2D)TextLayout
from aString
and an attribute set.All the text is styled using the provided attributes.
string
must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm. @param str the text to display @param attributes the attributes used to style the text @param frc containstheinformation about a graphics device which is needed tocorrectlymeasure the text correctly. Text measurements can vary slightly depending on the device resolution and attributes such as antialiasing. This parameter does not specify a translation between theTextLayout
and user space.
Returns information about the caret corresponding tohit
. The first element of the array is the intersection of the caret with the baseline. The second element of the array is the inverse slope (run/rise) of the caret.This method is meant for informational use. To display carets it is better to use
getCaretShapes
. @param hit a hit on a character in thisTextLayout
@param bounds the bounds to which the caret info is constructed @return a two-element array containing the position and slope of the caret. @see #getCaretShapes(int Rectangle2D TextLayout.CaretPolicy) @see Font#getItalicAngle