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


C# HatchStyle类代码示例

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


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

示例1: HatchBrush

 public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
 {
     this.hatchStyle = hatchStyle;
     this.foreCol = foreColor;
     this.backCol = backColor;
     base.native = LibIGraph.CreateBrush_Hatch(hatchStyle, foreCol.ToArgb(), backCol.ToArgb());
 }
开发者ID:memsom,项目名称:dotNetAnywhere-wb,代码行数:7,代码来源:HatchBrush.cs

示例2: FillImageByHatch

 protected void FillImageByHatch(Image img, HatchStyle s)
 {
     Graphics g = Graphics.FromImage(img);
     HatchBrush brush = new HatchBrush(s, Color.Black, Color.White);
     g.FillRectangle(brush, new Rectangle(0, 0, img.Width, img.Height));
     g.Dispose();
 }
开发者ID:stndstn,项目名称:PaintPlus,代码行数:7,代码来源:FormHatchStyleDlg.cs

示例3: Captcha

 public Captcha(int Width, int Height, HatchStyle TextStyle = HatchStyle.NarrowHorizontal, HatchStyle BackStyle = HatchStyle.DottedGrid)
 {
     this.Width = Width;
     this.Height = Height;
     this.TextStyle = TextStyle;
     this.BackStyle = BackStyle;
 }
开发者ID:Brandon-T,项目名称:JustCSharp,代码行数:7,代码来源:Imaging.cs

示例4: GBrush

 public GBrush(BrushStyle aStyle, HatchStyle hatchStyle, Colorref aColor, Guid uniqueID)
 {
     BrushStyle = aStyle;
     HatchStyle = hatchStyle;
     Color = aColor;
     UniqueID = uniqueID;
 }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:7,代码来源:GBrush.cs

示例5: GradientStyle

 public GradientStyle(HatchStyle hatch, Color fore, Color back)
 {
     Type = GradientType.HatchStyleGradient;
     FirstColor = fore;
     SecondColor = back;
     Hatch = hatch;
 }
开发者ID:nocmnt,项目名称:UVA-Arena,代码行数:7,代码来源:Stylish.cs

示例6: HatchBrush

		public HatchBrush(HatchStyle style, Color foreground, Color background)
		{
			_hatchStyle = style;
			_foregroundColor = foreground;
			_backgroundColor = background;
			throw new NotImplementedException();
		}
开发者ID:NelsonSantos,项目名称:fyiReporting-Android,代码行数:7,代码来源:HatchBrush.cs

