MoonSharpでobj.setoptionのblendを描画へ反映
このコミットが含まれているのは:
1ファイル変更
+7
-2
@@ -587,7 +587,7 @@ namespace LuaScript
|
|||||||
double alpha = args.Count > 4 ? args[4].CastToNumber() ?? 1d : 1d;
|
double alpha = args.Count > 4 ? args[4].CastToNumber() ?? 1d : 1d;
|
||||||
double aspect = args.Count > 5 ? args[5].CastToNumber() ?? 0d : 0d;
|
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;
|
return DynValue.Void;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ namespace LuaScript
|
|||||||
_ => 1d,
|
_ => 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;
|
return DynValue.Void;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -680,6 +680,11 @@ namespace LuaScript
|
|||||||
? value.Number
|
? value.Number
|
||||||
: 1d;
|
: 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)
|
private void LoadFigure(string name, int color, double size, double line, double aspect)
|
||||||
{
|
{
|
||||||
int boundingSize = Math.Max(1, (int)Math.Round(size));
|
int boundingSize = Math.Max(1, (int)Math.Round(size));
|
||||||
|
|||||||
新しいイシューから参照
ユーザーをブロックする