parent
979133f314
commit
ee5aee20dc
|
@ -25,7 +25,7 @@ namespace Matrix_App.PregeneratedMods
|
||||||
|
|
||||||
[UiWidget]
|
[UiWidget]
|
||||||
[UiDescription(title: "Rotation", description: "Rotate counter-clock-wise, repeating the image where needed (at corners)")]
|
[UiDescription(title: "Rotation", description: "Rotate counter-clock-wise, repeating the image where needed (at corners)")]
|
||||||
private float rotation = 0.0f;
|
private int rotation = 0;
|
||||||
|
|
||||||
[UiWidget]
|
[UiWidget]
|
||||||
[UiDescription(title: "Skew X", description: "Skew the image on the x-axis")]
|
[UiDescription(title: "Skew X", description: "Skew the image on the x-axis")]
|
||||||
|
@ -41,8 +41,8 @@ namespace Matrix_App.PregeneratedMods
|
||||||
|
|
||||||
protected override void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b)
|
protected override void ColorFragment(in int x, in int y, in float u, in float v, in int frame, out float r, out float g, out float b)
|
||||||
{
|
{
|
||||||
var sint = MathF.Sin(rotation * MathF.PI * 2.0f);
|
var sint = MathF.Sin(rotation / 180.0f * MathF.PI);
|
||||||
var cost = MathF.Cos(rotation * MathF.PI * 2.0f);
|
var cost = MathF.Cos(rotation / 180.0f * MathF.PI);
|
||||||
|
|
||||||
var tx = x;
|
var tx = x;
|
||||||
var ty = y;
|
var ty = y;
|
||||||
|
|
|
@ -57,7 +57,8 @@ namespace Matrix_App.PregeneratedMods.reflection
|
||||||
Width = 360,
|
Width = 360,
|
||||||
Dock = DockStyle.Fill,
|
Dock = DockStyle.Fill,
|
||||||
Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
||||||
Value = value
|
Value = value,
|
||||||
|
Maximum = 1000
|
||||||
};
|
};
|
||||||
upDown.ValueChanged += (a, b) =>
|
upDown.ValueChanged += (a, b) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Matrix_App
|
||||||
Height = height;
|
Height = height;
|
||||||
Bits = new Int32[width * height];
|
Bits = new Int32[width * height];
|
||||||
BitsHandle = GCHandle.Alloc(Bits, GCHandleType.Pinned);
|
BitsHandle = GCHandle.Alloc(Bits, GCHandleType.Pinned);
|
||||||
Bitmap = new Bitmap(width, height, width * 4, PixelFormat.Format32bppPArgb, BitsHandle.AddrOfPinnedObject());
|
Bitmap = new Bitmap(width, height, width * 4, PixelFormat.Format32bppRgb, BitsHandle.AddrOfPinnedObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPixel(int x, int y, Color colour)
|
public void SetPixel(int x, int y, Color colour)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue