テキスト

Inheritance: java.lang.Object, com.aspose.threed.A3DObject, com.aspose.threed.SceneObject, com.aspose.threed.Entity, com.aspose.threed.Profile

public class Text extends Profile

テキスト プロファイル、このプロファイルはフォントとテキストを使用して輪郭を記述します。 Example: 以下のコードは、指定されたフォントファイルを使用してテキストから 3D メッシュを作成する方法を示しています。

var font = FontFile.fromFile("CascadiaCode-Regular.otf");
             var text = new Text();
             text.setFont(font);
             text.setContent("ABC");
             text.setFontSize(10);
             var linear = new LinearExtrusion(text, 10).toMesh();
             var scene = new Scene(linear);
             scene.save("test.stl");

コンストラクタ

コンストラクタ説明
Text()

メソッド

メソッド説明
equals(Object arg0)
findProperty(String propertyName)プロパティを検索します。
getBoundingBox()現在のエンティティのオブジェクト空間座標系におけるバウンディングボックスを取得します。
getClass()
getContent()テキストの内容
getEntityRendererKey()レンダラーに登録されたエンティティレンダラーのキーを取得します
getExcluded()エクスポート時にこのエンティティを除外するかどうかを取得します。
getFont()テキストのフォント。
getFontSize()フォントサイズのスケール。
getName()名前を取得します。
getParentNode()最初の親ノードを取得します。最初の親ノードを設定すると、このエンティティは他の親ノードから切り離されます。
getParentNodes()すべての親ノードを取得します。エンティティはジオメトリインスタンシングのために複数の親ノードにアタッチできます。
getProperties()すべてのプロパティのコレクションを取得します。
getProperty(String property)指定されたプロパティの値を取得します
getScene()このオブジェクトが属するシーンを取得します
hashCode()
notify()
notifyAll()
removeProperty(Property property)動的プロパティを削除します。
removeProperty(String property)名前で識別される指定されたプロパティを削除します
setContent(String value)テキストの内容
setExcluded(boolean value)エクスポート時にこのエンティティを除外するかどうかを設定します。
setFont(FontFile value)テキストのフォント。
setFontSize(float value)フォントサイズのスケール。
setName(String value)名前を設定します。
setParentNode(Node value)最初の親ノードを設定します。最初の親ノードを設定すると、このエンティティは他の親ノードから切り離されます。
setProperty(String property, Object value)指定されたプロパティの値を設定します
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

Text()

public Text()

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

パラメーター説明
arg0java.lang.Object

Returns: boolean

findProperty(String propertyName)

public Property findProperty(String propertyName)

プロパティを検索します。動的プロパティ(CreateDynamicProperty/SetProperty により作成)またはネイティブプロパティ(名前で識別)になる可能性があります。

Parameters:

パラメーター説明
propertyNamejava.lang.Stringプロパティ名。

Returns: Property - The property.

getBoundingBox()

public BoundingBox getBoundingBox()

現在のエンティティのオブジェクト空間座標系におけるバウンディングボックスを取得します。

Returns: BoundingBox - the bounding box of current entity in its object space coordinate system. Example: The following code shows how to calculate the bounding box of a shape

Entity entity = new Sphere();
     entity.setRadius(10);
     var bbox = entity.getBoundingBox();
     System.out.printf("The bounding box of the entity is %s ~ %s", bbox.getMinimum(), bbox.getMaximum());

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getContent()

public String getContent()

テキストの内容

Returns: java.lang.String - テキストの内容 Example: 以下のコードは、指定されたフォントファイルを使用してテキストから 3D メッシュを作成する方法を示しています。

var font = FontFile.fromFile("CascadiaCode-Regular.otf");
             var text = new Text();
             text.setFont(font);
             text.setContent("ABC");
             text.setFontSize(10);
             var linear = new LinearExtrusion(text, 10).toMesh();
             var scene = new Scene(linear);
             scene.save("test.stl");

getEntityRendererKey()

public EntityRendererKey getEntityRendererKey()

レンダラーに登録されたエンティティレンダラーのキーを取得します

Returns: EntityRendererKey

getExcluded()

public boolean getExcluded()

エクスポート時にこのエンティティを除外するかどうかを取得します。

Returns: boolean - エクスポート時にこのエンティティを除外するかどうか。

getFont()

public FontFile getFont()

テキストのフォント。

Returns: FontFile - The font of the text. Example: The following code shows how to create a 3D mesh from text using specified font file.

var font = FontFile.fromFile("CascadiaCode-Regular.otf");
             var text = new Text();
             text.setFont(font);
             text.setContent("ABC");
             text.setFontSize(10);
             var linear = new LinearExtrusion(text, 10).toMesh();
             var scene = new Scene(linear);
             scene.save("test.stl");

getFontSize()

public float getFontSize()

フォントサイズのスケール。

Returns: float - フォントサイズのスケール。 Example: 以下のコードは、指定されたフォントファイルを使用してテキストから 3D メッシュを作成する方法を示しています。

