当前位置: 首页>>代码示例>>C#>>正文


C# Draw.SColorF类代码示例

本文整理汇总了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;
        }
开发者ID:bohning,项目名称:Vocaluxe,代码行数:27,代码来源:CText.cs

示例2: CBackground

 public CBackground()
 {
     _ThemeLoaded = false;
     _Theme = new SThemeBackground();
     
     Color = new SColorF(0f, 0f, 0f, 1f);
 }
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:7,代码来源:CBackground.cs

示例3: SColorF

 public SColorF(SColorF Color)
 {
     R = Color.R;
     G = Color.G;
     B = Color.B;
     A = Color.A;
 }
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:7,代码来源:IDraw.cs

示例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;
        }
开发者ID:HansMaiser,项目名称:Vocaluxe,代码行数:16,代码来源:CStatic.cs

示例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;
        }
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:16,代码来源:CStatic.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: 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;
        }
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:18,代码来源:CLyric.cs

示例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();
        }
开发者ID:bohning,项目名称:Vocaluxe,代码行数:18,代码来源:CGraphics.cs

示例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;
        }
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:19,代码来源:CButton.cs

示例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;
        }
开发者ID:zhaozw,项目名称:Vocaluxe,代码行数:24,代码来源:CDrawWinForm.cs

示例11: DrawTexture

 public void DrawTexture(STexture Texture, SRectF rect, SColorF color, float begin, float end)
 {
 }
开发者ID:zhaozw,项目名称:Vocaluxe,代码行数:3,代码来源:CDrawWinForm.cs

示例12: DrawColor

 public void DrawColor(SColorF color, SRectF rect)
 {
 }
开发者ID:zhaozw,项目名称:Vocaluxe,代码行数:3,代码来源:CDrawWinForm.cs

示例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);
            }
        }
开发者ID:stsundermann,项目名称:Vocaluxe,代码行数:90,代码来源:COpenGL.cs

示例14: DrawTexture

 public void DrawTexture(STexture Texture, SRectF rect, SColorF color, SRectF bounds)
 {
     DrawTexture(Texture, rect, color, bounds, false);
 }
开发者ID:stsundermann,项目名称:Vocaluxe,代码行数:4,代码来源:COpenGL.cs

示例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);
        }
开发者ID:hessbe,项目名称:Vocaluxe,代码行数:42,代码来源:CSingNotes.cs


注:本文中的Vocaluxe.Lib.Draw.SColorF类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。