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


C# FillMode类代码示例

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


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

示例1: SetDEMFillMode

 public void SetDEMFillMode(FillMode fillMode)
 {
     lock (gDevice)
     {
         demFillMode = fillMode;
     }
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:VisRenderingContext3D.cs

示例2: BeginModify

        public void BeginModify(FillMode fillmode)
        {
            if(m_geometryFilled)
                CreatePathGeometry();

            m_geometrySink = m_pathGeometry.Open();
            m_geometrySink.SetFillMode((SlimDX.Direct2D.FillMode)fillmode);
        }
开发者ID:treytomes,项目名称:DirectCanvas,代码行数:8,代码来源:PathGeometry.cs

示例3: CreateCubical

 /// <summary>
 /// Create objects in a cubical patern
 /// </summary>
 /// <param name="item">the GameObject to be placed in our cubic patern</param>
 /// <param name="item2">the second type of GameObject to be placed in empty places of our patern (instead of being empty)</param>
 /// <param name="position">position of the corner of the cube</param>
 /// <param name="width">width of the cube</param>
 /// <param name="height">height of the cube</param>
 /// <param name="depth">depth of the cube</param>
 /// <param name="tileSize">size of each tile of the cube (i.e distance between items)</param>
 /// <param name="fill">fill mode of the cube</param>
 /// <returns>returns if it was successful or not</returns>
 public static bool CreateCubical(GameObject item, GameObject item2, Vector3 position, float width, float height, float depth, float tileSize, FillMode fill)
 {
     if (item == null || width <= 0 || height <= 0 || depth <= 0 || tileSize <= 0)
     {
         return false;
     }
     //some modes can not tolerate even numbers
     if (fill == FillMode.YesNo)
     {
         if (width % 2 == 0) width++;
         if (height % 2 == 0) height++;
         if (depth % 2 == 0) depth++;
     }
     currentPosition = position;
     for (int i = 0; i < width; i++)
     {
         for (int j = 0; j < height; j++)
         {
             for (int k = 0; k < depth; k++)
             {
                 if (fill == FillMode.fill)
                 {
                     GameObject.Instantiate(item, currentPosition, Quaternion.identity);
                 }
                 else if (fill == FillMode.empty)
                 {
                     if (i == 0 || j == 0 || k == 0 || i == width - 1 || j == height - 1 || k == depth - 1)
                     {
                         GameObject.Instantiate(item, currentPosition, Quaternion.identity);
                     }
                     else if (item2 != null)
                     {
                         GameObject.Instantiate(item2, currentPosition, Quaternion.identity);
                     }
                 }
                 else if (fill == FillMode.YesNo)
                 {
                     if ((i % 2 == 0 && j % 2 == 0 && k % 2 == 0) || i == 0 || j == 0 || k == 0 || i == width - 1 || j == height - 1 || k == depth - 1)
                     {
                         GameObject.Instantiate(item, currentPosition, Quaternion.identity);
                     }
                     else if (item2 != null)
                     {
                         GameObject.Instantiate(item2, currentPosition, Quaternion.identity);
                     }
                 }
                 currentPosition.z += tileSize;
             }
             currentPosition.y += tileSize;
             currentPosition.z = position.z;
         }
         currentPosition.x += tileSize;
         currentPosition.y = position.y;
         currentPosition.z = position.z;
     }
     return true;
 }
开发者ID:NoOpArmy,项目名称:GoPatterns,代码行数:69,代码来源:Placement.cs

示例4: Page

 /// <summary>
 /// </summary>
 /// <param name="parent"> </param>
 /// <param name="title"> </param>
 public Page(Version parent, string title)
 {
     Title = title;
     _parent = parent;
     if (parent != null)
         _parent.Pages.Add(this);
     _items = new List<IOption>();
     _fillMode = FillMode.TopToBottom;
 }
开发者ID:Daimakaicho,项目名称:MenuDesigner,代码行数:13,代码来源:Page.cs

示例5: ProduceNewFillStyleInfo

        public IFillStyleInfo ProduceNewFillStyleInfo(
			Color FillColor,
			Color GradientColor,
			FillMode mode)
        {
            IFillStyleInfo NewFillStyle = new GDIFillStyle(
                FillColor, GradientColor, mode);
            return NewFillStyle;
        }
开发者ID:Ju2ender,项目名称:csharp-e,代码行数:9,代码来源:GDIDrawInfoFactory.cs

示例6: GraphicsPath

        public GraphicsPath(FillMode fillMode) {
            IntPtr nativePath = IntPtr.Zero;

            int status = SafeNativeMethods.Gdip.GdipCreatePath(unchecked((int)fillMode), out nativePath);

            if (status != SafeNativeMethods.Gdip.Ok)
                throw SafeNativeMethods.Gdip.StatusException(status);

            this.nativePath = nativePath;
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:10,代码来源:GraphicsPath.cs

示例7: SmoothProgressBar

 public SmoothProgressBar()
 {
     InitializeComponent();
     m_min = 0;
     m_max = 100;
     m_value = 0;
     m_fillMode = FillMode.LEFT_TO_RIGHT;
     m_text = "";
     m_txtColor = SystemColors.WindowText;
 }
开发者ID:nnadboralski-zz,项目名称:C-CodeDump,代码行数:10,代码来源:UserControl1.cs

示例8: GraphicsPath

		public GraphicsPath (PointF[] pts, byte[] types, FillMode fillMode)
		{
			if (pts == null)
				throw new ArgumentNullException ("pts");
			if (pts.Length != types.Length)
				throw new ArgumentException ("Invalid parameter passed. Number of points and types must be same.");

			Status status = GDIPlus.GdipCreatePath2 (pts, types, pts.Length, fillMode, out nativePath);
			GDIPlus.CheckStatus (status);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:10,代码来源:GraphicsPath.cs

示例9: RenderInfo

 public RenderInfo(Mesh mesh, int subset, Matrix transform, NJS_MATERIAL material, Texture texture, FillMode fillMode, BoundingSphere bounds)
 {
     Mesh = mesh;
     Subset = subset;
     Transform = transform;
     Material = material;
     Texture = texture;
     FillMode = fillMode;
     Bounds = bounds;
 }
开发者ID:Radfordhound,项目名称:sa_tools,代码行数:10,代码来源:RenderInfo.cs

示例10: Simplify

        public static List<List<Vector2>> Simplify(List<Vector2> polygon, FillMode fillMode, out PolyTree tree)
        {
            Clipper.Clear();
            Clipper.AddPath(polygon, PolyType.ptSubject, true);
            Clipper.AddPath(polygon, PolyType.ptClip, true);

            tree = new PolyTree();
            PolyFillType fillType = fillMode.ToPolyFillType();
            Clipper.Execute(ClipType.ctUnion, tree, fillType, fillType);
            return Clipper.ClosedPathsFromPolyTree(tree);
        }
开发者ID:Artentus,项目名称:GameUtils,代码行数:11,代码来源:ClipperHelper.cs

示例11: Version

 /// <summary>
 /// </summary>
 /// <param name="parent"> </param>
 /// <param name="title"> </param>
 public Version(Menu parent, string title)
 {
     Title = title;
     _parent = parent;
     if (parent != null)
         _parent.Versions.Add(this);
     _number = 0.0f;
     _items = new List<IOption>();
     _pages = new List<Page>();
     _fillMode = FillMode.TopToBottom;
 }
开发者ID:Daimakaicho,项目名称:MenuDesigner,代码行数:15,代码来源:Version.cs

示例12: Combine

        public static List<List<Vector2>> Combine(List<List<Vector2>> subjectPolygons, List<List<Vector2>> clippingPolygons,
                                                  FillMode subjectFillMode, FillMode clipFillMode, CombineMode combineMode, out PolyTree tree)
        {
            Clipper.Clear();
            Clipper.AddPaths(subjectPolygons, PolyType.ptSubject, true);
            Clipper.AddPaths(clippingPolygons, PolyType.ptClip, true);

            tree = new PolyTree();
            Clipper.Execute(combineMode.ToClipType(), tree, subjectFillMode.ToPolyFillType(), clipFillMode.ToPolyFillType());
            return Clipper.ClosedPathsFromPolyTree(tree);
        }
开发者ID:Artentus,项目名称:GameUtils,代码行数:11,代码来源:ClipperHelper.cs

示例13: Create

		/// <summary>
		/// Creates a new instance of the rasterizer state.
		/// </summary>
		/// <param name="cullMode"></param>
		/// <param name="fillMode"></param>
		/// <param name="depthBias"></param>
		/// <param name="slopeDepthBias"></param>
		/// <returns></returns>
		public static RasterizerState Create ( CullMode cullMode, FillMode fillMode = FillMode.Solid, int depthBias = 0, float slopeDepthBias = 0 )
		{
			var rs = new RasterizerState();
			rs.CullMode			=	cullMode;
			rs.DepthBias		=	depthBias;
			rs.SlopeDepthBias	=	slopeDepthBias;
			rs.MsaaEnabled		=	true;
			rs.FillMode			=	fillMode;
			rs.DepthClipEnabled	=	true;
			rs.ScissorEnabled	=	false;
			return rs;
		}
开发者ID:demiurghg,项目名称:FusionEngine,代码行数:20,代码来源:RasterizerState.cs

示例14: Outline

        public static List<List<Vector2>> Outline(List<Vector2> polygon, FillMode fillMode, bool closed, StrokeStyle strokeStyle, float strokeWidth, out PolyTree tree)
        {
            List<List<Vector2>> simplified = Clipper.SimplifyPolygon(polygon, fillMode.ToPolyFillType());

            Offsetter.Clear();
            Offsetter.MiterLimit = strokeStyle.MiterLimit;
            Offsetter.AddPaths(simplified, (JoinType)strokeStyle.LineJoin, closed ? EndType.etClosedLine : strokeStyle.CapStyle.ToEndType());

            tree = new PolyTree();
            Offsetter.Execute(ref tree, strokeWidth / 2);
            return Clipper.ClosedPathsFromPolyTree(tree);
        }
开发者ID:Artentus,项目名称:GameUtils,代码行数:12,代码来源:ClipperHelper.cs

示例15: GraphicsPath

	public GraphicsPath(Point[] pts, byte[] types, FillMode fillMode)
			{
				if(pts == null)
				{
					throw new ArgumentNullException("pts");
				}
				if(types == null)
				{
					throw new ArgumentNullException("types");
				}
				this.fillMode = fillMode;
				// TODO: convert the pts and types arrays
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:13,代码来源:GraphicsPath.cs


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