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

C# FillType类代码示例

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

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



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

示例1: PlaceFill

    void PlaceFill( FillType fillType, Vector2 position )
    {
        GameObject go = null;
        switch (fillType)
        {
        case FillType.A: go = prefabA.GetNextFree(); break;
        case FillType.B: go = prefabB.GetNextFree(); break;
        default:break;
        }

        if (go != null)
        {
            go.SetActive(true);
            go.transform.position = position;
        }
    }
开发者ID:hannesdvl,项目名称:Unity-PlatformerWorkshop,代码行数:16,代码来源:GridPlace.cs


示例2: Init

 /// <summary>
 /// Generic initializer to default values
 /// </summary>
 private void Init()
 {
     color = Color.White;
     brush = null;
     type = FillType.None;
     this.isScaled = Default.IsScaled;
     this.alignH = Default.AlignH;
     this.alignV = Default.AlignV;
     this.rangeMin = 0.0;
     this.rangeMax = 1.0;
     gradientBM = null;
 }
开发者ID:InsungChoi,项目名称:dddd,代码行数:15,代码来源:Fill.cs


示例3: FloodFill

        public void FloodFill(Player p, ushort x, ushort y, ushort z, byte b, byte oldType, FillType fillType, ref byte[] blocks, ref List<Pos> buffer)
        {
            try
            {
                Pos pos;
                pos.x = x; pos.y = y; pos.z = z;

                if (deep > 4000)
                {
                    fromWhere.Add(pos);
                    return;
                }

                blocks[x + p.level.width * z + p.level.width * p.level.height * y] = b;
                buffer.Add(pos);

                //x
                if (fillType != FillType.VerticalX)
                {
                    if (GetTile((ushort)(x + 1), y, z, p.level, blocks) == oldType)
                    {
                        deep++;
                        FloodFill(p, (ushort)(x + 1), y, z, b, oldType, fillType, ref blocks, ref buffer);
                        deep--;
                    }

                    if (x > 0)
                        if (GetTile((ushort)(x - 1), y, z, p.level, blocks) == oldType)
                        {
                            deep++;
                            FloodFill(p, (ushort)(x - 1), y, z, b, oldType, fillType, ref blocks, ref buffer);
                            deep--;
                        }
                }

                //z
                if (fillType != FillType.VerticalZ)
                {
                    if (GetTile(x, y, (ushort)(z + 1), p.level, blocks) == oldType)
                    {
                        deep++;
                        FloodFill(p, x, y, (ushort)(z + 1), b, oldType, fillType, ref blocks, ref buffer);
                        deep--;
                    }

                    if (z > 0)
                        if (GetTile(x, y, (ushort)(z - 1), p.level, blocks) == oldType)
                        {
                            deep++;
                            FloodFill(p, x, y, (ushort)(z - 1), b, oldType, fillType, ref blocks, ref buffer);
                            deep--;
                        }
                }

                //y
                if (fillType == 0 || fillType == FillType.Up || fillType > FillType.Layer)
                {
                    if (GetTile(x, (ushort)(y + 1), z, p.level, blocks) == oldType)
                    {
                        deep++;
                        FloodFill(p, x, (ushort)(y + 1), z, b, oldType, fillType, ref blocks, ref buffer);
                        deep--;
                    }
                }

                if (fillType == 0 || fillType == FillType.Down || fillType > FillType.Layer)
                {
                    if (y > 0)
                        if (GetTile(x, (ushort)(y - 1), z, p.level, blocks) == oldType)
                        {
                            deep++;
                            FloodFill(p, x, (ushort)(y - 1), z, b, oldType, fillType, ref blocks, ref buffer);
                            deep--;
                        }
                }
            } catch (Exception e) { Server.ErrorLog(e); }
        }
开发者ID:AnthonyANI,项目名称:MCForge-MCLawl,代码行数:77,代码来源:CmdFill.cs


