• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ColorBGRA类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ColorBGRA的典型用法代码示例。如果您正苦于以下问题:C# ColorBGRA类的具体用法?C# ColorBGRA怎么用?C# ColorBGRA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ColorBGRA类属于命名空间,在下文中一共展示了ColorBGRA类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AutoWalker

        static AutoWalker()
        {
            GameID = DateTime.Now.Ticks + ""+RandomString(10);
            newPF = MainMenu.GetMenu("AB").Get<CheckBox>("newPF").CurrentValue;
            NavGraph=new NavGraph(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "EloBuddy\\AutoBuddyPlus"));
            PfNodes=new List<Vector3>();
            color = new ColorBGRA(79, 219, 50, 255);
            MyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsAlly);
            EneMyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsEnemy);
            EnemyLazer =
                ObjectManager.Get<Obj_AI_Turret>().FirstOrDefault(tur => !tur.IsAlly && tur.GetLane() == Lane.Spawn);
            myHero = ObjectManager.Player;
            initSummonerSpells();

            Target = ObjectManager.Player.Position;
            Orbwalker.DisableMovement = false;

            Orbwalker.DisableAttacking = false;
            Game.OnUpdate += Game_OnUpdate;
            Orbwalker.OverrideOrbwalkPosition = () => Target;
            if (Orbwalker.HoldRadius > 130 || Orbwalker.HoldRadius < 80)
            {
                Chat.Print("=================WARNING=================", Color.Red);
                Chat.Print("Your hold radius value in orbwalker isn't optimal for AutoBuddy", Color.Aqua);
                Chat.Print("Please set hold radius through menu=>Orbwalker");
                Chat.Print("Recommended values: Hold radius: 80-130, Delay between movements: 100-250");
            }
            
            Drawing.OnDraw += Drawing_OnDraw;
            
            Core.DelayAction(OnEndGame, 20000);
            updateItems();
            oldOrbwalk();
            Game.OnTick += OnTick;
        }
开发者ID:tryller,项目名称:elobuddy,代码行数:35,代码来源:AutoWalker.cs


示例2: WeaponDpsSettings

 public WeaponDpsSettings()
 {
     Enable = true;
     FontColor = new ColorBGRA(254, 192, 118, 255);
     DamageFontSize = new RangeNode<int>(20, 10, 50);
     FontSize = new RangeNode<int>(13, 10, 50);
 }
开发者ID:TomTer,项目名称:PoeHud,代码行数:7,代码来源:WeaponDpsSettings.cs


示例3: Drawing_OnDraw

 private static void Drawing_OnDraw(EventArgs args)
 {
     if (Util.MyHero.IsDead) { return; }
     if (Menu.GetCheckBoxValue("Disable")) { return; }
     var target = TargetSelector.Target;
     if (Menu.GetCheckBoxValue("Enemy.Target") && target != null)
     {
         Circle.Draw(Color.Red, 120f, 1, target.Position);
     }
     target = TargetSelector.Ally;
     if (Menu.GetCheckBoxValue("Ally.Target") && target != null)
     {
         Circle.Draw(Color.Blue, 120f, 1, target.Position);
     }
     var color = new ColorBGRA(255, 255, 255, 100);
     if (Menu.GetCheckBoxValue("Q") && SpellSlot.Q.IsReady())
     {
         Circle.Draw(color, SpellManager.Q.Range, Util.MyHero.Position);
     }
     if (Menu.GetCheckBoxValue("W") && SpellSlot.W.IsReady())
     {
         Circle.Draw(color, SpellManager.W.Range, Util.MyHero.Position);
     }
     if (Menu.GetCheckBoxValue("E") && SpellSlot.E.IsReady())
     {
         Circle.Draw(color, SpellManager.E.Range, Util.MyHero.Position);
     }
     if (Menu.GetCheckBoxValue("R") && SpellSlot.R.IsReady())
     {
         Circle.Draw(color, SpellManager.R.Range, Util.MyHero.Position);
     }
 }
开发者ID:mezer123,项目名称:EloBuddy,代码行数:32,代码来源:DrawManager.cs


