removed Vector2D_2
This commit is contained in:
@@ -97,9 +97,9 @@ namespace _2DGAMELIB
|
||||
if (!string.IsNullOrEmpty(_shapePartT.Text))
|
||||
{
|
||||
_shapePartT.SetRectSize(new Vector2D(Width, 10.0));
|
||||
Vector2D_2 stringRect = _shapePartT.GetStringRect(Are.DisplayUnitScale, Are.DisplayGraphics);
|
||||
double x = ((stringRect.v2.X > Min) ? stringRect.v2.X : Min) + 0.07;
|
||||
_shapePartT.SetRectSize(new Vector2D(x, stringRect.v2.Y));
|
||||
double[] stringRect = _shapePartT.GetStringRect(Are.DisplayUnitScale, Are.DisplayGraphics);
|
||||
double x = ((stringRect[2] > Min) ? stringRect[2] : Min) + 0.07;
|
||||
_shapePartT.SetRectSize(new Vector2D(x, stringRect[3]));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -107,7 +107,6 @@ namespace _2DGAMELIB
|
||||
_shapePartT.SetRectSize(new Vector2D(x2, Min));
|
||||
}
|
||||
|
||||
|
||||
_shapePartT.GetOP()[0].ps[0] = new Vector2D(0.0, 0.0);
|
||||
_shapePartT.GetOP()[0].ps[1] = new Vector2D(_shapePartT.GetRectSize().X, 0.0);
|
||||
_shapePartT.GetOP()[0].ps[2] = new Vector2D(_shapePartT.GetRectSize().X, _shapePartT.GetRectSize().Y);
|
||||
|
||||
@@ -6,8 +6,6 @@ namespace _2DGAMELIB
|
||||
//TODO: Find a better name...
|
||||
public class ManagedArea : RenderArea
|
||||
{
|
||||
private double strength;
|
||||
|
||||
private double unitS;
|
||||
|
||||
public ManagedArea(double Unit, double XRatio, double YRatio, double Size, double DisMag, double HitMag, double Strength) :
|
||||
@@ -16,7 +14,6 @@ namespace _2DGAMELIB
|
||||
SetXYRatio(XRatio, YRatio);
|
||||
base.Size = Size;
|
||||
unitScale = Unit;
|
||||
strength = Strength;
|
||||
displayUnitScale = Unit * DisMag;
|
||||
double num = 1.0 - Strength;
|
||||
unitS = displayUnitScale * num;
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace _2DGAMELIB
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2D_2 GetStringRect(double Unit, Graphics Graphics)
|
||||
public double[] GetStringRect(double Unit, Graphics Graphics)
|
||||
{
|
||||
double num = Unit * base.GetSize();
|
||||
|
||||
@@ -264,7 +264,6 @@ namespace _2DGAMELIB
|
||||
EditF = false;
|
||||
EditTS = false;
|
||||
}
|
||||
|
||||
CharacterRange[] crr = new CharacterRange[]{
|
||||
new CharacterRange(0, Text.Length)
|
||||
};
|
||||
@@ -281,17 +280,20 @@ namespace _2DGAMELIB
|
||||
.MeasureCharacterRanges(Text ?? string.Empty, font, layoutRect, stringformat)[0]
|
||||
.GetBounds(Graphics);
|
||||
|
||||
return new Vector2D_2(
|
||||
new Vector2D(bounds.X / num, bounds.Y / num),
|
||||
new Vector2D(bounds.Width / num, bounds.Height / num));
|
||||
return new double[4]{
|
||||
bounds.X / num,
|
||||
bounds.Y / num,
|
||||
bounds.Width / num,
|
||||
bounds.Height / num
|
||||
};
|
||||
}
|
||||
|
||||
public Vector2D[] GetStringRectPoints(double Unit, Graphics Graphics)
|
||||
{
|
||||
Vector2D_2 stringRect = GetStringRect(Unit, Graphics);
|
||||
double[] stringRect = GetStringRect(Unit, Graphics);
|
||||
|
||||
Vector2D pos = stringRect.v1;
|
||||
Vector2D size = stringRect.v2;
|
||||
Vector2D pos = new Vector2D(stringRect[0], stringRect[1]);
|
||||
Vector2D size = new Vector2D(stringRect[2], stringRect[3]);
|
||||
|
||||
size.X *= 1.07f;
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
|
||||
|
||||
namespace _2DGAMELIB
|
||||
{
|
||||
[Serializable]
|
||||
public struct Vector2D_2
|
||||
{
|
||||
public Vector2D v1;
|
||||
|
||||
public Vector2D v2;
|
||||
|
||||
public Vector2D_2(Vector2D v1, Vector2D v2)
|
||||
{
|
||||
this.v1 = v1;
|
||||
this.v2 = v2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,8 @@ namespace SlaveMatrix
|
||||
|
||||
private void SetButPos()
|
||||
{
|
||||
yp.SetPositionBase(new Vector2D(yp.GetPositionBase().X, Mai.ShapePartT.ToGlobal(Mai.ShapePartT.GetStringRect(Are.UnitScale, Are.DisplayGraphics).v2).Y + 0.0025));
|
||||
double[] rect = Mai.ShapePartT.GetStringRect(Are.UnitScale, Are.DisplayGraphics);
|
||||
yp.SetPositionBase(new Vector2D(yp.GetPositionBase().X, Mai.ShapePartT.ToGlobal(new Vector2D(rect[2], rect[3])).Y + 0.0025));
|
||||
np.SetPositionBase(new Vector2D(np.GetPositionBase().X, yp.ToGlobal(yp.GetOP().Last().ps.Last()).Y + 0.0025));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user