示例4: Fill

        // schema changed to 2 with addition of rangeDefault
        // schema changed to 10 with version 5 refactor -- not backwards compatible
        /// <summary>
        /// Constructor for deserializing objects
        /// </summary>
        /// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data
        /// </param>
        /// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data
        /// </param>
        protected Fill( SerializationInfo info, StreamingContext context )
        {
            Init();

            // The schema value is just a file version parameter.  You can use it to make future versions
            // backwards compatible as new member variables are added to classes
            int sch = info.GetInt32( "schema" );

            _color = (Color) info.GetValue( "color", typeof(Color) );
            _secondaryValueGradientColor = (Color) info.GetValue( "secondaryValueGradientColor", typeof( Color ) );
            //brush = (Brush) info.GetValue( "brush", typeof(Brush) );
            //brushHolder = (BrushHolder) info.GetValue( "brushHolder", typeof(BrushHolder) );
            _type = (FillType) info.GetValue( "type", typeof(FillType) );
            _isScaled = info.GetBoolean( "isScaled" );
            _alignH = (AlignH) info.GetValue( "alignH", typeof(AlignH) );
            _alignV = (AlignV) info.GetValue( "alignV", typeof(AlignV) );
            _rangeMin = info.GetDouble( "rangeMin" );
            _rangeMax = info.GetDouble( "rangeMax" );

            //BrushHolder brushHolder = (BrushHolder) info.GetValue( "brushHolder", typeof( BrushHolder ) );
            //brush = brush;

            _colorList = (Color[]) info.GetValue( "colorList", typeof(Color[]) );
            _positionList = (float[]) info.GetValue( "positionList", typeof(float[]) );
            _angle = info.GetSingle( "angle" );
            _image = (Image) info.GetValue( "image", typeof(Image) );
            _wrapMode = (WrapMode) info.GetValue( "wrapMode", typeof(WrapMode) );

            if ( _colorList != null && _positionList != null )
            {
                ColorBlend blend = new ColorBlend();
                blend.Colors = _colorList;
                blend.Positions = _positionList;
                CreateBrushFromBlend( blend, _angle );
            }
            else if ( _image != null )
            {
                _brush = new TextureBrush( _image, _wrapMode );
            }

            _rangeDefault = info.GetDouble( "rangeDefault" );
        }
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:51,代码来源:Fill.cs


示例5: EditFill

 public void EditFill(FillType fill_type)
 {
     if (!gimp_edit_fill(ID, fill_type))
     {
       throw new GimpSharpException();
     }
 }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:7,代码来源:Drawable.cs


示例6: FillRectangle

		/// <summary>
		/// Renders a rectangular background portion of a control.
		/// </summary>
		protected virtual void FillRectangle(Coord relPos, Coord size, Corner rounded, FillType fillType, HitState hitState, AnchorLocation location)
		{
			var point = Context.Push();
			var coord = new Coord(point.X + relPos.X, point.Y + relPos.Y);
			
			switch (fillType)
			{
			case FillType.Background:
				Context.Cairo.Pattern = GenerateGradient(coord, size, location, 
                                             GetColor(ColorType.BackgroundStart, hitState),
                                             GetColor(ColorType.BackgroundStop, hitState));
				break;
			case FillType.Editable:
				Context.Cairo.Pattern = GenerateGradient(coord, size, location, 
                                             GetColor(ColorType.EditableStart, hitState),
                                             GetColor(ColorType.EditableStop, hitState));
				break;
			case FillType.Highlight:
				Context.Cairo.Pattern = GenerateGradient(coord, size, location, 
                                             GetColor(ColorType.HighlightStart, hitState),
                                             GetColor(ColorType.HighlightStop, hitState));
				break;
			case FillType.Selection:
				Context.Cairo.Color = SelectionColor.ToCairo();
				break;
			}
			
			// draw the rectangle
			Context.Cairo.Operator = Cairo.Operator.Source;
			RectanglePath(coord.Round + 1, size.Floor - 2, rounded);
			Context.Cairo.Fill();
			
			Context.Pop();
		}
开发者ID:erisonliang,项目名称:monoworks,代码行数:37,代码来源:BasicDecorator.cs


示例7: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            str = xml.GetAttribute("url");
            if (str != null)
                _url = str;

            str = xml.GetAttribute("align");
            if (str != null)
                _align = FieldTypes.ParseAlign(str);

            str = xml.GetAttribute("vAlign");
            if (str != null)
                _verticalAlign = FieldTypes.ParseVerticalAlign(str);

            str = xml.GetAttribute("fill");
            if (str != null)
                _fill = FieldTypes.ParseFillType(str);

            _autoSize = xml.GetAttributeBool("autoSize", false);

            str = xml.GetAttribute("errorSign");
            if (str != null)
                showErrorSign = str == "true";

            _playing = xml.GetAttributeBool("playing", true);

            str = xml.GetAttribute("color");
            if (str != null)
                this.color = ToolSet.ConvertFromHtmlColor(str);

            if (_url != null)
                LoadContent();
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:36,代码来源:GLoader.cs


