Ejemplo n.º 1
0
    public void onto(final ViewGroup target) {
      factor.width = target.getMeasuredWidth();
      factor.height = target.getMeasuredHeight();

      if (async) {
        BlurTask task =
            new BlurTask(
                target,
                factor,
                new BlurTask.Callback() {
                  @Override
                  public void done(BitmapDrawable drawable) {
                    addView(target, drawable);
                  }
                });
        task.execute();
      } else {
        Drawable drawable = new BitmapDrawable(context.getResources(), Blur.rs(target, factor));
        addView(target, drawable);
      }
    }
Ejemplo n.º 2
0
    public void into(final ImageView target) {
      factor.width = capture.getMeasuredWidth();
      factor.height = capture.getMeasuredHeight();

      if (async) {
        BlurTask task =
            new BlurTask(
                capture,
                factor,
                new BlurTask.Callback() {
                  @Override
                  public void done(BitmapDrawable drawable) {
                    target.setImageDrawable(drawable);
                  }
                });
        task.execute();
      } else {
        Drawable drawable = new BitmapDrawable(context.getResources(), Blur.rs(capture, factor));
        target.setImageDrawable(drawable);
      }
    }
Ejemplo n.º 3
0
 public Composer color(int color) {
   factor.color = color;
   return this;
 }
Ejemplo n.º 4
0
 public Composer sampling(int sampling) {
   factor.sampling = sampling;
   return this;
 }
Ejemplo n.º 5
0
 public Composer radius(int radius) {
   factor.radius = radius;
   return this;
 }