本文整理匯總了C#中Server.Point2D.GetLine2D方法的典型用法代碼示例。如果您正苦於以下問題:C# Point2D.GetLine2D方法的具體用法?C# Point2D.GetLine2D怎麽用?C# Point2D.GetLine2D使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Point2D
的用法示例。
在下文中一共展示了Point2D.GetLine2D方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CompileSecondHand
protected virtual void CompileSecondHand(SuperGumpLayout layout, Point2D center)
{
layout.Add(
"clock/hand/second",
() =>
{
var sa = 2.0f * Math.PI * Time.Seconds / 60.0f;
var shp = center.Clone2D((int)(Radius * Math.Sin(sa)), (int)(-Radius * Math.Cos(sa)));
foreach (var p in center.GetLine2D(shp))
{
AddHtml(p.X, p.Y, 1, 1, " ".WrapUOHtmlBG(ColorSecondHand), false, false);
}
});
}
示例2: CompileMinuteHand
protected virtual void CompileMinuteHand(SuperGumpLayout layout, Point2D center)
{
layout.Add(
"clock/hand/minute",
() =>
{
var ma = 2.0f * Math.PI * (Time.Minutes + Time.Seconds / 60.0f) / 60.0f;
var mhp = center.Clone2D((int)(Radius * Math.Sin(ma)), (int)(-Radius * Math.Cos(ma)));
foreach (var p in center.GetLine2D(mhp))
{
AddHtml(p.X - 1, p.Y - 1, 3, 3, " ".WrapUOHtmlBG(ColorMinuteHand), false, false);
}
});
}
示例3: AppendTo
public override void AppendTo(IGumpWriter disp)
{
var first = true;
if (_Background)
{
disp.AppendLayout(_Layout1A);
disp.AppendLayout(_X);
disp.AppendLayout(_Y);
disp.AppendLayout(1417);
if (_BackgroundHue > 0)
{
disp.AppendLayout(_Layout1Hue);
disp.AppendLayoutNS(FixHue(_BackgroundHue));
}
first = false;
}
if (_Face)
{
disp.AppendLayout(first ? _Layout1A : _Layout1B);
disp.AppendLayout(_X + 33);
disp.AppendLayout(_Y + 33);
disp.AppendLayout(1210);
if (_FaceHue > 0)
{
disp.AppendLayout(_Layout1Hue);
disp.AppendLayoutNS(FixHue(_FaceHue));
}
first = false;
}
if (_Numbers)
{
for (var number = 1; number <= 12; number++)
{
AppendTo(disp, ref first, number, _NumbersColor);
}
}
var center = new Point2D(_X + 40, _Y + 40);
if (_Hours)
{
var ha = 2.0f * Math.PI * (_Time.Hour + _Time.Minute / 60.0f) / 12.0f;
var hl = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(ha) / 1.5f), (int)(-40 * Math.Cos(ha) / 1.5f)));
AppendTo(disp, ref first, hl, 3, _HoursColor);
}
if (_Minutes)
{
var ma = 2.0f * Math.PI * (_Time.Minute + _Time.Second / 60.0f) / 60.0f;
var ml = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(ma)), (int)(-40 * Math.Cos(ma))));
AppendTo(disp, ref first, ml, 3, _MinutesColor);
}
if (_Seconds)
{
var sa = 2.0f * Math.PI * _Time.Second / 60.0f;
var sl = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(sa)), (int)(-40 * Math.Cos(sa))));
AppendTo(disp, ref first, sl, 1, _SecondsColor);
}
if (first)
{
disp.AppendLayout(_Layout2A);
disp.AppendLayout(_X);
disp.AppendLayout(_Y);
disp.AppendLayout(Width);
disp.AppendLayout(Height);
disp.AppendLayout(Parent.Intern(" ".WrapUOHtmlBG(Color.Transparent)));
disp.AppendLayout(false);
disp.AppendLayout(false);
}
}
示例4: CompileHourHand
protected virtual void CompileHourHand(SuperGumpLayout layout, Point2D center)
{
layout.Add(
"clock/hand/hour",
() =>
{
var ha = 2.0f * Math.PI * (Time.Hours + Time.Minutes / 60.0f) / 12.0f;
var hhp = center.Clone2D((int)(Radius * Math.Sin(ha) / 1.5f), (int)(-Radius * Math.Cos(ha) / 1.5f));
foreach (var p in center.GetLine2D(hhp))
{
AddHtml(p.X - 1, p.Y - 1, 3, 3, " ".WrapUOHtmlBG(ColorHourHand), false, false);
}
});
}
示例5: Compile
public override string Compile()
{
var compiled = String.Empty;
if (_Background)
{
if (_BackgroundHue <= 0)
{
compiled += String.Format(_Format1A, _X, _Y, 1417);
}
else
{
compiled += String.Format(_Format1B, _X, _Y, 1417, FixHue(_BackgroundHue));
}
}
if (_Face)
{
if (_FaceHue <= 0)
{
compiled += String.Format(_Format1A, _X + 33, _Y + 33, 1210);
}
else
{
compiled += String.Format(_Format1B, _X + 33, _Y + 33, 1210, FixHue(_FaceHue));
}
}
if (_Numbers)
{
for (var number = 1; number <= 12; number++)
{
compiled += Compile(number, _NumbersColor);
}
}
var center = new Point2D(_X + 40, _Y + 40);
if (_Hours)
{
var ha = 2.0f * Math.PI * (_Time.Hour + _Time.Minute / 60.0f) / 12.0f;
var hl = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(ha) / 1.5f), (int)(-40 * Math.Cos(ha) / 1.5f)));
compiled += Compile(hl, 3, _HoursColor);
}
if (_Minutes)
{
var ma = 2.0f * Math.PI * (_Time.Minute + _Time.Second / 60.0f) / 60.0f;
var ml = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(ma)), (int)(-40 * Math.Cos(ma))));
compiled += Compile(ml, 3, _MinutesColor);
}
if (_Seconds)
{
var sa = 2.0f * Math.PI * _Time.Second / 60.0f;
var sl = center.GetLine2D(center.Clone2D((int)(40 * Math.Sin(sa)), (int)(-40 * Math.Cos(sa))));
compiled += Compile(sl, 1, _SecondsColor);
}
if (String.IsNullOrWhiteSpace(compiled))
{
compiled = String.Format(_Format2, _X, _Y, Width, Height, Parent.Intern(" ".WrapUOHtmlBG(Color.Transparent)));
}
return compiled;
}