示例8: Fill

        /// <summary>
        /// Constructor that creates a linear gradient color-fill, setting <see cref="Type"/> to
        /// <see cref="FillType.Brush"/> using the specified colors and angle.
        /// </summary>
        /// <param name="color1">The first color for the gradient fill</param>
        /// <param name="color2">The second color for the gradient fill</param>
        /// <param name="angle">The angle (degrees) of the gradient fill</param>
        public Fill(Color color1, Color color2, float angle)
        {
            Init();
            _color = color2;

            var blend = new ColorBlend(2);
            blend.Colors[0] = color1;
            blend.Colors[1] = color2;
            blend.Positions[0] = 0.0f;
            blend.Positions[1] = 1.0f;
            _type = FillType.Brush;

            CreateBrushFromBlend(blend, angle);
        }
开发者ID:apravdivy,项目名称:MagistrSolution,代码行数:21,代码来源:Fill.cs


示例9: ExtFloodFill

 public static extern bool ExtFloodFill([In] IntPtr hdc, int x, int y, uint color, FillType type);
开发者ID:shivakrishna-k,项目名称:pinvoke,代码行数:1,代码来源:Bitmap.cs


示例10: BitmapFill

 public BitmapFill(uint characterId, Matrix matrix, FillType fillType)
 {
     this.CharacterId = characterId;
     this.Matrix = matrix;
     this.fillType = fillType;
 }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:6,代码来源:BitmapFill.cs


示例11: Fill

 public void Fill(FillType fill_type)
 {
     if (!gimp_drawable_fill(ID, fill_type))
     {
       throw new GimpSharpException();
     }
 }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:7,代码来源:Drawable.cs


示例12: gimp_drawable_fill

 static extern bool gimp_drawable_fill(Int32 drawable_ID,
     FillType fill_type);
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:2,代码来源:Drawable.cs


示例13: BuildFillType

 private static string BuildFillType(FillType fillType)
 {
     return fillType == FillType.Null ? String.Empty : String.Format(QueryStatements.Fill, fillType.ToString().ToLower());
 }
开发者ID:voqk,项目名称:InfluxData.Net,代码行数:4,代码来源:CqRequestModule.cs


示例14: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            str = xml.GetAttribute("url");
            if (str != null)
                _url = str;

            str = xml.GetAttribute("align");
            if (str != null)
                _align = FieldTypes.ParseAlign(str);

            str = xml.GetAttribute("vAlign");
            if (str != null)
                _verticalAlign = FieldTypes.ParseVerticalAlign(str);

            str = xml.GetAttribute("fill");
            if (str != null)
                _fill = FieldTypes.ParseFillType(str);

            _autoSize = xml.GetAttributeBool("autoSize", false);

            str = xml.GetAttribute("errorSign");
            if (str != null)
                showErrorSign = str == "true";

            _playing = xml.GetAttributeBool("playing", true);

            str = xml.GetAttribute("color");
            if (str != null)
                this.color = ToolSet.ConvertFromHtmlColor(str);

            str = xml.GetAttribute("fillMethod");
            if (str != null)
                _content.fillMethod = FieldTypes.ParseFillMethod(str);

            if (_content.fillMethod != FillMethod.None)
            {
                _content.fillOrigin = xml.GetAttributeInt("fillOrigin");
                _content.fillClockwise = xml.GetAttributeBool("fillClockwise", true);
                _content.fillAmount = (float)xml.GetAttributeInt("fillAmount", 100) / 100;
            }

            if (_url != null)
                LoadContent();
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:47,代码来源:GLoader.cs


