Bug fixes II.

Ready for presentation
This commit is contained in:
Sven Vogel 2021-07-06 14:40:41 +02:00
parent 979133f314
commit ee5aee20dc
7 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,7 @@ namespace Matrix_App.PregeneratedMods
[UiWidget]
[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]
[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)
{
var sint = MathF.Sin(rotation * MathF.PI * 2.0f);
var cost = MathF.Cos(rotation * MathF.PI * 2.0f);
var sint = MathF.Sin(rotation / 180.0f * MathF.PI);
var cost = MathF.Cos(rotation / 180.0f * MathF.PI);
var tx = x;
var ty = y;

View File

@ -57,7 +57,8 @@ namespace Matrix_App.PregeneratedMods.reflection
Width = 360,
Dock = DockStyle.Fill,
Anchor = AnchorStyles.Top | AnchorStyles.Right,
Value = value
Value = value,
Maximum = 1000
};
upDown.ValueChanged += (a, b) =>
{

View File

@ -23,7 +23,7 @@ namespace Matrix_App
Height = height;
Bits = new Int32[width * height];
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)