pyvista.TextProperty

目次

pyvista.TextProperty#

class TextProperty(
theme=None,
color=None,
font_family=None,
orientation=None,
font_size=None,
font_file=None,
shadow: bool = False,
justification_horizontal=None,
justification_vertical=None,
italic: bool = False,
bold: bool = False,
background_color=None,
background_opacity=None,
)[ソース]#

テキストのプロパティを定義します.

パラメータ:
themepyvista.plotting.themes.Theme, optional

Plot固有のテーマ.

colorpyvista.ColorLike, optional

文字列,RGBリスト,または16進カラー文字列.例: color='white'color='w'color=[1.0, 1.0, 1.0]color='#FFFFFF' .スカラーが指定されている場合,色は上書きされます.

font_familystr | None, optional

フォントファミリーまたは None .

orientationfloat, optional

テキストの向き(度単位).

font_sizeint, optional

フォントサイズ.

font_filestr, optional

フォントファイルのパス.

shadowbool, optional

影が有効か.

justification_horizontalstr, optional

テキストの水平方向の両端揃え. "left", "center", "right" のいずれかでなければなりません.

justification_verticalstr, optional

テキストの垂直方向の両端揃え. "bottom", "center", "top" のいずれかでなければなりません.

italicbool, default: False

タイトルとバーのラベルを斜体にします.

boldbool, default: True

タイトルとバーのラベルを太字にします.

background_colorpyvista.Color, optional

テキストの背景色.

background_opacitypyvista.Color, optional

テキストの背景不透明度.

テキストのプロパティを作成します.

>>> from pyvista import TextProperty
>>> prop = TextProperty()
>>> prop.opacity = 0.5
>>> prop.background_color = 'b'
>>> prop.background_opacity = 0.5
>>> prop.show_frame = True
>>> prop.frame_color = 'b'
>>> prop.frame_width = 10
>>> prop.frame_color
Color(name='blue', hex='#0000ffff', opacity=255)

メソッド

TextProperty.enable_shadow()

影を有効にします.

TextProperty.set_font_file(font_file)

フォントファイルを設定します.

TextProperty.shallow_copy(to_copy)

Create a shallow copy of the text's property.

アトリビュート

TextProperty.background_color

テキストのプロパティの背景色.

TextProperty.background_opacity

テキストのプロパティの背景不透明度.

TextProperty.bold

テキストのプロパティの太字.

TextProperty.color

テキストのプロパティの色.

TextProperty.font_family

フォントファミリー.

TextProperty.font_size

フォントサイズ.

TextProperty.frame_color

テキストプロパティのフレーム色.

TextProperty.frame_width

フレームの幅.

TextProperty.italic

テキストのイタリック体.

TextProperty.justification_horizontal

テキストの水平方向の両端揃え.

TextProperty.justification_vertical

テキストの垂直揃え.

TextProperty.opacity

テキストのプロパティの不透明度.

TextProperty.orientation

テキストの向き(度単位).

TextProperty.show_frame

フレームの表示.