このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


Interface XTextLayout
Language

The 解放する/自由な and Open 生産性 控訴
解放(する)d: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: 星/主役にする :: (判決などを)下すing ::

interface XTextLayout
Description
This is the central interface for text layouting.

This is the central interface for text-関係のある 仕事s more 複雑にするd than simple string (判決などを)下すing. 公式文書,認める that all query methods are 支配する to the 現在の layout 明言する/公表する of this 反対する. That is, calls to 正当化する() or applyLogicalAdvancements() are likely to change その後の 生産(高) of those query methods.

類似の to XCanvasFont, all 測定s and 調整するs 受託するd and returned by this interface are 親族 to the font's 地元の 調整する system (which only equals 装置 調整する space, if the 連合させるd (判決などを)下す 変形 used during text 生産(高) is the 身元 変形). Conversely, if the 連合させるd 変形 used during text 生産(高) is not the 身元 変形, all 測定s returned by this interface should be 支配するd to that 変形, to 産する/生じる values in 装置 調整する space. Depending on the underlying font 科学(工学)技術, actual 装置 生産(高) might be off by up to one 装置 pixel from the transformed metrics.

Since
OOo 2.0

Methods' 要約
queryTextShapes 抽出する the polygonal 形態/調整s of the layouted text. 
queryInkMeasures Query the 署名/調印する bounding boxes for every glyph in the layouted text. 
queryMeasures Query the 論理(学)の bounding boxes of every character in the given text string. 
queryLogicalAdvancements Query the 進歩s for every character in the input string. 
applyLogicalAdvancements 適用する explicit 進歩s for every character in the layout string. 
queryTextBounds Query the 全体にわたる bounding box of the text. 
正当化する 正当化する the text to the given size. 
combinedJustify 正当化する a number of text layouts to the given size. 
getTextHit This method 決定するs the 攻撃する,衝突する position in the text. 
getCaret This method 変えるs an insertion 索引 to a caret. 
getNextInsertionIndex This method calculates a new insertion 索引. 
queryVisualHighlighting This method 生成するs a 最高潮の場面 polygon. 
queryLogicalHighlighting This method 生成するs a 最高潮の場面 polygon. 
getBaselineOffset This method 産する/生じるs the baseline 相殺する. 
getMainTextDirection This method returns the main 令状ing direction. 
getFont Request the associated font for this layout..  
getText Request the text this layout 含む/封じ込めるs.  
Methods' 詳細(に述べる)s
queryTextShapes
sequence< XPolyPolygon2D >
queryTextShapes();

Description
抽出する the polygonal 形態/調整s of the layouted text.

Each glyph is 代表するd by a separate XPolyPolygon2D in the returned sequence.

Returns
a sequence of XPolyPolygon2D in font 調整する space, one for every glyph.
queryInkMeasures
sequence< ::com::sun::星/主役にする::geometry::RealRectangle2D >
queryInkMeasures();

Description
Query the 署名/調印する bounding boxes for every glyph in the layouted text.

署名/調印する, or tight bounding boxes in this 事例/患者 means that for e.g. an 'a', the bounding box for the XPolyPolygon2D 述べるing the glyph 'a' is returned, not the 論理(学)の dimensions of the character in the font.

Returns
a sequence of rectangles in font 調整する space, 明示するing the bounds, one for every glyph.
See also
XTextLayout::queryMeasures()
queryMeasures
sequence< ::com::sun::星/主役にする::geometry::RealRectangle2D >
queryMeasures();

Description
Query the 論理(学)の bounding boxes of every character in the given text string.

論理(学)の bounding boxes means the space that the font 配分するs for the given character, which, e.g. for a '.', might be 意味ありげに broader than the bounds returned 経由で XTextLayout::queryInkMeasures().

Returns
a sequence of rectangles 明示するing the bounds in font 調整する space, one for every glyph.
See also
XTextLayout::queryInkMeasures()
queryLogicalAdvancements
sequence< 二塁打 >
queryLogicalAdvancements();

Description
Query the 進歩s for every character in the input string.

This method returns a sequence of 進歩s, one for each character in the input string (not for every glyph. There might be 多重の glyphs per input character, or 多重の input characters per glyph). 追加するing up all 進歩s 産する/生じるs the total 進歩 of this layout. To manipulate the layout of a string on the level of characters, this method can be used to query for the layout's default 進歩s, which can subsequently be changed and 適用するd to the layout 経由で XTextLayout::applyLogicalAdvancements().

