01: /*
02: * $RCSfile: RIFUtil.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:56:41 $
10: * $State: Exp $
11: */
12: package com.sun.media.jai.opimage;
13:
14: import java.awt.RenderingHints;
15: import javax.media.jai.BorderExtender;
16: import javax.media.jai.ImageLayout;
17: import javax.media.jai.JAI;
18: import javax.media.jai.TileCache;
19:
20: public class RIFUtil {
21:
22: public static ImageLayout getImageLayoutHint(
23: RenderingHints renderHints) {
24: if (renderHints == null) {
25: return null;
26: } else {
27: return (ImageLayout) renderHints.get(JAI.KEY_IMAGE_LAYOUT);
28: }
29: }
30:
31: public static TileCache getTileCacheHint(RenderingHints renderHints) {
32: if (renderHints == null) {
33: return null;
34: } else {
35: return (TileCache) renderHints.get(JAI.KEY_TILE_CACHE);
36: }
37: }
38:
39: public static BorderExtender getBorderExtenderHint(
40: RenderingHints renderHints) {
41: if (renderHints == null) {
42: return null;
43: } else {
44: return (BorderExtender) renderHints
45: .get(JAI.KEY_BORDER_EXTENDER);
46: }
47: }
48: }
|