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

C# FillMode类代码示例

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

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



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


示例16: SetDefault

 /// <summary>
 /// Sets default values for this instance.
 /// </summary>
 public void SetDefault()
 {
     CullMode = CullMode.Back;
     FillMode = FillMode.Solid;
     DepthClipEnable = true;
     FrontFaceCounterClockwise = false;
     ScissorTestEnable = false;
     MultiSampleAntiAlias = false;
     MultiSampleAntiAliasLine = false;
     DepthBias = 0;
     DepthBiasClamp = 0f;
     SlopeScaleDepthBias = 0f;
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:16,代码来源:RasterizerStateDescription.cs


示例17: ConvertFillMode

        public static PolygonMode ConvertFillMode(FillMode fillMode)
        {
            // NOTE: Vulkan's PolygonMode.Point is not exposed

            switch (fillMode)
            {
                case FillMode.Solid:
                    return PolygonMode.Fill;
                case FillMode.Wireframe:
                    return PolygonMode.Line;
                default:
                    throw new ArgumentOutOfRangeException(nameof(fillMode));
            }
        }
开发者ID:Kryptos-FR,项目名称:xenko-reloaded,代码行数:14,代码来源:VulkanConvertExtensions.cs


示例18: Moving_Object

        public Moving_Object(Graphics _Gmoving)
        {
            G_moving = _Gmoving;
            Moving_Matrix = new Matrix(1, 0, 0, 1, 0, 0);
            Robot_Center_Point_X = Robot_Width/2 + _Init_X;

            point1 = new Point(10, 10);
            point2 = new Point(10, 20);
            point3 = new Point(30, 15);
            curvePoints = new Point[3];
            curvePoints[0] = point1;
            curvePoints[1] = point2;
            curvePoints[2] = point3;
            newFillMode = FillMode.Winding;
        }
开发者ID:teamEIT,项目名称:MobileRobotProject,代码行数:15,代码来源:Moving_Object.cs


示例19: GraphicNode

    public GraphicNode(String tag, String path, Guid modelGuid, Stencil stencil, Rectangle boundingRect,
      Double angle, Rectangle tagArea, Double tagAngle, Font tagFont, Boolean tagVisible, Double opacity,
      System.Drawing.Color fillColor, FillMode fillMode, bool mirrorX, bool mirrorY)
      : base(tag, tagArea, tagAngle, tagFont, tagVisible, opacity)
    {
      this.path = path;

      this.modelGuid = modelGuid;
      this.stencil = stencil;

      this.boundingRect = boundingRect;
      this.angle = angle;

      this.fillColor = fillColor;
      this.fillMode = fillMode;
      this.mirrorX = mirrorX;
      this.mirrorY = mirrorY;
    }
开发者ID:ChrisMoreton,项目名称:Test3,代码行数:18,代码来源:GraphicNode.cs


示例20: SetFillMode

 /// <summary>
 /// Specifies the method used to determine which points are inside the geometry described by this geometry sink  and which points are outside.
 /// </summary>
 /// <param name="fillMode">The method used to determine whether a given point is part of the geometry.</param>
 /// <remarks>
 /// The fill mode defaults to <see cref="SharpDX.Direct2D1.FillMode.Alternate"/>. To set the fill mode, call <strong>SetFillMode</strong> before the first call to <strong>BeginFigure</strong>. Not doing will put the geometry sink in an error state.
 /// </remarks>
 public void SetFillMode(FillMode fillMode)
 {
     SetFillMode_(fillMode);
 }
开发者ID:alexey-bez,项目名称:SharpDX,代码行数:11,代码来源:SimplifiedGeometrySinkNative.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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