本文整理汇总了C#中Vocaluxe.Lib.Draw.SRectF类的典型用法代码示例。如果您正苦于以下问题:C# SRectF类的具体用法?C# SRectF怎么用?C# SRectF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SRectF类属于Vocaluxe.Lib.Draw命名空间,在下文中一共展示了SRectF类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:bohning,项目名称:Vocaluxe,代码行数:27,代码来源:CText.cs
示例2: SRectF
public SRectF(SRectF rect)
{
X = rect.X;
Y = rect.Y;
W = rect.W;
H = rect.H;
Z = rect.Z;
Rotation = 0f;
}
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:9,代码来源:IDraw.cs
示例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;
}
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:16,代码来源:CStatic.cs
示例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;
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:16,代码来源:CStatic.cs
示例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;
}
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:47,代码来源:CSongMenuTileBoard.cs
示例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;
}
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:17,代码来源:CEqualizer.cs
示例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;
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:19,代码来源:CButton.cs
示例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);
}
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:19,代码来源:CObjectInteractions.cs
示例9: DrawColor
private void DrawColor()
{
SRectF bounds = new SRectF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH, CSettings.zFar/4);
CDraw.DrawColor(Color, bounds);
}
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:6,代码来源:CBackground.cs
示例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);
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:52,代码来源:CSingNotes.cs
示例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);
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:42,代码来源:CSingNotes.cs
示例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);
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:30,代码来源:CSingNotes.cs
示例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;
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:77,代码来源:CMenu.cs
示例14: DrawTextureReflection
public void DrawTextureReflection(STexture Texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
{
}
开发者ID:zhaozw,项目名称:Vocaluxe,代码行数:3,代码来源:CDrawWinForm.cs
示例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();
}
}
开发者ID:zhaozw,项目名称:Vocaluxe,代码行数:9,代码来源:CDrawWinForm.cs
示例16: DrawColor
public void DrawColor(SColorF color, SRectF rect)
{
}
开发者ID:zhaozw,项目名称:Vocaluxe,代码行数:3,代码来源:CDrawWinForm.cs
示例17: AddGoldenNote
private void AddGoldenNote(SRectF Rect, int n, int Nr)
{
AddGoldenNote(Rect, n, Nr, 1f);
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:4,代码来源:CSingNotes.cs
示例18: AddPerfectNote
private void AddPerfectNote(SRectF Rect, int n)
{
AddPerfectNote(Rect, n, 1f);
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:4,代码来源:CSingNotes.cs
示例19: _GetDistance90
private float _GetDistance90(KeyEvent Key, SRectF actualRect, SRectF targetRect)
{
PointF source = new PointF(actualRect.X + actualRect.W / 2f, actualRect.Y + actualRect.H / 2f);
PointF dest = new PointF(targetRect.X + targetRect.W / 2f, targetRect.Y + targetRect.H / 2f);
PointF vector = new PointF(dest.X - source.X, dest.Y - source.Y);
float distance = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y);
bool inDirection = false;
switch (Key.Key)
{
case Keys.Up:
if (vector.Y < 0f && (vector.Y <= vector.X && vector.X <= 0 || -vector.Y >= vector.X && vector.X >= 0f))
inDirection = true;
break;
case Keys.Down:
if (vector.Y > 0f && (vector.Y >= vector.X && vector.X >= 0 || vector.Y >= -vector.X && vector.X <= 0f))
inDirection = true;
break;
case Keys.Left:
if (vector.X < 0f && (vector.X <= vector.Y && vector.Y <= 0 || -vector.X >= vector.Y && vector.Y >= 0f))
inDirection = true;
break;
case Keys.Right:
if (vector.X > 0f && (vector.X >= vector.Y && vector.Y >= 0 || vector.X >= -vector.Y && vector.Y <= 0f))
inDirection = true;
break;
default:
break;
}
if (!inDirection)
return float.MaxValue;
else
return distance;
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:38,代码来源:CMenu.cs
示例20: _GetRect
private SRectF _GetRect(int interaction)
{
SRectF Result = new SRectF();
switch (_Interactions[interaction].Type)
{
case EType.TButton:
return _Buttons[_Interactions[interaction].Num].Rect;
case EType.TSelectSlide:
return _SelectSlides[_Interactions[interaction].Num].Rect;
case EType.TStatic:
return _Statics[_Interactions[interaction].Num].Rect;
case EType.TText:
return _Texts[_Interactions[interaction].Num].Bounds;
case EType.TSongMenu:
return _SongMenus[_Interactions[interaction].Num].Rect;
case EType.TLyric:
return _Lyrics[_Interactions[interaction].Num].Rect;
}
return Result;
}
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:26,代码来源:CMenu.cs
注:本文中的Vocaluxe.Lib.Draw.SRectF类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论