YukkuriMovieMaker.Player.Video.DrawDescription
Edit on GitHub

Last updated: July 23, 2026

AI 要約

定義

名前空間: YukkuriMovieMaker.Player.Video

アセンブリ: YukkuriMovieMaker.Plugin.dll

フレームの描画状態(位置・ズーム・回転・不透明度など)を保持するレコードです。

public record DrawDescription(Vector3 Draw, Vector2 CenterPoint, Vector2 Zoom, Vector3 Rotation, Matrix4x4 Camera, InterpolationMode ZoomInterpolationMode, double Opacity, bool Invert, ImmutableList<VideoEffectController> Controllers)

継承 System.Object → YukkuriMovieMaker.Player.Video.DrawDescription

注釈

IVideoEffectProcessor.Update の戻り値として使います。with 式で必要なプロパティーだけ変更してください。

public DrawDescription Update(EffectDescription effectDescription)
{
    return effectDescription.DrawDescription with
    {
        Opacity = effectDescription.DrawDescription.Opacity * 0.5
    };
}

GetCustomValue<T> / SetCustomValue<T> で任意の型の追加情報をエフェクト間で引き渡せます。

メソッド

名前 説明
GetCustomValue DrawDescriptionに格納されたカスタム値を取得します。
SetCustomValue DrawDescriptionにカスタム値を付加した新しいインスタンスを返します。

GetCustomValue

DrawDescriptionに格納されたカスタム値を取得します。

public T? GetCustomValue<T>(string name = "")

パラメーター

name System.String

戻り値

T?

注釈

値が存在しない場合は default(T) を返します。存在確認には TryGetCustomValue を使用してください。

SetCustomValue

DrawDescriptionにカスタム値を付加した新しいインスタンスを返します。

public DrawDescription SetCustomValue<T>(T value, string name = "") where T : notnull

パラメーター

value T

name System.String

注釈

レコード型なので元のインスタンスは変更されません。戻り値を使用してください。 複数のエフェクト間でカスタム値を受け渡すのに使います。name で同じ型の複数の値を区別できます。

プロパティー

名前 説明
CenterPoint System.Numerics.Vector2 回転・ズームの中心点(X・Y)を取得します。
Draw System.Numerics.Vector3 描画位置(X・Y・Z)を取得します。
Invert System.Boolean 色反転フラグを取得します。
Opacity System.Double 不透明度(0.0〜1.0)を取得します。
Rotation System.Numerics.Vector3 回転角(X・Y・Z、ラジアン)を取得します。
Zoom System.Numerics.Vector2 ズーム率(X・Y)を取得します。1.0が等倍です。

CenterPoint

回転・ズームの中心点(X・Y)を取得します。

public Vector2 CenterPoint { get; init; }

プロパティー値

System.Numerics.Vector2

Draw

描画位置(X・Y・Z)を取得します。

public Vector3 Draw { get; init; }

プロパティー値

System.Numerics.Vector3

Invert

色反転フラグを取得します。

public Boolean Invert { get; init; }

プロパティー値

System.Boolean

Opacity

不透明度(0.0〜1.0)を取得します。

public Double Opacity { get; init; }

プロパティー値

System.Double

Rotation

回転角(X・Y・Z、ラジアン)を取得します。

public Vector3 Rotation { get; init; }

プロパティー値

System.Numerics.Vector3

Zoom

ズーム率(X・Y)を取得します。1.0が等倍です。

public Vector2 Zoom { get; init; }

プロパティー値

System.Numerics.Vector2