当前位置: 首页>>代码示例>>C#>>正文


C# PaintDotNet.Surface类代码示例

本文整理汇总了C#中PaintDotNet.Surface的典型用法代码示例。如果您正苦于以下问题:C# Surface类的具体用法?C# Surface怎么用?C# Surface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Surface类属于PaintDotNet命名空间,在下文中一共展示了Surface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Apply

 public void Apply(Surface dst, Surface src, Rectangle[] rois, int startIndex, int length)
 {
     for (int i = startIndex; i < startIndex + length; ++i)
     {
         ApplyBase(dst, rois[i].Location, src, rois[i].Location, rois[i].Size);
     }
 }
开发者ID:nkaligin,项目名称:paint-mono,代码行数:7,代码来源:PixelOp.cs

示例2: FitSurfaceContext

 public FitSurfaceContext(Surface dstSurface, Surface srcSurface, Rectangle[] dstRois, ResamplingAlgorithm algorithm)
 {
     this.dstSurface = dstSurface;
     this.srcSurface = srcSurface;
     this.dstRois = dstRois;
     this.algorithm = algorithm;
 }
开发者ID:metadeta96,项目名称:openpdn,代码行数:7,代码来源:ResizeBenchmark.cs

示例3: GradientBenchmark

 public GradientBenchmark(string name, Surface surface, GradientRenderer renderer, int iterations)
     : base(name)
 {
     this.surface = surface;
     this.renderer = renderer;
     this.iterations = iterations;
 }
开发者ID:nkaligin,项目名称:paint-mono,代码行数:7,代码来源:GradientBenchmark.cs

示例4: MyRender

        private void MyRender(Surface dst, Surface src)
        {
            PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds);
            ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;
            ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor;
            int BrushWidth = (int)EnvironmentParameters.BrushWidth;
            if (PGP.Length > 0 && Draw )
            {
                using (Graphics g = new RenderArgs(dst).Graphics)
                {
                    using (Region reg = new Region(selectionRegion.GetRegionData()))
                    {
                        g.SetClip(reg, CombineMode.Replace);
                    }
                    g.SmoothingMode = SmoothingMode.AntiAlias;
                    Pen p = new Pen(PrimaryColor);
                    p.Width = BrushWidth;
                    for (int i = 0; i < PGP.Length; i++)
                    {
                        if (PGP[i].PointCount > 0)
                        {

                            g.DrawPath(p, PGP[i]);
                        }
                    }
                }
            }
        }
开发者ID:TheDwarfHorde,项目名称:DHShapeMaker,代码行数:28,代码来源:EffectPlugin.cs

示例5: RenderCompositionTo

        protected void RenderCompositionTo(Surface dst, bool highQuality, bool forceUpToDate)
        {
            if (forceUpToDate)
            {
                UpdateComposition(false);
            }

            if (dst.Width == this.compositionSurface.Width && 
                dst.Height == this.compositionSurface.Height)
            {
                dst.ClearWithCheckboardPattern();
                new UserBlendOps.NormalBlendOp().Apply(dst, this.compositionSurface);
            }
            else if (highQuality)
            {
                Surface thumb = new Surface(dst.Size);
                thumb.SuperSamplingFitSurface(this.compositionSurface);

                dst.ClearWithCheckboardPattern();

                new UserBlendOps.NormalBlendOp().Apply(dst, thumb);

                thumb.Dispose();
            }
            else
            {
                this.surfaceBox.RenderTo(dst);
            }
        }
开发者ID:herbqiao,项目名称:paint.net,代码行数:29,代码来源:DocumentView.cs

示例6: ZoomOutBlitBenchmark

 public ZoomOutBlitBenchmark(string name, Surface source, Surface dst, Size blitSize)
     : base(name)
 {
     this.source = source;
     this.dst = dst;
     this.blitSize = blitSize;
 }
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:7,代码来源:ZoomOutBlitBenchmark.cs