Returns
a sequence of ::二塁打 明示するing the 進歩s per character in font 調整する space.
See also
XTextLayout::applyLogicalAdvancements()
applyLogicalAdvancements
無効の
applyLogicalAdvancements( [in] sequence< 二塁打 >  aAdvancements )
raises( ::com::sun::星/主役にする::lang::IllegalArgumentException );

Description
適用する explicit 進歩s for every character in the layout string.

This method 適用するs the 明示するd 進歩s to every 論理(学)の character in the input string (not for every glyph. There might be 多重の glyphs per input character, or 多重の input characters per glyph). This is useful to explicitely manipulate the exact 生産(高) positions of characters, e.g. 親族 to a 言及/関連 生産(高) 装置.

Parameter aAdvancements
A sequence of character 進歩s, in font 調整する space.
Throws
com::sun::星/主役にする::lang::IllegalArgumentException if the size of aAdvancements does not match the number of characters in the text.
See also
XTextLayout::queryLogicalAdvancements()
queryTextBounds
::com::sun::星/主役にする::geometry::RealRectangle2D
queryTextBounds();

Description
Query the 全体にわたる bounding box of the text.

This method is 類似の to XTextLayout::queryTextMeasures, only that the 全体にわたる bounds are returned by this method.

Returns
the 全体にわたる bounding box for the given layout, in font 調整する space.
正当化する
二塁打
正当化する( [in] 二塁打  nSize )
raises( ::com::sun::星/主役にする::lang::IllegalArgumentException );

Description
正当化する the text to the given size.

This method is the 核心 of the XTextLayout interface, because it layouts the text in a typographically 訂正する way into the 利用できる space.

Parameter nSize
The requested size of the text after justification (either width or 高さ, depending on the 令状ing 方式). This parameter is 解釈する/通訳するd in font 調整する space.
Returns
the actual size of the text after the justification in the font 調整する space. Depending on the font and the script type, this might be somewhat different from the size requested. If the requested size was smaller than the justification algorithm could compress the text, this value might even be 意味ありげに larger than nSize.
Throws
com::sun::星/主役にする::lang::IllegalArgumentException if nSize is 0 or 消極的な.
combinedJustify
二塁打
combinedJustify( [in] sequence< XTextLayout >  aNextLayouts,
[in] 二塁打  nSize )
raises( ::com::sun::星/主役にする::lang::IllegalArgumentException );

Description
正当化する a number of text layouts to the given size.

This method can be used to 連合させる the layout of a text line into a 選び出す/独身 justification run. This is e.g. useful if the line consists of several text 部分s (e.g. because of different fonts or colors), but it is 望ましい to spread the 利用できる space more globally across the different layout 反対するs. If, for example, one layout 反対する 含む/封じ込めるs 意味ありげに more whitespace or Kashidas than the 残り/休憩(する), this method can 割り当てる 比例して more space to this layout 反対する.

Parameter aNextLayouts
A sequence of layouts に引き続いて this one in 論理(学)の text order.
Parameter nSize
The requested size of the text for all XTextLayouts after justification in font 調整する space (either width or 高さ, depending on the 令状ing 方式).
Returns
the actual size of the text after the justification, in font 調整する space. Depending on the font and the script type, this might be somewhat different from the size requested. If the requested size was smaller than the justification algorithm could compress the text, this value might even be 意味ありげに larger than nSize.
Throws
com::sun::星/主役にする::lang::IllegalArgumentException if one of the parameters are not in the valid 範囲.
getTextHit
TextHit
getTextHit( [in] ::com::sun::星/主役にする::geometry::RealPoint2D  aHitPoint );

Description
This method 決定するs the 攻撃する,衝突する position in the text.

This method 決定するs the 索引 of the character 攻撃する,衝突する at the 明示するd position (in font 調整する space).

Parameter aHitPoint
The position in font 調整する space to 決定する the underlying character 索引 for.
getCaret
Caret
getCaret( [in] long  nInsertionIndex,
[in] boolean  bExcludeLigatures )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
This method 変えるs an insertion 索引 to a caret.

This method 生成するs caret (警察などへの)密告,告訴(状) for a given insertion point in the layout text.

