obj.drawをネイティブエンジンへ対応

このコミットが含まれているのは:
routersys committed 2026-06-29 08:16:51 +09:00
1 親 90fe288f66
コミット 3ba77aab18
9ファイル変更
+96 -16

検索条件に一致するファイルはありません

+15
ファイルの表示
@@ -447,6 +447,7 @@ namespace LuaScript
(tag, frame) => ctx.ResolveObject(tag, frame, out var info) ? info : null,
NativeLoadFigure,
(name, args) => ctx.AddEffect(new AviUtlEffectRequest(name, args)),
ctx.AddDraw,
out bool dirty, out bool bufferReplaced, out byte[]? newPixels,
out int resultW, out int resultH, out string? error);
@@ -459,6 +460,8 @@ namespace LuaScript
NativeFieldMap.FromFields(_nativeFields, ctx);
bool hasDraws = ctx.DrawCommands.Count > 0;
if (dirty)
{
int outW = bufferReplaced ? resultW : imgW;
@@ -471,6 +474,12 @@ namespace LuaScript
ctx.ReplaceBuffer(outPixels, outW, outH);
}
if (hasDraws)
{
ctx.SetResolvedBuffer(outPixels, outW, outH);
return true;
}
_pixelManager!.WritePixelsToOutput(outPixels, outW, outH);
if (bufferReplaced)
effectOutput = _pixelManager.GetTransformOutput(-outW / 2f, -outH / 2f);
@@ -479,6 +488,12 @@ namespace LuaScript
return true;
}
if (hasDraws)
{
ctx.SetResolvedBuffer(buffer, imgW, imgH);
return false;
}
effectOutput = null;
return false;
}