示例4: Initialize

        internal static void Initialize()
        {
            var manaBarItem = new MenuItem("DrawManaBarIndicator", "Draw Combo ManaBar Indicator").SetValue(true);
            Program.DrawMenu.AddItem(manaBarItem);

            DxLine = new Line(DxDevice) { Width = 4 };

            Drawing.OnPreReset += DrawingOnOnPreReset;
            Drawing.OnPostReset += DrawingOnOnPostReset;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload;
            AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnDomainUnload;

            Drawing.OnEndScene += eventArgs =>
                {
                    var color = new ColorBGRA(255, 255, 255, 255);

                    var qMana = new[] { 0, 40, 50, 60, 70, 80 };
                    var wMana = new[] { 0, 60, 70, 80, 90, 100 }; // W Mana Cost doesnt works :/
                    var eMana = new[] { 0, 50, 50, 50, 50, 50 };
                    var rMana = new[] { 0, 100, 100, 100 };

                    if (manaBarItem.GetValue<bool>())
                    {
                        var totalCostMana = qMana[Program.Q.Level] + wMana[Program.W.Level] + eMana[Program.E.Level]
                                            + rMana[Program.R.Level];
                        DrawManaPercent(
                            totalCostMana,
                            totalCostMana > ObjectManager.Player.Mana ? new ColorBGRA(255, 0, 0, 255) : new ColorBGRA(255, 255, 255, 255));
                    }

                };
        }
开发者ID:qq2128969,项目名称:LeagueSharp-1,代码行数:32,代码来源:ManaBarIndicator.cs


示例5: MenuSettings

 /// <summary>
 ///     Initializes static members of the <see cref="MenuSettings" /> class.
 ///     Default Settings Static Constructor.
 /// </summary>
 static MenuSettings()
 {
     ContainerHeight = 30;
     ContainerSelectedColor = new ColorBGRA(255, 255, 255, 255 / 2);
     ContainerSeparatorColor = new ColorBGRA(255, 255, 255, 100);
     Position = new Vector2(30, 30);
     ContainerWidth = 200f;
     Font = new Font(
         Drawing.Direct3DDevice, 
         14, 
         0, 
         FontWeight.DoNotCare, 
         0, 
         false, 
         FontCharacterSet.Default,
         FontPrecision.TrueType,
         FontQuality.ClearTypeNatural,
         FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern, 
         "Tahoma");
     ContainerTextMarkOffset = 8f;
     ContainerTextOffset = 15f;
     HoverColor = new ColorBGRA(255, 255, 255, 50);
     RootContainerColor = new ColorBGRA(0, 0, 0, (byte)(255 / 1.5f));
     TextColor = Color.White;
 }
开发者ID:Gilbertobal,项目名称:LeagueSharp.SDK,代码行数:29,代码来源:MenuSettings.cs


示例6: Clear

        private Result Clear(IntPtr devicePointer, int count, IntPtr rects, ClearFlags flags, ColorBGRA color, float z, int stencil)
        {
            try
            {
                var structSize = Marshal.SizeOf(typeof(Rectangle));
                var structs = new SharpDX.Rectangle[count];
                for (int i = 0; i < count; i++)
                {
                    structs[i] = (SharpDX.Rectangle)Marshal.PtrToStructure(rects, typeof(SharpDX.Rectangle));
                }

                var rectangles = structs;
                this.Log.LogMethodSignatureTypesAndValues(devicePointer, count, rectangles.PrintTypesNamesValues(), flags,
                                                     color, z, stencil);
                this.GetOrCreateDevice(devicePointer);
                if (rectangles.Length == 0)
                    this.Device.Clear(flags, color, z, stencil);
                else
                    this.Device.Clear(flags, color, z, stencil, rectangles);
            }
            catch (SharpDXException ex)
            {
                Log.Warn(ex);
            }
            catch (Exception ex)
            {
                this.Log.Fatal(ex);
            }

            return Result.Ok;
        }
开发者ID:jasonpang,项目名称:Starcraft2Hook,代码行数:31,代码来源:Direct3D9Hook.Hooks.cs


示例7: DpsMeterSettings

 public DpsMeterSettings()
 {
     Enable = true;
     DpsTextSize = new RangeNode<int>(30, 10, 50);
     PeakDpsTextSize = new RangeNode<int>(13, 10, 50);
     BackgroundColor = new ColorBGRA(0, 0, 0, 160);
 }
开发者ID:asd34278,项目名称:PoeHud,代码行数:7,代码来源:DpsMeterSettings.cs


示例8: PreloadAlertSettings

 public PreloadAlertSettings()
 {
     Enable = true;
     TextSize = new RangeNode<int>(20, 10, 50);
     BackgroundColor = new ColorBGRA(0, 0, 0, 180);
     DefaultTextColor = CorruptedAreaColor = Color.White;
 }
