本文整理汇总了C#中Vocaluxe.Lib.Draw.SRectF类的典型用法代码示例。如果您正苦于以下问题:C# SRectF类的具体用法?C# SRectF怎么用?C# SRectF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SRectF类属于Vocaluxe.Lib.Draw命名空间,在下文中一共展示了SRectF类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CText
public CText()
{
_Theme = new SThemeText();
_ThemeLoaded = false;
_ButtonText = false;
X = 0f;
Y = 0f;
Z = 0f;
Height = 1f;
MaxWidth = 0f;
Bounds = new SRectF();
Align = EAlignment.Left;
Style = EStyle.Normal;
Fon = "Normal";
Color = new SColorF();
SColor = new SColorF();
Reflection = false;
ReflectionSpace = 0f;
ReflectionHeight = 0f;
Text = String.Empty;
Selected = false;
Visible = true;
Alpha = 1f;
}
示例2: SRectF
public SRectF(SRectF rect)
{
X = rect.X;
Y = rect.Y;
W = rect.W;
H = rect.H;
Z = rect.Z;
Rotation = 0f;
}
示例3: CStatic
public CStatic(CStatic s)
{
_Theme = new SThemeStatic();
_ThemeLoaded = false;
_Texture = s.Texture;
Color = new SColorF(s.Color);
Rect = new SRectF(s.Rect);
Reflection = s.Reflection;
ReflectionSpace = s.ReflectionHeight;
ReflectionHeight = s.ReflectionSpace;
Selected = s.Selected;
Alpha = s.Alpha;
Visible = s.Visible;
}
示例4: CStatic
public CStatic(STexture texture, SColorF color, SRectF rect)
{
_Theme = new SThemeStatic();
_ThemeLoaded = false;
_Texture = texture;
Color = color;
Rect = rect;
Reflection = false;
ReflectionSpace = 0f;
ReflectionHeight = 0f;
Selected = false;
Alpha = 1f;
Visible = true;
}
示例5: Init
public override void Init()
{
base.Init();
_Rect = _Theme.songMenuTileBoard.TileRect;
_NumW = _Theme.songMenuTileBoard.numW;
_NumH = _Theme.songMenuTileBoard.numH;
_SpaceW = _Theme.songMenuTileBoard.spaceW;
_SpaceH = _Theme.songMenuTileBoard.spaceH;
_PendingTime = 100L;
_TileW = (int)((_Theme.songMenuTileBoard.TileRect.W - _SpaceW * (_NumW - 1)) / _NumW);
_TileH = (int)((_Theme.songMenuTileBoard.TileRect.H - _SpaceH * (_NumH - 1)) / _NumH);
_CoverTexture = CTheme.GetSkinTexture(_Theme.CoverBackgroundName);
_CoverBigTexture = CTheme.GetSkinTexture(_Theme.CoverBigBackgroundName);
_Tiles = new List<CStatic>();
for (int i = 0; i < _NumH; i++)
{
for (int j = 0; j < _NumW; j++)
{
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRect.X + j * (_TileW + _SpaceW),
_Theme.songMenuTileBoard.TileRect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
CStatic tile = new CStatic(_CoverTexture, Color, rect);
_Tiles.Add(tile);
}
}
_ScrollRect = new SRectF(0, 0, CSettings.iRenderW, CSettings.iRenderH, _Theme.songMenuTileBoard.TileRect.Z);
_PreviewSelected = -1;
_Offset = 0;
_CoverBig = _Theme.songMenuTileBoard.StaticCoverBig;
_TextBG = _Theme.songMenuTileBoard.StaticTextBG;
_DuetIcon = _Theme.songMenuTileBoard.StaticDuetIcon;
_VideoIcon = _Theme.songMenuTileBoard.StaticVideoIcon;
_MedleyCalcIcon = _Theme.songMenuTileBoard.StaticMedleyCalcIcon;
_MedleyTagIcon = _Theme.songMenuTileBoard.StaticMedleyTagIcon;
_Artist = _Theme.songMenuTileBoard.TextArtist;
_Title = _Theme.songMenuTileBoard.TextTitle;
_SongLength = _Theme.songMenuTileBoard.TextSongLength;
}
示例6: CEqualizer
public CEqualizer()
{
_Theme = new SThemeEqualizer();
_ThemeLoaded = false;
Rect = new SRectF();
Color = new SColorF();
MaxColor = new SColorF();
Selected = false;
Visible = true;
ScreenHandles = false;
Reflection = false;
ReflectionSpace = 0f;
ReflectionHeight = 0f;
}
示例7: CButton
public CButton()
{
_Theme = new SThemeButton();
Rect = new SRectF();
Color = new SColorF();
SColor = new SColorF();
Text = new CText();
Selected = false;
Visible = true;
Reflection = false;
ReflectionSpace = 0f;
ReflectionHeight = 0f;
SReflection = false;
SReflectionSpace = 0f;
SReflectionHeight = 0f;
}
示例8: Init
protected virtual void Init()
{
_Interactions = new List<CInteraction>();
_Selection = 0;
_Statics = new List<CStatic>();
_Texts = new List<CText>();
_Buttons = new List<CButton>();
_SelectSlides = new List<CSelectSlide>();
_PrevMouseX = 0;
_PrevMouseY = 0;
_MouseDX = 0;
_MouseDY = 0;
Active = false;
_ScreenArea = new SRectF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH, 0f);
}
示例9: DrawColor
private void DrawColor()
{
SRectF bounds = new SRectF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH, CSettings.zFar/4);
CDraw.DrawColor(Color, bounds);
}
示例10: DrawToneHelper
private void DrawToneHelper(int n, int BaseLine, float XOffset)
{
int TonePlayer = CSound.RecordGetToneAbs(_PlayerNotes[n].PlayerNr);
SRectF Rect = _PlayerNotes[n].Rect;
while (TonePlayer - BaseLine < 0)
TonePlayer += 12;
while (TonePlayer - BaseLine > 12)
TonePlayer -= 12;
if (XOffset < 0f)
XOffset = 0f;
if (XOffset > Rect.W)
XOffset = Rect.W;
float dy = Rect.H / (CSettings.NumNoteLines);
SRectF rect = new SRectF(
Rect.X - dy + XOffset,
Rect.Y + dy * (CSettings.NumNoteLines - 1 - (TonePlayer - BaseLine) / 2f),
dy,
dy,
Rect.Z
);
SColorF color = new SColorF(
_PlayerNotes[n].Color.R,
_PlayerNotes[n].Color.G,
_PlayerNotes[n].Color.B,
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
STexture ToneHelper = CTheme.GetSkinTexture(_Theme.SkinToneHelperName);
CDraw.DrawTexture(ToneHelper, rect, color);
while (TonePlayer - BaseLine < 12)
TonePlayer += 12;
while (TonePlayer - BaseLine > 24)
TonePlayer -= 12;
rect = new SRectF(
Rect.X - dy + XOffset,
Rect.Y + dy * (CSettings.NumNoteLines - 1 - (TonePlayer - BaseLine) / 2f),
dy,
dy,
Rect.Z
);
CDraw.DrawTexture(ToneHelper, rect, color);
}
示例11: DrawNoteBG
private void DrawNoteBG(SRectF Rect, SColorF Color, float factor, Stopwatch Timer)
{
const int spacing = 0;
const float period = 1.5f; //[s]
if (!Timer.IsRunning)
Timer.Start();
if (Timer.ElapsedMilliseconds / 1000f > period)
{
Timer.Reset();
Timer.Start();
}
float alpha = (float)((Math.Cos((Timer.ElapsedMilliseconds / 1000f) / period * Math.PI * 2) + 1) / 2.0) / 2f + 0.5f;
float d = (1f - factor) / 2 * Rect.H;
float dw = d;
if (2 * dw > Rect.W)
dw = Rect.W / 2;
SRectF r = new SRectF(
Rect.X + dw + spacing,
Rect.Y + d + spacing,
Rect.W - 2 * dw - 2 * spacing,
Rect.H - 2 * d - 2 * spacing,
Rect.Z
);
STexture NoteBackgroundBegin = CTheme.GetSkinTexture(_Theme.SkinBackgroundLeftName);
STexture NoteBackgroundMiddle = CTheme.GetSkinTexture(_Theme.SkinBackgroundMiddleName);
STexture NoteBackgroundEnd = CTheme.GetSkinTexture(_Theme.SkinBackgroundRightName);
float dx = NoteBackgroundBegin.width * r.H / NoteBackgroundBegin.height;
if (2 * dx > r.W)
dx = r.W / 2;
SColorF col = new SColorF(Color.R, Color.G, Color.B, Color.A * alpha);
CDraw.DrawTexture(NoteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col);
CDraw.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col);
CDraw.DrawTexture(NoteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col);
}
示例12: DrawNote
private void DrawNote(SRectF Rect, SColorF Color, float factor)
{
const int spacing = 0;
float d = (1f - factor) / 2 * Rect.H;
float dw = d;
if (2 * dw > Rect.W)
dw = Rect.W / 2;
SRectF r = new SRectF(
Rect.X + dw + spacing,
Rect.Y + d + spacing,
Rect.W - 2 * dw - 2 * spacing,
Rect.H - 2 * d - 2 * spacing,
Rect.Z
);
STexture NoteBegin = CTheme.GetSkinTexture(_Theme.SkinLeftName);
STexture NoteMiddle = CTheme.GetSkinTexture(_Theme.SkinMiddleName);
STexture NoteEnd = CTheme.GetSkinTexture(_Theme.SkinRightName);
float dx = NoteBegin.width * r.H / NoteBegin.height;
if (2 * dx > r.W)
dx = r.W / 2;
CDraw.DrawTexture(NoteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), Color);
CDraw.DrawTexture(NoteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), Color);
CDraw.DrawTexture(NoteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), Color);
}
示例13: _GetNextElement
private int _GetNextElement(KeyEvent Key, out float Distance, out int Stage)
{
Distance = float.MaxValue;
int min = _Selection;
SRectF actualRect = _GetRect(_Selection);
Stage = int.MaxValue;
for (int i = 0; i < _Interactions.Count; i++)
{
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
{
SRectF targetRect = _GetRect(i);
float dist = _GetDistance90(Key, actualRect, targetRect);
if (dist >= 0f && dist < Distance)
{
Distance = dist;
min = i;
Stage = 10;
}
}
}
if (min == _Selection)
{
for (int i = 0; i < _Interactions.Count; i++)
{
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
{
SRectF targetRect = _GetRect(i);
float dist = _GetDistance180(Key, actualRect, targetRect);
if (dist >= 0f && dist < Distance)
{
Distance = dist;
min = i;
Stage = 20;
}
}
}
}
if (min == _Selection)
{
switch (Key.Key)
{
case Keys.Up:
actualRect = new SRectF(actualRect.X, CSettings.iRenderH, 1, 1, actualRect.Z);
break;
case Keys.Down:
actualRect = new SRectF(actualRect.X, 0, 1, 1, actualRect.Z);
break;
case Keys.Left:
actualRect = new SRectF(CSettings.iRenderW, actualRect.Y, 1, 1, actualRect.Z);
break;
case Keys.Right:
actualRect = new SRectF(0, actualRect.Y, 1, 1, actualRect.Z);
break;
default:
break;
}
for (int i = 0; i < _Interactions.Count; i++)
{
if (i != _Selection && !_Interactions[i].ThemeEditorOnly && _IsVisible(i))
{
SRectF targetRect = _GetRect(i);
float dist = _GetDistance180(Key, actualRect, targetRect);
if (dist >= 0f && dist < Distance)
{
Distance = dist;
min = i;
Stage = 30;
}
}
}
}
return min;
}
示例14: DrawTextureReflection
public void DrawTextureReflection(STexture Texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
{
}
示例15: DrawTexture
public void DrawTexture(STexture Texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored)
{
if ((Texture.index >= 0) && (_Textures.Count > 0) && (_Bitmaps.Count > Texture.index))
{
Bitmap ColoredBitmap = ColorizeBitmap(_Bitmaps[Texture.index], color);
_g.DrawImage(ColoredBitmap, new RectangleF(rect.X, rect.Y, rect.W, rect.H));
ColoredBitmap.Dispose();
}
}