Added more readable names for Are(RenderArea)
This commit is contained in:
@@ -3,7 +3,7 @@ using System.Drawing.Drawing2D;
|
||||
|
||||
namespace _2DGAMELIB
|
||||
{
|
||||
public class AreM : Are
|
||||
public class AreM : RenderArea
|
||||
{
|
||||
private double strength;
|
||||
|
||||
@@ -13,38 +13,38 @@ namespace _2DGAMELIB
|
||||
{
|
||||
SetXYRatio(XRatio, YRatio);
|
||||
base.Size = Size;
|
||||
unit = Unit;
|
||||
unitScale = Unit;
|
||||
strength = Strength;
|
||||
disUnit = Unit * DisMag;
|
||||
displayUnitScale = Unit * DisMag;
|
||||
double num = 1.0 - Strength;
|
||||
unitS = disUnit * num;
|
||||
unitS = displayUnitScale * num;
|
||||
|
||||
|
||||
WH.Width = (int)(base.LocalWidth * Unit);
|
||||
WH.Height = (int)(base.LocalHeight * Unit);
|
||||
WHA.Width = (int)(base.LocalWidth * disUnit);
|
||||
WHA.Height = (int)(base.LocalHeight * disUnit);
|
||||
Dis = new Bitmap((int)((double)WH.Width * DisMag * num), (int)((double)WH.Height * DisMag * num));
|
||||
gd = Graphics.FromImage(Dis);
|
||||
gd.SmoothingMode = SmoothingMode.None;
|
||||
gd.PixelOffsetMode = PixelOffsetMode.None;
|
||||
WHA.Width = (int)(base.LocalWidth * displayUnitScale);
|
||||
WHA.Height = (int)(base.LocalHeight * displayUnitScale);
|
||||
DisplayLayer = new Bitmap((int)((double)WH.Width * DisMag * num), (int)((double)WH.Height * DisMag * num));
|
||||
displayGraphics = Graphics.FromImage(DisplayLayer);
|
||||
displayGraphics.SmoothingMode = SmoothingMode.None;
|
||||
displayGraphics.PixelOffsetMode = PixelOffsetMode.None;
|
||||
|
||||
|
||||
hitUnit = Unit * HitMag;
|
||||
WHH.Width = (int)(base.LocalWidth * hitUnit);
|
||||
WHH.Height = (int)(base.LocalHeight * hitUnit);
|
||||
Hit = new Bitmap(WHH.Width, WHH.Height);
|
||||
gh = Graphics.FromImage(Hit);
|
||||
gh.SmoothingMode = SmoothingMode.None;
|
||||
gh.PixelOffsetMode = PixelOffsetMode.None;
|
||||
hitUnitScale = Unit * HitMag;
|
||||
WHH.Width = (int)(base.LocalWidth * hitUnitScale);
|
||||
WHH.Height = (int)(base.LocalHeight * hitUnitScale);
|
||||
HitLayer = new Bitmap(WHH.Width, WHH.Height);
|
||||
hitGraphics = Graphics.FromImage(HitLayer);
|
||||
hitGraphics.SmoothingMode = SmoothingMode.None;
|
||||
hitGraphics.PixelOffsetMode = PixelOffsetMode.None;
|
||||
}
|
||||
|
||||
public new void Draw(Pars Pars)
|
||||
{
|
||||
Pars.Draw(unitS, gd);
|
||||
if (gh != null)
|
||||
Pars.Draw(unitS, displayGraphics);
|
||||
if (hitGraphics != null)
|
||||
{
|
||||
Pars.DrawH(hitUnit, gh);
|
||||
Pars.DrawH(hitUnitScale, hitGraphics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user