MoonSharpでobj.setoptionのblendを描画へ反映

このコミットが含まれているのは:
routersys committed 2026-07-01 13:07:45 +09:00
1 親 6e3594eb01
コミット 947532f064
1ファイル変更
+7 -2
+7 -2
ファイルの表示
@@ -587,7 +587,7 @@ namespace LuaScript
double alpha = args.Count > 4 ? args[4].CastToNumber() ?? 1d : 1d;
double aspect = args.Count > 5 ? args[5].CastToNumber() ?? 0d : 0d;
_activeContext.AddDraw(new DrawCommand(ox, oy, oz, zoom, alpha, aspect, null, CurrentAntialias()));
_activeContext.AddDraw(new DrawCommand(ox, oy, oz, zoom, alpha, aspect, null, CurrentAntialias(), CurrentBlend()));
return DynValue.Void;
});
@@ -623,7 +623,7 @@ namespace LuaScript
_ => 1d,
};
_activeContext.AddDraw(new DrawCommand(0d, 0d, 0d, 1d, poly[20], 0d, poly, CurrentAntialias()));
_activeContext.AddDraw(new DrawCommand(0d, 0d, 0d, 1d, poly[20], 0d, poly, CurrentAntialias(), CurrentBlend()));
return DynValue.Void;
});
@@ -680,6 +680,11 @@ namespace LuaScript
? value.Number
: 1d;
private double CurrentBlend() =>
_options.TryGetValue("blend", out var value) && value.Type == DataType.Number
? value.Number
: 0d;
private void LoadFigure(string name, int color, double size, double line, double aspect)
{
int boundingSize = Math.Max(1, (int)Math.Round(size));