var font = FontFile.fromFile("CascadiaCode-Regular.otf");
             var text = new Text();
             text.setFont(font);
             text.setContent("ABC");
             text.setFontSize(10);
             var linear = new LinearExtrusion(text, 10).toMesh();
             var scene = new Scene(linear);
             scene.save("test.stl");

getName()

public String getName()

名前を取得します。

Returns: java.lang.String - 名前です。

getParentNode()

public Node getParentNode()

最初の親ノードを取得します。最初の親ノードを設定すると、このエンティティは他の親ノードから切り離されます。

Returns: Node - the first parent node, if set the first parent node, this entity will be detached from other parent nodes.

getParentNodes()

public ArrayList<Node> getParentNodes()

すべての親ノードを取得します。エンティティはジオメトリインスタンシングのために複数の親ノードにアタッチできます。

Returns: java.util.ArrayList<com.aspose.threed.Node> - すべての親ノード、エンティティはジオメトリ インスタンシングのために複数の親ノードにアタッチできます

getProperties()

public PropertyCollection getProperties()

すべてのプロパティのコレクションを取得します。

Returns: PropertyCollection - the collection of all properties.

getProperty(String property)

public Object getProperty(String property)

指定されたプロパティの値を取得します

Parameters:

パラメーター説明
プロパティjava.lang.Stringプロパティ名

Returns: java.lang.Object - 見つかったプロパティの値

getScene()

public Scene getScene()

このオブジェクトが属するシーンを取得します

Returns: Scene - the scene that this object belongs to

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeProperty(Property property)

public boolean removeProperty(Property property)

動的プロパティを削除します。

Parameters:

パラメーター説明
propertyProperty削除するプロパティ

Returns: boolean - プロパティが正常に削除された場合は true

removeProperty(String property)

public boolean removeProperty(String property)

名前で識別される指定されたプロパティを削除します

Parameters:

パラメーター説明
プロパティjava.lang.String削除するプロパティ

Returns: boolean - プロパティが正常に削除された場合は true

setContent(String value)

public void setContent(String value)

テキストの内容

Parameters:

パラメーター説明
java.lang.String
var font = FontFile.fromFile("CascadiaCode-Regular.otf");
             var text = new Text();
             text.setFont(font);
             text.setContent("ABC");
             text.setFontSize(10);
             var linear = new LinearExtrusion(text, 10).toMesh();
             var scene = new Scene(linear);
             scene.save("test.stl");
``` |

### setExcluded(boolean value) {#setExcluded-boolean-}

public void setExcluded(boolean value)



エクスポート時にこのエンティティを除外するかどうかを設定します。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| 値 | boolean | 新しい値 |

### setFont(FontFile value) {#setFont-com.aspose.threed.FontFile-}

public void setFont(FontFile value)



テキストのフォント。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
|  | value | [FontFile](../../com.aspose.threed/fontfile) | 新しい値 **Example:** 以下のコードは、指定されたフォントファイルを使用してテキストから 3D メッシュを作成する方法を示しています。 |

var font = FontFile.fromFile(“CascadiaCode-Regular.otf”); var text = new Text(); text.setFont(font); text.setContent(“ABC”); text.setFontSize(10); var linear = new LinearExtrusion(text, 10).toMesh(); var scene = new Scene(linear); scene.save(“test.stl”);


### setFontSize(float value) {#setFontSize-float-}

public void setFontSize(float value)



フォントサイズのスケール。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
|  | 値 | float | 新しい値 **Example:** 以下のコードは、指定されたフォントファイルを使用してテキストから 3D メッシュを作成する方法を示しています。 |

var font = FontFile.fromFile(“CascadiaCode-Regular.otf”); var text = new Text(); text.setFont(font); text.setContent(“ABC”); text.setFontSize(10); var linear = new LinearExtrusion(text, 10).toMesh(); var scene = new Scene(linear); scene.save(“test.stl”);


### setName(String value) {#setName-java.lang.String-}

public void setName(String value)



名前を設定します。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| 値 | java.lang.String | 新しい値 |

### setParentNode(Node value) {#setParentNode-com.aspose.threed.Node-}

public void setParentNode(Node value)



最初の親ノードを設定します。最初の親ノードを設定すると、このエンティティは他の親ノードから切り離されます。

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| value | [Node](../../com.aspose.threed/node) | 新しい値 |

### setProperty(String property, Object value) {#setProperty-java.lang.String-java.lang.Object-}

public void setProperty(String property, Object value)



指定されたプロパティの値を設定します

**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| プロパティ | java.lang.String | プロパティ名 |
| 値 | java.lang.Object | プロパティの値 |

### toString() {#toString--}

public String toString()





**Returns:**
java.lang.String
### wait() {#wait--}

public final void wait()





### wait(long arg0) {#wait-long-}

public final void wait(long arg0)





**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}

public final void wait(long arg0, int arg1)





**Parameters:**
| パラメーター | 型 | 説明 |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |