Пример #1
0
		protected override void SetView (PhotoImageView value)
		{
			base.SetView (value);
			
			if (value == null)
				return;

			soft = new Widgets.SoftFocus (info);
			effect = (IEffect) soft;
		}
Пример #2
0
        protected override void SetView(PhotoImageView value)
        {
            base.SetView(value);

            if (value == null)
            {
                return;
            }

            soft   = new Widgets.SoftFocus(info);
            effect = (IEffect)soft;
        }
		private Pixbuf ProcessImpl (Pixbuf input, Cms.Profile input_profile, bool fast) {
			Pixbuf result;
			using (ImageInfo info = new ImageInfo (input)) {
				Widgets.SoftFocus soft = new Widgets.SoftFocus (info);
				soft.Radius = radius;

				MemorySurface surface = new MemorySurface (Format.Argb32,
									   input.Width,
									   input.Height);

				Context ctx = new Context (surface);
				soft.Apply (ctx, info.Bounds);
				((IDisposable)ctx).Dispose ();

				result = MemorySurface.CreatePixbuf (surface);
				surface.Flush ();
			}
			return result;
		}
Пример #4
0
        private Pixbuf ProcessImpl(Pixbuf input, Cms.Profile input_profile, bool fast)
        {
            Pixbuf result;

            using (ImageInfo info = new ImageInfo(input)) {
                Widgets.SoftFocus soft = new Widgets.SoftFocus(info);
                soft.Radius = radius;

                MemorySurface surface = new MemorySurface(Format.Argb32,
                                                          input.Width,
                                                          input.Height);

                Context ctx = new Context(surface);
                soft.Apply(ctx, info.Bounds);
                ((IDisposable)ctx).Dispose();

                result = MemorySurface.CreatePixbuf(surface);
                surface.Flush();
            }
            return(result);
        }
Пример #5
0
        Pixbuf ProcessImpl(Pixbuf input, Cms.Profile input_profile, bool fast)
        {
            Pixbuf result;

            using (ImageInfo info = new ImageInfo(input)) {
                using (Widgets.SoftFocus soft = new Widgets.SoftFocus(info)) {
                    soft.Radius = radius;

                    using (ImageSurface surface = new ImageSurface(Format.Argb32,
                                                                   input.Width,
                                                                   input.Height)) {
                        using (Context ctx = new Context(surface)) {
                            soft.Apply(ctx, info.Bounds);
                        }

                        result = surface.ToPixbuf();
                        surface.Flush();
                    }
                }
            }
            return(result);
        }
        private Pixbuf ProcessImpl(Pixbuf input, Cms.Profile input_profile, bool fast)
        {
            Pixbuf result;
            using (ImageInfo info = new ImageInfo (input)) {
                using (Widgets.SoftFocus soft = new Widgets.SoftFocus (info)) {
                    soft.Radius = radius;

                    using (ImageSurface surface = new ImageSurface (Format.Argb32,
                                           input.Width,
                                           input.Height)) {

                        using (Context ctx = new Context (surface)) {
                            soft.Apply (ctx, info.Bounds);
                        }

                        result = surface.ToPixbuf();
                        surface.Flush ();
                    }
                }
            }
            return result;
        }