Parameter nInsertionIndex
The insertion 索引, as e.g. returned by XTextLayout::getTextHit(). This value must be in the 範囲 0 up to the number of characters in the string.
Parameter bExcludeLigatures
始める,決める this to true, to skip the positions inside ligatures as valid caret placements. That means, on cannot e.g. 始める,決める the caret between the 'f' and the 'i' in a 'fi' ligature.
Returns
the 生成するd Caret structure.
Throws
com::sun::星/主役にする::lang::IndexOutOfBoundsException if nInsertionIndex is outside the permissible 範囲.
getNextInsertionIndex
long
getNextInsertionIndex( [in] long  nStartIndex,
[in] long  nCaretAdvancement,
[in] boolean  bExcludeLigatures )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
This method calculates a new insertion 索引.

This method calculates a new insertion 索引, given a start 索引 and the number of characters to skip. This is most useful for caret traveling.

Parameter nStartIndex
The insertion 索引 to start from.
Parameter nCaretAdvancement
For values greater than 0, the caret is visually moved to the 権利. For values smaller than 0, the caret is visually moved to the left.
Returns
the new insertion 索引.
Throws
com::sun::星/主役にする::lang::IndexOutOfBoundsException if nStartIndex or nCaretAdvancement is outside the permissible 範囲.
queryVisualHighlighting
XPolyPolygon2D
queryVisualHighlighting( [in] long  nStartIndex,
[in] long  nEndIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
This method 生成するs a 最高潮の場面 polygon.

This method 生成するs a 最高潮の場面ing polygon from two insertion indices. This polygon will be visually continuous, i.e. will not have 非,不,無-最高潮の場面d text in between.

Parameter nStartIndex
Start of the 選択 範囲.
Parameter nEndIndex
End of the 選択 範囲.
Returns
the 最高潮の場面 polygon in the font 調整する space.
Throws
com::sun::星/主役にする::lang::IndexOutOfBoundsException if nStartIndex or nEndIndex are outside the permissible 範囲.
queryLogicalHighlighting
XPolyPolygon2D
queryLogicalHighlighting( [in] long  nStartIndex,
[in] long  nEndIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
This method 生成するs a 最高潮の場面 polygon.

This method 生成するs a 最高潮の場面ing polygon from two insertion indices. This polygon will not always be visually continuous, if e.g. the text direction changes in the middle of the 選択, the might be parts visually between start and end position that are not selected.

Parameter nStartIndex
Start of the 選択 範囲.
Parameter nEndIndex
End of the 選択 範囲.
Returns
the 最高潮の場面 polygon in the font 調整する space.
Throws
com::sun::星/主役にする::lang::IndexOutOfBoundsException if nStartIndex or nEndIndex are outside the permissible 範囲.
getBaselineOffset
二塁打
getBaselineOffset();

Description
This method 産する/生じるs the baseline 相殺する.

This method returns the baseline 相殺する for this layout 反対する, either 手段d from the 最高の,を越す or the left 辛勝する/優位, depending on the 令状ing direction (horizontally or vertically). Since (判決などを)下すing this layout 経由で XCanvas::drawTextLayout() 生産(高)s 親族 to the layout 反対する's baseline, this method can be used to e.g. 生産(高) 親族 to the left, 最高の,を越す 辛勝する/優位.

Returns
the distance of the main baseline from the 最高の,を越す or the left 辛勝する/優位 of this 反対する, depending on the 令状ing direction.
getMainTextDirection
byte
getMainTextDirection();

Description
This method returns the main 令状ing direction.

This method returns the main 令状ing direction of this layout, i.e. either LEFT_TO_RIGHT or RIGHT_TO_LEFT.

Returns
the main text direction of this layout.
getFont
XCanvasFont
getFont();

Description
Request the associated font for this layout..
Returns
the associated font for this layout.
getText
StringContext
getText();

Description
Request the text this layout 含む/封じ込めるs.
Returns
the text this layout 含む/封じ込めるs.
最高の,を越す of Page

Apache Software Foundation

Copyright & License | Privacy | 接触する Us | 寄付する | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are 登録(する)d trademarks of The Apache ソフトウェア 創立/基礎. The Apache feather logo is a trademark of The Apache ソフトウェア 創立/基礎. Other 指名するs appearing on the 場所/位置 may be trademarks of their 各々の owners.