示例7: DrawingHatchBrush

	// Constructor.
	public DrawingHatchBrush(HatchStyle style,
							 System.Drawing.Color foreColor,
							 System.Drawing.Color backColor) : base (foreColor)
			{
				this.style = style;
				this.foreColor = foreColor;
				this.backColor = backColor;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:9,代码来源:DrawingHatchBrush.cs

示例8: HatchBrush

        public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor) 
        {
            IntPtr brush = IntPtr.Zero;
            int status = SafeNativeMethods.Gdip.GdipCreateHatchBrush(unchecked((int) hatchstyle), foreColor.ToArgb(), backColor.ToArgb(), out brush);
            
            if (status != SafeNativeMethods.Gdip.Ok)
                throw SafeNativeMethods.Gdip.StatusException(status);

            SetNativeBrushInternal(brush);
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:10,代码来源:HatchBrush.cs

示例9: HatchPattern

 /// <summary>
 /// Initializes a new instance of the <c>HatchPattern</c> class.
 /// </summary>
 /// <param name="name">Pattern name, always stored as uppercase.</param>
 /// <param name="description">Description of the pattern (optional, this information is not saved in the dxf file). By default it will use the supplied name.</param>
 public HatchPattern(string name, string description = null)
 {
     this.name = name.ToUpper();
     this.description = string.IsNullOrEmpty(description) ? name : description;
     this.style = HatchStyle.Normal;
     this.fill = this.name == "SOLID" ? HatchFillType.SolidFill : HatchFillType.PatternFill;
     this.type = HatchType.UserDefined;
     this.origin = Vector2.Zero;
     this.angle = 0.0;
     this.scale = 1.0;
     this.lineDefinitions = new List<HatchPatternLineDefinition>();
 }
开发者ID:3DInstruments,项目名称:Kaliber3D,代码行数:17,代码来源:HatchPattern.cs

示例10: SetDataSource

    void SetDataSource(HatchStyle selected)
    {
      this.BeginUpdate();

      Items.Clear();
      foreach (HatchStyle o in Enum.GetValues(typeof(HatchStyle)))
        Items.Add(o);

      SelectedItem = selected;

      this.EndUpdate();
    }
开发者ID:Altaxo,项目名称:Altaxo,代码行数:12,代码来源:HatchStyleComboBox.cs

示例11: EditorHatchStyleUI

        /// <summary>
        /// Constructor that takes a HatchStyle, BackColor and ForeColor as arguments.
        /// </summary>
        /// <param name="hs">HatchStyle to be used in the instance created.</param>
        /// <param name="cBack">BackColor to be used in the instance created.</param>
        /// <param name="cFore">ForeColor to be used in the instance created.</param>
        public EditorHatchStyleUI(HatchStyle hs, Color cBack, Color cFore)
        {
            InitializeComponent();

            AddHatchStylesToListBox();

            hsHatchStyle = hs;

            cHatchStyleBackColor = cBack;
            cHatchStyleForeColor = cFore;

            this.Width = 224;
        }
开发者ID:Kristd,项目名称:backup,代码行数:19,代码来源:EditorHatchStyleUI.cs

示例12: GDIBrush

        public GDIBrush(BrushStyle aStyle, HatchStyle hatchStyle, Colorref colorref, Guid uniqueID)
            : base(true, uniqueID)
        {
            fBrushStyle = aStyle;
            fHatchStyle = hatchStyle;
            fColor = colorref;

            fLogBrush = new LOGBRUSH32();

            // Make sure to mask off the high order byte
            // or GDI will draw in black
            fLogBrush.lbColor = colorref & 0x00ffffff;
            fLogBrush.lbHatch = (int)hatchStyle;
            fLogBrush.lbStyle = (int)aStyle;

            IntPtr brushHandle = GDI32.CreateBrushIndirect(ref fLogBrush);

            SetHandle(brushHandle);
        }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:19,代码来源:GDIBrush.cs

示例13: GetBitmap

	// Get the bitmap corresponding to a particular hatch style.
	private static IntPtr GetBitmap(HatchStyle style)
	{
		IntPtr bitmap;

		// See if we have a cached bitmap for this style.
		if(((int)style) >= 0 && ((int)style) <= 52)
		{
			if (hatchBitmaps == null)
			{
				hatchBitmaps = new IntPtr[53];
			}
			bitmap = hatchBitmaps[(int)style];
			if (bitmap != IntPtr.Zero)
			{
				return bitmap;
			}
		}
		else
		{
			return IntPtr.Zero;
		}

		// Get the raw bits for the hatch bitmap.
		byte[] bits = GetBits(style);
		if(bits == null)
		{
			return IntPtr.Zero;
		}

		// Create the bitmap, cache it for later, and then return it.
		Array.Reverse(bits);
		bitmap = Win32.Api.CreateBitmap(16, 16, 1, 1, bits);
		hatchBitmaps[(int)style] = bitmap;
		return bitmap;
				
	}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:37,代码来源:DrawingHatchBrush.cs

示例14: Win32CreateHatchBrush

		internal extern static IntPtr Win32CreateHatchBrush(HatchStyle fnStyle, IntPtr color);
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:1,代码来源:XplatUIWin32.cs

示例15: CalculateValues

 public override void CalculateValues()
 {
     foreach (string name in Properties.Keys)
     {
         string value = Properties[name];
         switch (name)
         {
             case "background-color":
                 _backgroundColor = ParseColor(value);
                 break;
             case "shape":
                 _shape = (ShapeStyle)Enum.Parse(typeof(ShapeStyle), value);
                 break;
             case "color":
                 _foregroundColor = ParseColor(value);
                 break;
             case "border-style":
                 _borderStyle = (BorderStyle)Enum.Parse(typeof(BorderStyle), value);
                 break;
             case "border-width":
                 _borderWidth = float.Parse(value, CultureInfo.InvariantCulture);
                 break;
             case "border-color":
                 _borderColor = ParseColor(value);
                 break;
             case "fill-style":
                 _fillStyle = (FillStyle)Enum.Parse(typeof(FillStyle), value);
                 break;
             case "hatch-style":
                 _hatchStyle = (HatchStyle)Enum.Parse(typeof(HatchStyle), value);
                 break;
             case "width":
                 _width = float.Parse(value, CultureInfo.InvariantCulture);
                 break;
             case "height":
                 _height = float.Parse(value, CultureInfo.InvariantCulture);
                 break;
             case "alpha":
                 _alpha = int.Parse(value, CultureInfo.InvariantCulture);
                 break;
         }
     }
 }
开发者ID:0anion0,项目名称:IBN,代码行数:43,代码来源:GanttStyle.cs


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