开发者ID:Cryer11,项目名称:PoeHud,代码行数:7,代码来源:PreloadAlertSettings.cs


示例9: DrawDmg

        public static void DrawDmg(float dmg, ColorBGRA color)
        {
            Vector2 hpPosNow = GetHpPosAfterDmg(0);
            Vector2 hpPosAfter = GetHpPosAfterDmg(dmg);

            FullHPBar(hpPosNow, hpPosAfter, color);
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:7,代码来源:HpBarDraw.cs


示例10: DrawDmg

        public void DrawDmg(float dmg, ColorBGRA color)
        {
            var hpPosNow = GetHpPosAfterDmg(0);
            var hpPosAfter = GetHpPosAfterDmg(dmg);

            FillHpBar(hpPosNow, hpPosAfter, color);
        }
开发者ID:Nechrito,项目名称:Leaguesharp,代码行数:7,代码来源:HpBarIndicator.cs


示例11: Circle

 public Circle(CheckBox checkBox, ColorBGRA color, Func<float> range, Func<bool> condition, Func<GameObject> source)
 {
     CheckBox = checkBox;
     Range = range;
     Color = color;
     Condition = condition;
     SourceObject = source;
 }
开发者ID:lolscripts,项目名称:Otros,代码行数:8,代码来源:CircleManager.cs


示例12: drawDmg

        public void drawDmg(float dmg, ColorBGRA color)
        {
            Vector2 hpPosNow = getHpPosAfterDmg(0);
            Vector2 hpPosAfter = getHpPosAfterDmg(dmg);

            fillHPBar(hpPosNow, hpPosAfter, color);
            //fillHPBar((int)(hpPosNow.X - startPosition.X), (int)(hpPosAfter.X- startPosition.X), color);
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:8,代码来源:HpBarIndicator.cs


示例13: PreloadAlertSettings

        public PreloadAlertSettings()
        {
            Enable = true;
            Masters = true;
            Exiles = true;
            Strongboxes = true;
            CorruptedTitle = true;
            FontSize = new RangeNode<int>(16, 10, 20);
            BackgroundColor = new ColorBGRA(255, 255, 255, 220);
            DefaultFontColor = new ColorBGRA(220, 190, 130, 255);
            AreaFontColor = new ColorBGRA(150, 200, 250, 255);
            HasCorruptedArea = new ColorBGRA(208, 31, 144, 255);
            DarkShrineArea = new ColorBGRA(230, 0, 0, 255);

            MasterZana = new ColorBGRA(255, 0, 255, 255);
            MasterCatarina = new ColorBGRA(100, 255, 255, 255);
            MasterTora = new ColorBGRA(100, 255, 255, 255);
            MasterVorici = new ColorBGRA(100, 255, 255, 255);
            MasterHaku = new ColorBGRA(100, 255, 255, 255);
            MasterElreon = new ColorBGRA(100, 255, 255, 255);
            MasterVagan = new ColorBGRA(100, 255, 255, 255);
            MasterKrillson = new ColorBGRA(255, 0, 255, 255);

            ArcanistStrongbox = new ColorBGRA(255, 0, 255, 255);
            ArtisanStrongbox = new ColorBGRA(210, 210, 210, 255);
            CartographerStrongbox = new ColorBGRA(255, 0, 255, 255);
            GemcutterStrongbox = new ColorBGRA(27, 162, 155, 255);
            JewellerStrongbox = new ColorBGRA(210, 210, 210, 255);
            BlacksmithStrongbox = new ColorBGRA(210, 210, 210, 255);
            ArmourerStrongbox = new ColorBGRA(210, 210, 210, 255);
            OrnateStrongbox = new ColorBGRA(210, 210, 210, 255);
            LargeStrongbox = new ColorBGRA(210, 210, 210, 255);
            PerandusStrongbox = new ColorBGRA(175, 96, 37, 255);
            KaomStrongbox = new ColorBGRA(175, 96, 37, 255);
            MalachaiStrongbox = new ColorBGRA(175, 96, 37, 255);
            EpicStrongbox = new ColorBGRA(175, 96, 37, 255);
            SimpleStrongbox = new ColorBGRA(210, 210, 210, 255);

            OrraGreengate = new ColorBGRA(254, 192, 118, 255);
            ThenaMoga = new ColorBGRA(254, 192, 118, 255);
            AntalieNapora = new ColorBGRA(254, 192, 118, 255);
            TorrOlgosso = new ColorBGRA(254, 192, 118, 255);
            ArmiosBell = new ColorBGRA(254, 192, 118, 255);
            ZacharieDesmarais = new ColorBGRA(254, 192, 118, 255);
            MinaraAnenima = new ColorBGRA(254, 192, 118, 255);
            IgnaPhoenix = new ColorBGRA(254, 192, 118, 255);
            JonahUnchained = new ColorBGRA(254, 192, 118, 255);
            DamoiTui = new ColorBGRA(254, 192, 118, 255);
            XandroBlooddrinker = new ColorBGRA(254, 192, 118, 255);
            VickasGiantbone = new ColorBGRA(254, 192, 118, 255);
            EoinGreyfur = new ColorBGRA(254, 192, 118, 255);
            TinevinHighdove = new ColorBGRA(254, 192, 118, 255);
            MagnusStonethorn = new ColorBGRA(254, 192, 118, 255);
            IonDarkshroud = new ColorBGRA(254, 192, 118, 255);
            AshLessard = new ColorBGRA(254, 192, 118, 255);
            WilorinDemontamer = new ColorBGRA(254, 192, 118, 255);
            AugustinaSolaria = new ColorBGRA(254, 192, 118, 255);
        }
开发者ID:TomTer,项目名称:PoeHud,代码行数:58,代码来源:PreloadAlertSettings.cs


示例14: KillCounterSettings

 public KillCounterSettings()
 {
     Enable = false;
     ShowDetail = true;
     FontColor = new ColorBGRA(254, 192, 118, 255);
     BackgroundColor = new ColorBGRA(255, 255, 255, 255);
     LabelFontSize = new RangeNode<int>(16, 10, 20);
     KillsFontSize = new RangeNode<int>(16, 10, 20);
 }
开发者ID:hunkiller,项目名称:PoeHud,代码行数:9,代码来源:KillCounterSettings.cs


示例15: Events

        static Events()
        {
            var QColor = new ColorBGRA(Color.GreenYellow.ToVector3(), 0.1f);
            QCircle = new Circle(QColor, 500.0f, 3F, true);

            Gapcloser.OnGapcloser += GapcloserOnOnGapcloser;
            Spellbook.OnCastSpell += OnRecall;
            Drawing.OnDraw += OnDraw;
        }
开发者ID:drunkenninja,项目名称:Elobuddy,代码行数:9,代码来源:Events.cs


示例16: LoadFromMemory

        /// <summary>	
        /// Loads a volume from memory.	
        /// </summary>	
        /// <param name="destPaletteRef"><para>Pointer to a  <see cref="SharpDX.Direct3D9.PaletteEntry"/> structure, the destination palette of 256 colors or <c>null</c>.</para></param>	
        /// <param name="destBox"><para>Pointer to a <see cref="SharpDX.Direct3D9.Box"/> structure. Specifies the destination box. Set this parameter to <c>null</c> to specify the entire volume.</para></param>	
        /// <param name="srcMemoryPointer"><para>Pointer to the top-left corner of the source volume in memory.</para></param>	
        /// <param name="srcFormat"><para>Member of the <see cref="SharpDX.Direct3D9.Format"/> enumerated type, the pixel format of the source volume.</para></param>	
        /// <param name="srcRowPitch"><para>Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one row of cells, in bytes.</para></param>	
        /// <param name="srcSlicePitch"><para>Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one slice of cells, in bytes.</para></param>	
        /// <param name="srcPaletteRef"><para>Pointer to a <see cref="SharpDX.Direct3D9.PaletteEntry"/> structure, the source palette of 256 colors or <c>null</c>.</para></param>	
        /// <param name="srcBox"><para>Pointer to a <see cref="SharpDX.Direct3D9.Box"/> structure. Specifies the source box. <c>null</c> is not a valid value for this parameter.</para></param>	
        /// <param name="filter"><para>A combination of one or more <see cref="SharpDX.Direct3D9.Filter"/> controlling how the image is filtered. Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying <see cref="SharpDX.Direct3D9.Filter.Triangle"/> | <see cref="SharpDX.Direct3D9.Filter.Dither"/>.</para></param>	
        /// <param name="colorKey"><para> <see cref="SharpDX.Color4"/> value to replace with transparent black, or 0 to disable the colorkey. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque color keys. Thus, for opaque black, the value would be equal to 0xFF000000.</para></param>	
        /// <returns>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, D3DXERR_INVALIDDATA.</returns>	
        /// <remarks>	
        /// Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If <see cref="SharpDX.Direct3D9.D3DX9.LoadVolumeFromMemory"/> is called and the texture was not already dirty (this is unlikely under normal usage scenarios), the application needs to explicitly call <see cref="SharpDX.Direct3D9.VolumeTexture.AddDirtyBox"/> on the volume texture.	
        /// </remarks>	
        /// <unmanaged>HRESULT D3DXLoadVolumeFromMemory([In] IDirect3DVolume9* pDestVolume,[Out, Buffer] const PALETTEENTRY* pDestPalette,[In] const void* pDestBox,[In] const void* pSrcMemory,[In] D3DFORMAT SrcFormat,[In] unsigned int SrcRowPitch,[In] unsigned int SrcSlicePitch,[In, Buffer] const PALETTEENTRY* pSrcPalette,[In] const void* pSrcBox,[In] D3DX_FILTER Filter,[In] int ColorKey)</unmanaged>	
        public unsafe void LoadFromMemory(SharpDX.Direct3D9.PaletteEntry[] destPaletteRef, Box? destBox, System.IntPtr srcMemoryPointer, SharpDX.Direct3D9.Format srcFormat, int srcRowPitch, int srcSlicePitch, SharpDX.Direct3D9.PaletteEntry[] srcPaletteRef, Box srcBox, SharpDX.Direct3D9.Filter filter, ColorBGRA colorKey)
        {
            Box localDestBox;
            if (destBox.HasValue)
                localDestBox = destBox.Value;

            D3DX9.LoadVolumeFromMemory(
                this, destPaletteRef, new IntPtr(&localDestBox), srcMemoryPointer, srcFormat, srcRowPitch, srcSlicePitch, srcPaletteRef, new IntPtr(&srcBox), filter, colorKey.ToBgra());
        }
开发者ID:rbwhitaker,项目名称:SharpDX,代码行数:27,代码来源:Volume.cs


示例17: DpsMeterSettings

 public DpsMeterSettings()
 {
     Enable = false;
     DpsTextSize = new RangeNode<int>(16, 10, 20);
     PeakDpsTextSize = new RangeNode<int>(16, 10, 20);
     DpsFontColor = new ColorBGRA(254, 192, 118, 255);
     PeakFontColor = new ColorBGRA(254, 192, 118, 255);
     BackgroundColor = new ColorBGRA(255, 255, 255, 255);
 }
开发者ID:hunkiller,项目名称:PoeHud,代码行数:9,代码来源:DpsMeterSettings.cs


示例18: Rectangle_Ex

 public Rectangle_Ex(int x, int y, int width, int height, ColorBGRA color, float border = 2)
 {
     X = x;
         Y = y;
         Width = width;
         Height = height;
         Color = color;
         this.border = border;
         _line = new SharpDX.Direct3D9.Line(Drawing.Direct3DDevice) { Width = border};
         Game.OnUpdate += Game_OnUpdate;
 }
开发者ID:CainWolf,项目名称:PortAIO,代码行数:11,代码来源:HudPanel.cs


示例19: DrawBox

 public static void DrawBox(float x, float y, float w, float h, float px, ColorBGRA Color)
 {
     DrawLine(x, y, x + w, y, 1, new ColorBGRA(0,0,0, 255));
     DrawLine(x, y, x, y + h, 1, new ColorBGRA(0, 0, 0, 255));
     DrawLine(x, y + h, x + w, y + h, 1, new ColorBGRA(0, 0, 0, 255));
     DrawLine(x + w, y, x + w, y + h, 1, new ColorBGRA(0, 0, 0, 255));
     DrawFilledBox(x, y + h, w, px, Color);
     DrawFilledBox(x - px, y, px, h, Color);
     DrawFilledBox(x, y - px, w, px, Color);
     DrawFilledBox(x + w, y, px, h, Color);
     DrawFilledBox(x, y, w, h, Color);
 }
开发者ID:kobra322,项目名称:EnsageSharp,代码行数:12,代码来源:2DGeometry.cs


示例20: FullHPBar

        private static void FullHPBar(Vector2 from, Vector2 to, ColorBGRA color)
        {
            DxLine.Begin();

            DxLine.Draw(new[]
            {
                new Vector2((int) from.X, (int) from.Y + 4f),
                new Vector2((int) to.X, (int) to.Y + 4f)
            }, color);

            DxLine.End();
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:12,代码来源:HpBarDraw.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ColorBgra类代码示例发布时间:2022-05-24
下一篇:
C# ColorAdjustType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap