本文整理汇总了C#中Vocaluxe.Lib.Draw.SColorF类的典型用法代码示例。如果您正苦于以下问题:C# SColorF类的具体用法?C# SColorF怎么用?C# SColorF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SColorF类属于Vocaluxe.Lib.Draw命名空间,在下文中一共展示了SColorF类的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: CBackground
public CBackground()
{
_ThemeLoaded = false;
_Theme = new SThemeBackground();
Color = new SColorF(0f, 0f, 0f, 1f);
}
示例3: SColorF
public SColorF(SColorF Color)
{
R = Color.R;
G = Color.G;
B = Color.B;
A = Color.A;
}
示例4: 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;
}
示例5: 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;
}
示例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: CLyric
public CLyric()
{
_Theme = new SThemeLyrics();
_ThemeLoaded = false;
Color = new SColorF();
ColorProcessed = new SColorF();
_X = 0f;
_Y = 0f;
_Z = 0f;
_MaxW = 1f;
_H = 1f;
_width = 1f;
_Notes = new List<SNote>();
_Text = new CText();
_Style = ELyricStyle.Slide;
}
示例8: CCursor
public CCursor(string textureName, SColorF color, float w, float h, float z)
{
_CursorFadingTimer = new Stopwatch();
ShowCursor = true;
_CursorTargetAlpha = 1f;
_CursorStartAlpha = 0f;
_CursorFadingTime = 0.5f;
_CursorName = textureName;
_Cursor = CDraw.AddTexture(CTheme.GetSkinFilePath(_CursorName));
_Cursor.color = color;
_Cursor.rect.W = w;
_Cursor.rect.H = h;
_Cursor.rect.Z = z;
_Movetimer = new Stopwatch();
}
示例9: 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;
}
示例10: ColorizeBitmap
public static Bitmap ColorizeBitmap(Bitmap original, SColorF color)
{
Bitmap newBitmap = new Bitmap(original.Width, original.Height);
Graphics g = Graphics.FromImage(newBitmap);
ColorMatrix cm = new ColorMatrix();
cm.Matrix33 = color.A;
cm.Matrix00 = color.R;
cm.Matrix11 = color.G;
cm.Matrix22 = color.B;
cm.Matrix44 = 1;
ImageAttributes ia = new ImageAttributes();
ia.SetColorMatrix(cm);
g.DrawImage(original, new Rectangle(0, 0, original.Width, original.Height),
0, 0, original.Width, original.Height, GraphicsUnit.Pixel, ia);
ia.Dispose();
g.Dispose();
return newBitmap;
}
示例11: DrawTexture
public void DrawTexture(STexture Texture, SRectF rect, SColorF color, float begin, float end)
{
}
示例12: DrawColor
public void DrawColor(SColorF color, SRectF rect)
{
}
示例13: DrawTextureReflection
public void DrawTextureReflection(STexture Texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
{
if (rect.W == 0f || rect.H == 0f || bounds.H == 0f || bounds.W == 0f || color.A == 0f || height <= 0f)
return;
if (bounds.X > rect.X + rect.W || bounds.X + bounds.W < rect.X)
return;
if (bounds.Y > rect.Y + rect.H || bounds.Y + bounds.H < rect.Y)
return;
if (height > bounds.H)
height = bounds.H;
if (_TextureExists(ref Texture))
{
GL.BindTexture(TextureTarget.Texture2D, Texture.ID);
float x1 = (bounds.X - rect.X) / rect.W * Texture.width_ratio;
float x2 = (bounds.X + bounds.W - rect.X) / rect.W * Texture.width_ratio;
float y1 = (bounds.Y - rect.Y + rect.H - height) / rect.H * Texture.height_ratio;
float y2 = (bounds.Y + bounds.H - rect.Y) / rect.H * Texture.height_ratio;
if (x1 < 0)
x1 = 0f;
if (x2 > Texture.width_ratio)
x2 = Texture.width_ratio;
if (y1 < 0)
y1 = 0f;
if (y2 > Texture.height_ratio)
y2 = Texture.height_ratio;
float rx1 = rect.X;
float rx2 = rect.X + rect.W;
float ry1 = rect.Y + rect.H + space;
float ry2 = rect.Y + rect.H + space + height;
if (rx1 < bounds.X)
rx1 = bounds.X;
if (rx2 > bounds.X + bounds.W)
rx2 = bounds.X + bounds.W;
if (ry1 < bounds.Y + space)
ry1 = bounds.Y + space;
if (ry2 > bounds.Y + bounds.H + space + height)
ry2 = bounds.Y + bounds.H + space + height;
GL.Enable(EnableCap.Blend);
GL.MatrixMode(MatrixMode.Texture);
GL.PushMatrix();
if (rect.Rotation != 0f)
{
GL.Translate(0.5f, 0.5f, 0);
GL.Rotate(-rect.Rotation, 0f, 0f, 1f);
GL.Translate(-0.5f, -0.5f, 0);
}
GL.Begin(BeginMode.Quads);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
GL.TexCoord2(x2, y2);
GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset);
GL.Color4(color.R, color.G, color.B, 0f);
GL.TexCoord2(x2, y1);
GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
GL.Color4(color.R, color.G, color.B, 0f);
GL.TexCoord2(x1, y1);
GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
GL.TexCoord2(x1, y2);
GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset);
GL.End();
GL.PopMatrix();
GL.Disable(EnableCap.Blend);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
}
示例14: DrawTexture
public void DrawTexture(STexture Texture, SRectF rect, SColorF color, SRectF bounds)
{
DrawTexture(Texture, rect, color, bounds, false);
}
示例15: 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);
}