Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/arranger/jarl/filter/IFilter.java


1   package com.arranger.jarl.filter;
2   
3   import com.arranger.jarl.base.IContext;
4   import com.arranger.jarl.base.ITimedJarlObject;
5   import com.arranger.jarl.widget.IWidget;
6   
7   import java.awt.*;
8   
9   /**
10   * IFilter filters images
11   */
12  public interface IFilter extends ITimedJarlObject {
13  
14      /**
15       * @return true if this is local to a widget, false if it is global to the whole image
16       */
17      public boolean isLocal();
18  
19      /**
20       * Filter this image at a global (whole canvas level)
21       * @param context current context
22       * @param srcImage the source of this image
23       * @return the filtered image
24       */
25      public Image filterImage(IContext context, Image srcImage);
26  
27      /**
28       * Instead of being a global filter, this is a local filter
29       *
30       * Pre process the filter by creating a temp image, and returning a custom graphics
31       * @param widget
32       * @param context
33       * @param graphics
34       * @return
35       */
36      public Graphics2D preFilterWidget(IWidget widget, IContext context, Graphics2D graphics);
37  
38      /**
39       * Instead of being a global filter, this is a local filter
40       *
41       * Post filter applying the transparent overlay as well as returning the stored graphics
42       * @param widget
43       * @param context
44       * @param graphics
45       * @return the restored graphics
46       */
47      public Graphics2D postFilterWidget(IWidget widget, IContext context, Graphics2D graphics);
48  }