コード例 #1
0
        /// <summary>
        /// constructor
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            this.context = new SeamCarvingContext();

            this.context.Height = ImageControl.Height;
            this.context.Width  = ImageControl.Width;

            this.seamUtilities      = new SeamUtilities();
            this.gradientCalculator = new GradientCalculator(seamUtilities);
            this.heatCalculator     = new HeatCalculator(seamUtilities);
            this.seamCalculator     = new SeamCalculator(seamUtilities);
        }
コード例 #2
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="injectedUtilities"></param>
 public HeatCalculator(ISeamUtilities injectedUtilities)
 {
     this.seamUtilities = injectedUtilities;
 }
コード例 #3
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="injectedSeamUtilities"></param>
 public GradientCalculator(ISeamUtilities injectedSeamUtilities)
 {
     this.seamUtilities = injectedSeamUtilities;
 }
コード例 #4
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="injectedSeamUtilities"></param>
 public SeamCalculator(ISeamUtilities injectedSeamUtilities)
 {
     this.seamUtilities = injectedSeamUtilities;
 }