Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
FixedRescalingRequest.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 namespace SiliconStudio.TextureConverter.Requests
4 {
5  /// <summary>
6  /// Request a texture to be resized to the requested width and height.
7  /// </summary>
8  internal class FixedRescalingRequest : RescalingRequest
9  {
10 
11  /// <summary>
12  /// The width
13  /// </summary>
14  private readonly int width;
15 
16 
17  /// <summary>
18  /// The height
19  /// </summary>
20  private readonly int height;
21 
22  /// <summary>
23  /// Initializes a new instance of the <see cref="FixedRescalingRequest"/> class.
24  /// </summary>
25  /// <param name="width">The width.</param>
26  /// <param name="height">The height.</param>
27  /// <param name="filter">The filter.</param>
28  public FixedRescalingRequest(int width, int height, Filter.Rescaling filter) : base(filter)
29  {
30  this.width = width;
31  this.height = height;
32  }
33 
34  public override int ComputeWidth(TexImage texImage)
35  {
36  return width;
37  }
38 
39  public override int ComputeHeight(TexImage texImage)
40  {
41  return height;
42  }
43 
44  }
45 }