// ############################################################################### // ### C O N S T R U C T I O N A N D I N I T I A L I Z A T I O N // ############################################################################### #region Construction /// <summary>Initialize a new instance of the System.PenInfo structure that has specific color.</summary> /// <param name="color">The color value.<see cref="X11.TColor"/></param> private X11PenInfo(X11.TColor color) { _color = color; }
/// <summary>Initialize a new instance of the System.PenInfo structure that has specific color.</summary> /// <param name="color">The color value.<see cref="X11.TColor"/></param> public static X11PenInfo FromColor(X11.TColor color) { return(new X11PenInfo(color)); }
/// <summary>Initialize a new instance of the System.BrushInfo structure that has specific tile pixmap and color.</summary> /// <param name="uriSource">The image source uri.<see cref="System.String"/></param> /// <param name="image">The tile image to apply.<see cref="X11Graphic"/></param> /// <param name="color">The color value.<see cref="X11.TColor"/></param> /// <returns>The requested brush info.<see cref="BrushInfo"/></returns> /// <remarks>The TileBrush supports bitmap offset.</remarks> /// <exception cref="ArgumentNullException">If 'uriSource' is null or empty string.</exception> public static X11BrushInfo ImageBrush(string uriSource, X11.X11Graphic image, X11.TColor color) { if (string.IsNullOrEmpty(uriSource)) { throw new ArgumentNullException(); } X11BrushInfo bi = new X11BrushInfo(BrushType.Image, image, color); bi._imageUri = uriSource; return(bi); }
/// <summary>Initialize a new instance of the System.BrushInfo structure that has specific hatch bitmap and color.</summary> /// <param name="hatchType">The hatch to apply.<see cref="HatchType"/></param> /// <param name="color">The color value.<see cref="X11.TColor"/></param> /// <returns>The requested brush info.<see cref="BrushInfo"/></returns> /// <remarks>The HatchBrush supports bitmap offset.</remarks> public static X11BrushInfo HatchBrush(HatchType hatchType, X11.TColor color) { return(new X11BrushInfo(BrushType.Hatch, hatchType, color)); }
/// <summary>Initialize a new instance of the System.BrushInfo structure that has specific color.</summary> /// <param name="color">The color value.<see cref="X11.TColor"/></param> public static X11BrushInfo SolidBrushFromColor(X11.TColor color) { return(new X11BrushInfo(BrushType.Solid, color)); }
/// <summary>Initialize a new instance of the System.BrushInfo structure that has specific color.</summary> /// <param name="type">The type value.<see cref="System.X11BrushInfo.BrushType"/></param> /// <param name="image">The graphic to cteate the tile pixmap for tile fill from.<see cref="X11.X11Graphic"/></param> /// <param name="color">The color value.<see cref="X11.TColor"/></param> private X11BrushInfo(BrushType type, X11.X11Graphic image, X11.TColor color) { _brushType = type; _tileGraphic = image; _color = color; }
/// <summary>Initialize a new instance of the System.BrushInfo structure that has specific color.</summary> /// <param name="type">The type value.<see cref="System.X11BrushInfo.BrushType"/></param> /// <param name="hatchType">The hatch to apply.<see cref="HatchType"/></param> /// <param name="color">The color value.<see cref="X11.TColor"/></param> private X11BrushInfo(BrushType type, HatchType hatchType, X11.TColor color) { _brushType = type; _hatchType = hatchType; _color = color; }