示例15: Init

        private void Init( string family, float size, Color color, bool isBold,
			bool isItalic, bool isUnderline, Color fillColor, Brush fillBrush,
			FillType fillType )
        {
            _fontColor = color;
            _family = family;
            _isBold = isBold;
            _isItalic = isItalic;
            _isUnderline = isUnderline;
            _size = size;
            _angle = 0F;

            _isAntiAlias = Default.IsAntiAlias;
            _stringAlignment = Default.StringAlignment;
            _isDropShadow = Default.IsDropShadow;
            _dropShadowColor = Default.DropShadowColor;
            _dropShadowAngle = Default.DropShadowAngle;
            _dropShadowOffset = Default.DropShadowOffset;
            _scaleFactor = Default.ScaleFactor;

            _fill = new Fill( fillColor, fillBrush, fillType );
            _border = new Border( true, Color.Black, 1.0F );

            _scaledSize = -1;
            Remake( 1.0F, _size, ref _scaledSize, ref _font );
        }
开发者ID:sntree,项目名称:ZedGraph,代码行数:26,代码来源:FontSpec.cs


示例16: Init

        /// <summary>
        /// Generic initializer to default values
        /// </summary>
        private void Init()
        {
            _color = Color.White;
            _secondaryValueGradientColor = Color.White;
            _brush = null;
            _type = FillType.None;
            _isScaled = Default.IsScaled;
            _alignH = Default.AlignH;
            _alignV = Default.AlignV;
            _rangeMin = 0.0;
            _rangeMax = 1.0;
            _rangeDefault = double.MaxValue;
            _gradientBM = null;

            _colorList = null;
            _positionList = null;
            _angle = 0;
            _image = null;
            _wrapMode = WrapMode.Tile;
        }
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:23,代码来源:Fill.cs


示例17: FontSpec

        /// <summary>
        /// Construct a <see cref="FontSpec"/> object with the given properties.  All other properties
        /// are defaulted according to the values specified in the <see cref="Default"/>
        /// default class.
        /// </summary>
        /// <param name="family">A text string representing the font family
        /// (default is "Arial")</param>
        /// <param name="size">A size of the font in points.  This size will be scaled
        /// based on the ratio of the <see cref="PaneBase.Rect"/> dimension to the
        /// <see cref="PaneBase.BaseDimension"/> of the <see cref="GraphPane"/> object. </param>
        /// <param name="color">The color with which to render the font</param>
        /// <param name="isBold">true for a bold typeface, false otherwise</param>
        /// <param name="isItalic">true for an italic typeface, false otherwise</param>
        /// <param name="isUnderline">true for an underlined font, false otherwise</param>
        /// <param name="fillColor">The <see cref="Color"/> to use for filling in the text background</param>
        /// <param name="fillBrush">The <see cref="Brush"/> to use for filling in the text background</param>
        /// <param name="fillType">The <see cref="ZedGraph.FillType"/> to use for the
        /// text background</param>
        public FontSpec( string family, float size, Color color, bool isBold,
							bool isItalic, bool isUnderline, Color fillColor, Brush fillBrush,
							FillType fillType )
        {
            Init( family, size, color, isBold, isItalic, isUnderline,
                    fillColor, fillBrush, fillType );
        }
开发者ID:sntree,项目名称:ZedGraph,代码行数:25,代码来源:FontSpec.cs


示例18: lstFills_SelectedIndexChanged

        private void lstFills_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (lstFills.SelectedIndex)
            {
                case 0:
                    fillType = FillType.Uniform;
                    break;

                case 1:
                    fillType = FillType.RadialCircle;
                    break;

                case 2:
                    fillType = FillType.RadialEllipse;
                    break;

                case 3:
                    fillType = FillType.RadialFocal;
                    break;

                case 4:
                    fillType = FillType.LinearVertical;
                    break;

                case 5:
                    fillType = FillType.LinearHorizontal;
                    break;

                case 6:
                    fillType = FillType.LinearForward;
                    break;

                case 7:
                    fillType = FillType.LinearBackward;
                    break;
            }
            if (drawer != null) Draw();
        }
开发者ID:kevincwq,项目名称:Cross.Drawing,代码行数:38,代码来源:fmFill.cs


示例19: HeiiRuleCurve

 public HeiiRuleCurve(string cbtt, int waterYear,FillType fType)
     : base(cbtt,fType)
 {
     Init(waterYear);
 }
开发者ID:usbr,项目名称:Pisces,代码行数:5,代码来源:HeiiRuleCurve.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Filler类代码示例发布时间:2022-05-24
下一篇:
C# FillMode类代码示例发布时间: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