示例#1
0
        void grid_Invalidated(object sender, InvalidateEventArgs e)
        {
            if (!surface.IsDisposed)
            {
                mesh.Render(surface, EnvironmentParameters.SourceSurface, e.InvalidRect);
            }

            canvas.InvalidateCanvas(e.InvalidRect);
        }
示例#2
0
 public override void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length)
 {
     if (mesh != null)
     {
         for (int i = startIndex; i < startIndex + length; ++i)
         {
             mesh.Render(dstArgs.Surface, srcArgs.Surface, rois[i]);
         }
     }
 }
示例#3
0
        private void ConfigDialog_Load(object sender, EventArgs e)
        {
            this.BackColor       = SystemColors.Control;
            this.Text            = GridWarp.StaticDialogName;
            this.DesktopLocation = Owner.PointToScreen(new Point(0, 30));
            this.Size            = new Size(Owner.ClientSize.Width, Owner.ClientSize.Height - 30);
            this.WindowState     = Owner.WindowState;

            surface          = new Surface(EnvironmentParameters.SourceSurface.Size);
            mesh             = new DisplacementMesh(surface.Size);
            canvas.Surface   = surface;
            canvas.Selection = EnvironmentParameters.GetSelectionAsPdnRegion();
            mesh.Render(surface, EnvironmentParameters.SourceSurface, EnvironmentParameters.SourceSurface.Bounds);
        }