Renamed Out to CurveOutline

This commit is contained in:
2026-06-13 21:18:55 +02:00
parent 1ab259d3f9
commit 035588e3db
15 changed files with 391 additions and 390 deletions

View File

@@ -6,22 +6,22 @@ namespace _2DGAMELIB
//outline/path/line basically represents a curve :3
[Serializable]
public class Out
public class CurveOutline
{
public List<Vector2D> ps = new List<Vector2D>();
public float Tension = 0.5f;
public bool Outline = true;
public Out()
public CurveOutline()
{
}
public Out(Out Out)
public CurveOutline(CurveOutline CurveOutline)
{
ps = new List<Vector2D>(Out.ps);
Tension = Out.Tension;
Outline = Out.Outline;
ps = new List<Vector2D>(CurveOutline.ps);
Tension = CurveOutline.Tension;
Outline = CurveOutline.Outline;
}
}
}

View File

@@ -286,7 +286,7 @@ namespace _2DGAMELIB
base_ = new ShapePart
{
Tag = Name + "_ベース",
InitializeOP = new Out[1] { Shas.GetSquare() },
InitializeOP = new CurveOutline[1] { Shas.GetSquare() },
PositionBase = Position,
SizeBase = Size,
SizeXBase = Width,
@@ -300,7 +300,7 @@ namespace _2DGAMELIB
frame1 = new ShapePart
{
Tag = Name + "_フレーム1",
InitializeOP = new Out[1] { Shas.GetSquare() },
InitializeOP = new CurveOutline[1] { Shas.GetSquare() },
PositionBase = Position,
SizeBase = Size,
SizeXBase = Width * GetWidthMag(),
@@ -315,7 +315,7 @@ namespace _2DGAMELIB
frame2 = new ShapePart
{
Tag = Name + "_フレーム2",
InitializeOP = new Out[1] { Shas.GetSquare() },
InitializeOP = new CurveOutline[1] { Shas.GetSquare() },
PositionBase = Position,
SizeBase = Size,
SizeXBase = Width * GetWidthMag(),
@@ -329,7 +329,7 @@ namespace _2DGAMELIB
gauge = new ShapePart
{
Tag = Name + "_ゲージ",
InitializeOP = new Out[1] { Shas.GetSquare() },
InitializeOP = new CurveOutline[1] { Shas.GetSquare() },
PositionBase = GetGaugePosition(),
SizeBase = Size,
SizeXBase = Width * GetWidthMag() * GetGaugeWidthMag(Margin),
@@ -343,7 +343,7 @@ namespace _2DGAMELIB
this.knob = new ShapePart
{
Tag = Name + "_ブ",
InitializeOP = new Out[1] { Shas.GetSquare() },
InitializeOP = new CurveOutline[1] { Shas.GetSquare() },
SizeBase = Size,
SizeXBase = GetKnobWidthMag(Width),
SizeYBase = GetKnobHeightMag(Height),

View File

@@ -48,7 +48,7 @@ namespace _2DGAMELIB
this.Are = Are;
this.Width = Width;
Out[] array = new Out[1] { Shas.GetSquare() };
CurveOutline[] array = new CurveOutline[1] { Shas.GetSquare() };
if (FramColor == Color.Empty || FramColor == Color.Transparent)
{
array.OutlineFalse();

View File

@@ -66,7 +66,7 @@ namespace _2DGAMELIB
private static void GetMinMaxX(ShapePart ShapePart, ref double MinX, ref double MaxX)
{
foreach (Out item in ShapePart.OP)
foreach (CurveOutline item in ShapePart.OP)
{
foreach (Vector2D p in item.ps)
{
@@ -85,7 +85,7 @@ namespace _2DGAMELIB
private static void GetMinMaxY(ShapePart ShapePart, ref double MinY, ref double MaxY)
{
foreach (Out item in ShapePart.OP)
foreach (CurveOutline item in ShapePart.OP)
{
foreach (Vector2D p in item.ps)
{

View File

@@ -17,7 +17,8 @@ namespace _2DGAMELIB
private static readonly RemappedTypeBinder Binder = new RemappedTypeBinder()
.Add("_2DGAMELIB.Par", typeof(ShapePart))
.Add("_2DGAMELIB.ParT", typeof(ShapePartT))
.Add("_2DGAMELIB.Pars", typeof(PartGroup));
.Add("_2DGAMELIB.Pars", typeof(PartGroup))
.Add("_2DGAMELIB.Out", typeof(CurveOutline));
private static BinaryFormatter NewFormatter()
{

View File

@@ -29,7 +29,7 @@ namespace _2DGAMELIB
public string Tag = "";
protected List<Out> op = new List<Out>();
protected List<CurveOutline> op = new List<CurveOutline>();
protected List<Joi> jp = new List<Joi>();
@@ -149,7 +149,7 @@ namespace _2DGAMELIB
public PartGroup Parent => parent;
public List<Out> OP
public List<CurveOutline> OP
{
get
{
@@ -165,7 +165,7 @@ namespace _2DGAMELIB
}
}
public IEnumerable<Out> InitializeOP
public IEnumerable<CurveOutline> InitializeOP
{
set
{
@@ -583,10 +583,10 @@ namespace _2DGAMELIB
protected void Copy(ShapePart ShapePart)
{
Tag = ShapePart.Tag;
op = new List<Out>(ShapePart.op.Count);
op = new List<CurveOutline>(ShapePart.op.Count);
for (int i = 0; i < ShapePart.op.Count; i++)
{
op.Add(new Out(ShapePart.op[i]));
op.Add(new CurveOutline(ShapePart.op[i]));
}
jp = new List<Joi>(ShapePart.jp.Count);
for (int j = 0; j < ShapePart.jp.Count; j++)
@@ -665,7 +665,7 @@ namespace _2DGAMELIB
Path.Reset();
OutlinePath.Reset();
foreach (Out item in op)
foreach (CurveOutline item in op)
{
points = new PointF[item.ps.Count];
for (int i = 0; i < item.ps.Count; i++)
@@ -766,7 +766,7 @@ namespace _2DGAMELIB
gph.Reset();
if (Closed)
{
foreach (Out item in op)
foreach (CurveOutline item in op)
{
psh = new PointF[item.ps.Count];
for (int i = 0; i < item.ps.Count; i++)
@@ -784,7 +784,7 @@ namespace _2DGAMELIB
return;
}
foreach (Out item2 in op)
foreach (CurveOutline item2 in op)
{
psh = new PointF[item2.ps.Count];
for (int j = 0; j < item2.ps.Count; j++)

View File

@@ -365,18 +365,18 @@ namespace _2DGAMELIB
{
Vector2D[] stringRectPoints = GetStringRectPoints(Unit, Graphics);
Out @out = new Out { Tension = 0f };
CurveOutline curveOutline = new CurveOutline { Tension = 0f };
Vector2D vector2D = DataConsts.Vec2DZero - stringRectPoints[0];
double x = 0.05;
double num = 0.025;
@out.ps.Add(stringRectPoints[0].AddY(-num) + vector2D);
@out.ps.Add(stringRectPoints[1].AddXY(x, -num) + vector2D);
@out.ps.Add(stringRectPoints[2].AddXY(x, num) + vector2D);
@out.ps.Add(stringRectPoints[3].AddY(num) + vector2D);
curveOutline.ps.Add(stringRectPoints[0].AddY(-num) + vector2D);
curveOutline.ps.Add(stringRectPoints[1].AddXY(x, -num) + vector2D);
curveOutline.ps.Add(stringRectPoints[2].AddXY(x, num) + vector2D);
curveOutline.ps.Add(stringRectPoints[3].AddY(num) + vector2D);
base.OP.Add(@out);
base.OP.Add(curveOutline);
}
public new void Dispose()
{

View File

@@ -38,27 +38,27 @@ namespace _2DGAMELIB
return Point;
}
public static void SetTension(this IEnumerable<Out> Out, float Tension)
public static void SetTension(this IEnumerable<CurveOutline> Out, float Tension)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
item.Tension = Tension;
}
}
public static void OutlineFalse(this IEnumerable<Out> Out)
public static void OutlineFalse(this IEnumerable<CurveOutline> Out)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
item.Outline = false;
}
}
public static Vector2D GetCenter(this IEnumerable<Out> Out)
public static Vector2D GetCenter(this IEnumerable<CurveOutline> Out)
{
double num = 0.0;
Vector2D vec2DZero = DataConsts.Vec2DZero;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
foreach (Vector2D p in item.ps)
{
@@ -81,10 +81,10 @@ namespace _2DGAMELIB
return vec2DZero / num;
}
public static void Rotation(this IEnumerable<Out> Out, Vector2D BP, double Angle)
public static void Rotation(this IEnumerable<CurveOutline> Out, Vector2D BP, double Angle)
{
MatrixD transform = Angle.ToRadian().RotationZ();
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -93,10 +93,10 @@ namespace _2DGAMELIB
}
}
public static void ScalingX(this IEnumerable<Out> Out, Vector2D BP, double Rate)
public static void ScalingX(this IEnumerable<CurveOutline> Out, Vector2D BP, double Rate)
{
double num = BP.X - BP.X * Rate;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -107,10 +107,10 @@ namespace _2DGAMELIB
}
}
public static void ScalingX(this IEnumerable<Out> Out, ref Vector2D BP, double Rate)
public static void ScalingX(this IEnumerable<CurveOutline> Out, ref Vector2D BP, double Rate)
{
double num = BP.X - BP.X * Rate;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -121,10 +121,10 @@ namespace _2DGAMELIB
}
}
public static void ScalingY(this IEnumerable<Out> Out, Vector2D BP, double Rate)
public static void ScalingY(this IEnumerable<CurveOutline> Out, Vector2D BP, double Rate)
{
double num = BP.Y - BP.Y * Rate;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -135,10 +135,10 @@ namespace _2DGAMELIB
}
}
public static void ScalingY(this IEnumerable<Out> Out, ref Vector2D BP, double Rate)
public static void ScalingY(this IEnumerable<CurveOutline> Out, ref Vector2D BP, double Rate)
{
double num = BP.Y - BP.Y * Rate;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -149,12 +149,12 @@ namespace _2DGAMELIB
}
}
public static void ScalingXY(this IEnumerable<Out> Out, Vector2D BP, double Rate)
public static void ScalingXY(this IEnumerable<CurveOutline> Out, Vector2D BP, double Rate)
{
Vector2D vector2D = default(Vector2D);
vector2D.X = BP.X - BP.X * Rate;
vector2D.Y = BP.Y - BP.Y * Rate;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -166,12 +166,12 @@ namespace _2DGAMELIB
}
}
public static void ScalingXY(this IEnumerable<Out> Out, ref Vector2D BP, double Rate)
public static void ScalingXY(this IEnumerable<CurveOutline> Out, ref Vector2D BP, double Rate)
{
Vector2D vector2D = default(Vector2D);
vector2D.X = BP.X - BP.X * Rate;
vector2D.Y = BP.Y - BP.Y * Rate;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -183,12 +183,12 @@ namespace _2DGAMELIB
}
}
public static void ScalingXY(this IEnumerable<Out> Out, Vector2D BP, double X, double Y)
public static void ScalingXY(this IEnumerable<CurveOutline> Out, Vector2D BP, double X, double Y)
{
Vector2D vector2D = default(Vector2D);
vector2D.X = BP.X - BP.X * X;
vector2D.Y = BP.Y - BP.Y * Y;
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -260,10 +260,10 @@ namespace _2DGAMELIB
}
}
public static void ReverseX(this List<Out> Out, ref Vector2D BP)
public static void ReverseX(this List<CurveOutline> Out, ref Vector2D BP)
{
double num = BP.X - (1.0 - BP.X);
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -276,10 +276,10 @@ namespace _2DGAMELIB
Out.Reverse();
}
public static void ReverseY(this List<Out> Out, Vector2D BP)
public static void ReverseY(this List<CurveOutline> Out, Vector2D BP)
{
double num = BP.Y - (1.0 - BP.Y);
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -292,10 +292,10 @@ namespace _2DGAMELIB
Out.Reverse();
}
public static void ReverseY(this List<Out> Out, ref Vector2D BP)
public static void ReverseY(this List<CurveOutline> Out, ref Vector2D BP)
{
double num = BP.Y - (1.0 - BP.Y);
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -326,9 +326,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionX(this List<Out> Out, Vector2D BP, double Rate)
public static void ExpansionX(this List<CurveOutline> Out, Vector2D BP, double Rate)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -339,9 +339,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionX(this List<Out> Out, ref Vector2D BP, double Rate)
public static void ExpansionX(this List<CurveOutline> Out, ref Vector2D BP, double Rate)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -352,9 +352,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionY(this List<Out> Out, Vector2D BP, double Rate)
public static void ExpansionY(this List<CurveOutline> Out, Vector2D BP, double Rate)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -365,9 +365,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionY(this List<Out> Out, ref Vector2D BP, double Rate)
public static void ExpansionY(this List<CurveOutline> Out, ref Vector2D BP, double Rate)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -378,9 +378,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionXY(this List<Out> Out, Vector2D BP, double Rate)
public static void ExpansionXY(this List<CurveOutline> Out, Vector2D BP, double Rate)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -389,9 +389,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionXY(this List<Out> Out, ref Vector2D BP, double Rate)
public static void ExpansionXY(this List<CurveOutline> Out, ref Vector2D BP, double Rate)
{
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
for (int i = 0; i < item.ps.Count; i++)
{
@@ -436,10 +436,10 @@ namespace _2DGAMELIB
}
}
public static IEnumerable<Vector2D> EnumPoints(this IEnumerable<Out> Out)
public static IEnumerable<Vector2D> EnumPoints(this IEnumerable<CurveOutline> Out)
{
HashSet<Vector2D> hs = new HashSet<Vector2D>();
foreach (Out item in Out)
foreach (CurveOutline item in Out)
{
foreach (Vector2D p in item.ps)
{
@@ -452,7 +452,7 @@ namespace _2DGAMELIB
}
}
public static Out GetTriangle()
public static CurveOutline GetTriangle()
{
MatrixD m120 = 120.0.ToRadian().RotationZ();
@@ -464,16 +464,16 @@ namespace _2DGAMELIB
Vector2D TP3 = Math.TransformCoordinateBP(TP1, new Vector2D(0.5, 0.5), m240);
return new Out
return new CurveOutline
{
Tension = 0f,
ps = { TP1, TP2, TP3 }
};
}
public static Out GetSquare()
public static CurveOutline GetSquare()
{
return new Out
return new CurveOutline
{
Tension = 0f,
ps = {

View File

@@ -204,7 +204,7 @@ namespace _2DGAMELIB
private void SetParT(string Name, ref Vector2D Position, double Size, double Width, double Height, Font Font, double TextSize, string Text, ref Color TextColor, ref Color ShadColor, ref Color BackColor)
{
_partGroup = new PartGroup();
Out[] array = new Out[1] { Shas.GetSquare() };
CurveOutline[] array = new CurveOutline[1] { Shas.GetSquare() };
array.OutlineFalse();
_shapePartT = new ShapePartT
{
@@ -231,7 +231,7 @@ namespace _2DGAMELIB
private void SetFeed(string Name, double Size, ref Color FeedColor)
{
Out[] array = new Out[1] { Shas.GetTriangle() };
CurveOutline[] array = new CurveOutline[1] { Shas.GetTriangle() };
feed = new ShapePart
{
Tag = Name + "_Feed",