Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RescalingRequest.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Text;
7 
8 namespace SiliconStudio.TextureConverter.Requests
9 {
10  /// <summary>
11  /// Request to rescale a texture (will delete every mipmaps of the texture)
12  /// </summary>
13  internal abstract class RescalingRequest : IRequest
14  {
15  public override RequestType Type { get { return RequestType.Rescaling; } }
16 
17  /// <summary>
18  /// The filter to be used when rescaling
19  /// </summary>
20  /// <value>
21  /// The filter.
22  /// </value>
23  public Filter.Rescaling Filter { get; protected set; }
24 
25  /// <summary>
26  /// Initializes a new instance of the <see cref="RescalingRequest"/> class.
27  /// </summary>
28  /// <param name="filter">The filter.</param>
29  protected RescalingRequest(Filter.Rescaling filter)
30  {
31  this.Filter = filter;
32  }
33 
34  /// <summary>
35  /// Computes the new width of the image.
36  /// </summary>
37  /// <param name="texImage">The tex image.</param>
38  /// <returns></returns>
39  public abstract int ComputeWidth(TexImage texImage);
40 
41  /// <summary>
42  /// Computes the new height of the image.
43  /// </summary>
44  /// <param name="texImage">The tex image.</param>
45  /// <returns></returns>
46  public abstract int ComputeHeight(TexImage texImage);
47 
48  }
49 }
The type of the serialized type will be passed as a generic arguments of the serializer. Example: serializer of A becomes instantiated as Serializer{A}.