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


C# FillType类代码示例

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


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


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