示例7: BitmapLayer

 public BitmapLayer(int width, int height, ColorBgra fillColor)
     : base(width, height)
 {
     this.surface = new Surface(width, height);
     // clear to see-through white, 0x00ffffff
     this.Surface.Clear(fillColor);
     this.properties = new BitmapLayerProperties(UserBlendOps.CreateDefaultBlendOp());
 }
开发者ID:nkaligin,项目名称:paint-mono,代码行数:8,代码来源:BitmapLayer.cs

示例8: OnSave

        protected override void OnSave(Document input, Stream output, SaveConfigToken token, 
            Surface scratchSurface, ProgressEventHandler callback)
        {
            RenderArgs ra = new RenderArgs(new Surface(input.Size));
            input.Render(ra);

            ra.Bitmap.Save(output, ImageFormat.Bmp);
        }
开发者ID:thennequin,项目名称:InitialProject,代码行数:8,代码来源:ITXPlugin.cs

示例9: EffectBenchmark

        public EffectBenchmark(string name, int iterations, Effect effect, EffectConfigToken token, Surface image)
            : base(name + " (" + iterations + "x)")
		{
            this.effect = effect;
            this.token = token;
            this.image = image;
            this.iterations = iterations;
		}
开发者ID:metadeta96,项目名称:openpdn,代码行数:8,代码来源:EffectBenchmark.cs

示例10: TransformBenchmark

 public TransformBenchmark(string name, Surface dst, MaskedSurface src, Matrix transform, bool highQuality)
     : base(name)
 {
     this.dst = dst;
     this.src = src;
     this.transform = transform.Clone();
     this.highQuality = highQuality;
 }
开发者ID:metadeta96,项目名称:openpdn,代码行数:8,代码来源:TransformBenchmark.cs

示例11: CompositionBenchmark

 public CompositionBenchmark(string name, Document composeMe, 
     Surface dstSurface, SetLayerInfoDelegate sliDelegate)
     : base(name)
 {
     this.composeMe = composeMe;
     this.dstSurface = dstSurface;
     this.sliDelegate = sliDelegate;
 }
开发者ID:leejungho2,项目名称:xynotecgui,代码行数:8,代码来源:CompositionBenchmark.cs

示例12: ApplyRectangle

 private unsafe void ApplyRectangle(Surface surface, Rectangle rect)
 {
     for (int y = rect.Top; y < rect.Bottom; ++y)
     {
         ColorBgra *ptr = surface.GetPointAddress(rect.Left, y);
         Apply(ptr, rect.Width);
     }
 }
开发者ID:metadeta96,项目名称:openpdn,代码行数:8,代码来源:UnaryPixelOp.cs

示例13: Draw

        public void Draw(Surface dst)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("PlacedSurface");
            }

            dst.CopySurface(what, where);
        }
开发者ID:herbqiao,项目名称:paint.net,代码行数:9,代码来源:PlacedSurface.cs

示例14: Save

 public void Save(Stream dstStream, Document srcDocument, FileType dstFileType, SaveConfigToken parameters, Surface saveScratchSurface)
 {
     this.document = srcDocument;
     this.fileType = dstFileType;
     this.stream = dstStream;
     this.saveConfigToken = parameters;
     this.scratchSurface = saveScratchSurface;
     DialogResult dr = this.ShowDialog(false, !dstFileType.SavesWithProgress , new ThreadStart(SaveCallback));
 }
开发者ID:metadeta96,项目名称:openpdn,代码行数:9,代码来源:SaveProgressDialog.cs

示例15: PlacedSurface

        public PlacedSurface(Surface source, Rectangle roi)
        {
            where = roi.Location;

            Surface window = source.CreateWindow(roi);
            what = new Surface(window.Size);
            what.CopySurface(window);
            window.Dispose();
        }
开发者ID:nkaligin,项目名称:paint-mono,代码行数:9,代码来源:PlacedSurface.cs


注:本文中的PaintDotNet.Surface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。