當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。