Example #1
0
        /// <summary>
        /// Initialize a new instance of the class <see cref="Smoothing"/> by setting the smoothing quality of the lines.
        /// </summary>
        /// <param name="graphics">Surface <see cref="Graphics"/> oriented on which to draw</param>
        /// <param name="quality">One of the values in the enumeration <see cref="SmoothingModeEx"/> that represents the smoothing quality of the lines.</param>
        public Smoothing(Graphics graphics, SmoothingModeEx quality)
        {
            Graphics safeGraphics = SentinelHelper.PassThroughNonNull(graphics);

            _graphics               = safeGraphics;
            _smoothingModePrev      = _graphics.SmoothingMode;
            _graphics.SmoothingMode = quality.ToSmoothingMode();
        }
Example #2
0
        /// <summary>
        /// Initialize a new instance of the <see cref="Clipping"/> class by setting the clipping region and if it is exluded.
        /// </summary>
        /// <param name="graphics">Surface <see cref="Graphics"/> on which to draw.</param>
        /// <param name="region">A <see cref="Region"/> which represents the region of clipping.</param>
        /// <param name="exclude"><b>true</b> if the figure is excluded in the clipping; otherwise <b>false</b>.</param>
        public Clipping(Graphics graphics, Region region, bool exclude)
        {
            Graphics safeGraphics = SentinelHelper.PassThroughNonNull(graphics);

            // Guardar la instancia actual.
            _graphics = safeGraphics;

            // Guardar la region de recorte actual.
            _previousRegion = _graphics.Clip;

            // Añadir región de recorte a la región de recorte actual.
            _newRegion = _previousRegion.Clone();

            if (exclude)
            {
                _newRegion.Exclude(region);
            }
            else
            {
                _newRegion.Intersect(region);
            }

            _graphics.Clip = _newRegion;
        }
Example #3
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.Model.InvalidFieldIdentifierNameException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.
 /// </summary>
 /// <param name="message">The error message that explains the reason for the exception.</param>
 public InvalidFieldIdentifierNameException(StringBuilder message)
     : base(SentinelHelper.PassThroughNonNull(message).ToString())
 {
 }
Example #4
0
 /// <summary>
 /// Initialize a new instance of the class <see cref="Smoothing"/> by setting the smoothing quality of the lines.
 /// </summary>
 /// <param name="canvas">Surface <see cref="Graphics"/> oriented on which to draw.</param>
 /// <param name="quality">One of the values in the enumeration <see cref="SmoothingModeEx"/> that represents the smoothing quality of the lines.</param>
 public Smoothing(Canvas canvas, SmoothingModeEx quality) : this(SentinelHelper.PassThroughNonNull(canvas).Graphics, quality)
 {
 }
Example #5
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.Inputs.DataRowInput" /> class.
 /// </summary>
 /// <param name="rows">A <see cref="T:System.Data.DataRow" /> array object than contains the information.</param>
 /// <param name="name">The name.</param>
 protected DataRowInput(IEnumerable <DataRow> rows, string name)
     : base(SentinelHelper.PassThroughNonNull(CreateDataSetFrom(rows, name)))
 {
 }
Example #6
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.ArrayListInput" /> class.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <param name="name">The name.</param>
 public ArrayListInput(ArrayList data, string name)
     : base(SentinelHelper.PassThroughNonNull(data.ToDataTable <T>(name)))
 {
 }
Example #7
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.Inputs.DataTableInput" /> class.
 /// </summary>
 /// <param name="table">The table.</param>
 /// <param name="name">The name.</param>
 public DataTableInput(DataTable table, string name)
     : base(SentinelHelper.PassThroughNonNull(table).Rows.Cast <DataRow>(), name)
 {
 }
Example #8
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.Inputs.DataTableInput" /> class.
 /// </summary>
 /// <param name="table">The table.</param>
 public DataTableInput(DataTable table)
     : this(SentinelHelper.PassThroughNonNull(table), SentinelHelper.PassThroughNonNull(table).TableName)
 {
 }
Example #9
0
 /// <inheritdoc />
 /// <summary>
 /// Inicializa una nueva instancia de la clase <see cref="T:iTin.Core.Hardware.Device.DeviceObjectProperties" />.
 /// </summary>
 /// <param name="owner"><see cref="T:iTin.Core.Hardware.Device.DeviceObject" /> que contiene estas propiedades.</param>
 protected DeviceObjectProperties(DeviceObject owner) : base(SentinelHelper.PassThroughNonNull(owner).GetTypedDeviceData())
 {
     Device = owner;
 }
Example #10
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.Inputs.EnumerableInput{T}" /> class.
 /// </summary>
 /// <param name="data">A <see cref="T:System.Data.DataRow" /> array object than contains the information.</param>
 /// <param name="name">The name.</param>
 public EnumerableInput(IEnumerable <T> data, string name)
     : base(SentinelHelper.PassThroughNonNull(data.ToDataTable <T>(name)))
 {
 }
Example #11
0
 public XmlProvider(ProviderParameters constructorParams)
     : this((Uri)SentinelHelper.PassThroughNonNull(constructorParams).Data)
 {
 }
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:iTin.Export.Model.InvalidFieldsDefinitionException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.
 /// </summary>
 /// <param name="message">The error message that explains the reason for the exception.</param>
 public InvalidFieldsDefinitionException(StringBuilder message)
     : base(SentinelHelper.PassThroughNonNull(message).ToString())
 {
 }
Example #13
0
 /// <summary>
 /// Initialize a new instance of the <see cref="Clipping"/> class by setting the clipping rectangle and if it is excluded.
 /// </summary>
 /// <param name="canvas">Surface <see cref="Canvas"/> oriented where you are going to draw.</param>
 /// <param name="rect">A <see cref="Rectangle"/> structure that represents the rectangle of clipping.</param>
 /// <param name="exclude"><b>true</b> if the figure is excluded in the clipping; otherwise <b>false</b>.</param>
 public Clipping(Canvas canvas, Rectangle rect, bool exclude) : this(SentinelHelper.PassThroughNonNull(canvas).Graphics, rect, exclude)
 {
 }
Example #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Clipping"/> class by setting the figure on which to draw and if excluded from clipping.
 /// </summary>
 /// <param name="canvas">Surface <see cref="Canvas"/> oriented where you are going to draw.</param>
 /// <param name="path">A <see cref="GraphicsPath"/> which represents the destination figure in which to paint.</param>
 /// <param name="exclude"><b>true</b> if the figure is excluded in the clipping; otherwise <b>false</b>.</param>
 public Clipping(Canvas canvas, GraphicsPath path, bool exclude) : this(SentinelHelper.PassThroughNonNull(canvas).Graphics, path, exclude)
 {
 }