예제 #1
0
 public void RenderKaleidoscopeImage(int renderingWidth, int renderingHeight)
 {
     model.RenderingWidth     = renderingWidth;
     model.RenderingHeight    = renderingHeight;
     model.RectangularPattern = KaleidoscopeRenderer.
                                GetTileableRectangularPattern(model.Template, model.MirrorSystem);
     model.RenderedImage = GraphicsExtensions.CentreAlignedTile(
         model.RectangularPattern,
         model.RenderingWidth,
         model.RenderingHeight);
     view.UpdateRenderedImage();
 }
예제 #2
0
 public void ExtractTemplate()
 {
     model.Template = KaleidoscopeRenderer.ExtractTemplate(
         model.ScaledImage,
         model.MirrorSystem,
         model.TemplateExtractionSize,
         model.TemplateExtractionOffsetX,
         model.TemplateExtractionOffsetY,
         model.TemplateExtractionRotaion
         );
     view.UpdateTemplatePreviewWindow();
 }
예제 #3
0
        public MVC_Controller(MVC_View view, MVC_Model model)
        {
            this.view  = view;
            this.model = model;

            this.view.Controller = this;
            this.view.Model      = this.model;

            KaleidoscopeRenderer.SetGraphicsModes(
                SmoothingMode.AntiAlias,
                PixelOffsetMode.HighQuality,
                InterpolationMode.HighQualityBicubic);

            SetMirorrSystem(new MirrorSystem306090());
        }