Going back to the canvas thing

This commit is contained in:
Lani Aung
2021-12-12 13:49:19 -07:00
parent 720b387dd3
commit 262bce4549
20 changed files with 3623 additions and 537 deletions
+5 -5
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using fxl.codes.kisekae.Entities;
namespace fxl.codes.kisekae.Models
@@ -10,14 +11,13 @@ namespace fxl.codes.kisekae.Models
Mark = celConfig.Mark;
Fix = celConfig.Fix;
ZIndex = zIndex;
Image = Convert.ToBase64String(celConfig.Render.Image);
Image = $"data:image/gif;base64,{Convert.ToBase64String(celConfig.Render.Image)}";
Height = celConfig.Cel.Height;
Width = celConfig.Cel.Width;
Opacity = (double)(255 - celConfig.Transparency) / 255;
foreach (var position in celConfig.Positions) InitialPositions[position.Set] = new CoordinateModel(position.X, position.Y);
Offset = new CoordinateModel(celConfig.Cel.OffsetX, celConfig.Cel.OffsetY);
foreach (var position in celConfig.Positions) InitialPositions.Add(position.Set, new CoordinateModel(position.X, position.Y));
}
public int Fix { get; set; }
@@ -27,7 +27,7 @@ namespace fxl.codes.kisekae.Models
public double Opacity { get; set; }
public int Width { get; set; }
public int ZIndex { get; set; }
public CoordinateModel[] InitialPositions { get; set; } = new CoordinateModel[10];
public IDictionary<int, CoordinateModel> InitialPositions { get; set; } = new Dictionary<int, CoordinateModel>();
public CoordinateModel Offset { get; set; }
}
}