Package javax.media.jai

Examples of javax.media.jai.EnumeratedParameter


/*      */
/* 1189 */     if (((serverMask & 0x15) != 21) && ((serverMask & 0x2A) != 42))
/*      */     {
/* 1191 */       if ((opMask & 0x80) != 0)
/*      */       {
/* 1194 */         EnumeratedParameter transposeType = null;
/* 1195 */         switch (paramBlock.getIntParameter(9)) {
/*      */         case 90:
/* 1197 */           transposeType = TransposeDescriptor.ROTATE_270;
/* 1198 */           break;
/*      */         case 180:
/* 1200 */           transposeType = TransposeDescriptor.ROTATE_180;
/* 1201 */           break;
/*      */         case 270:
/* 1203 */           transposeType = TransposeDescriptor.ROTATE_90;
/*      */         }
/*      */
/* 1206 */         if (transposeType != null) {
/* 1207 */           rendering = JAI.create("transpose", rendering, transposeType);
/*      */         }
/*      */
/*      */       }
/*      */
/* 1212 */       if ((opMask & 0x100) != 0) {
/* 1213 */         String axis = (String)paramBlock.getObjectParameter(10);
/* 1214 */         EnumeratedParameter transposeType = axis.equalsIgnoreCase("x") ? TransposeDescriptor.FLIP_VERTICAL : TransposeDescriptor.FLIP_HORIZONTAL;
/*      */
/* 1218 */         rendering = JAI.create("transpose", rendering, transposeType);
/*      */       }
/*      */     }
/*      */
View Full Code Here


/*    */   {
/* 55 */     ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
/*    */
/* 58 */     RenderedImage source = paramBlock.getRenderedSource(0);
/*    */
/* 60 */     EnumeratedParameter type = (EnumeratedParameter)paramBlock.getObjectParameter(0);
/*    */
/* 63 */     SampleModel sm = source.getSampleModel();
/* 64 */     if (((sm instanceof MultiPixelPackedSampleModel)) && (sm.getSampleSize(0) == 1) && ((sm.getDataType() == 0) || (sm.getDataType() == 1) || (sm.getDataType() == 3)))
/*    */     {
/* 69 */       return new TransposeBinaryOpImage(source, renderHints, layout, type.getValue());
/*    */     }
/*    */
/* 72 */     return new TransposeOpImage(source, renderHints, layout, type.getValue());
/*    */   }
View Full Code Here

/*     */       }
/*     */
/* 103 */       Interpolation interpNN = (interp instanceof InterpolationNearest) ? interp : Interpolation.getInstance(0);
/*     */
/* 108 */       float sv = pb.getFloatParameter(0);
/* 109 */       EnumeratedParameter shearDir = (EnumeratedParameter)pb.getObjectParameter(1);
/*     */
/* 111 */       float tx = pb.getFloatParameter(2);
/* 112 */       float ty = pb.getFloatParameter(3);
/*     */
/* 115 */       AffineTransform transform = new AffineTransform(1.0D, shearDir == ShearDescriptor.SHEAR_VERTICAL ? sv : 0.0D, shearDir == ShearDescriptor.SHEAR_HORIZONTAL ? sv : 0.0D, 1.0D, shearDir == ShearDescriptor.SHEAR_HORIZONTAL ? tx : 0.0D, shearDir == ShearDescriptor.SHEAR_VERTICAL ? ty : 0.0D);
View Full Code Here

/*  66 */       alpha2 = (RenderedImage)args.getObjectParameter(1);
/*     */     }
/*     */
/*  69 */     boolean premultiplied = ((Boolean)args.getObjectParameter(2)).booleanValue();
/*     */
/*  71 */     EnumeratedParameter destAlpha = (EnumeratedParameter)args.getObjectParameter(3);
/*     */
/*  74 */     if (destAlpha.equals(CompositeDescriptor.NO_DESTINATION_ALPHA)) {
/*  75 */       return new CompositeNoDestAlphaOpImage(source1, source2, hints, layout, alpha1, alpha2, premultiplied);
/*     */     }
/*     */
/*  80 */     return new CompositeOpImage(source1, source2, hints, layout, alpha1, alpha2, premultiplied, destAlpha.equals(CompositeDescriptor.DESTINATION_ALPHA_FIRST));
/*     */   }
View Full Code Here

/* 73 */     if (isBilevel)
/*    */     {
/* 75 */       return null;
/*    */     }
/*    */
/* 78 */     EnumeratedParameter transposeType = (EnumeratedParameter)args.getObjectParameter(0);
/*    */
/* 80 */     return new MlibTransposeOpImage(args.getRenderedSource(0), hints, layout, transposeType.getValue());
/*    */   }
View Full Code Here

/*    */   public RenderedImage create(ParameterBlock paramBlock, RenderingHints renderHints)
/*    */   {
/* 55 */     ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
/*    */
/* 58 */     RenderedImage source = paramBlock.getRenderedSource(0);
/* 59 */     EnumeratedParameter scalingType = (EnumeratedParameter)paramBlock.getObjectParameter(0);
/*    */
/* 61 */     EnumeratedParameter dataNature = (EnumeratedParameter)paramBlock.getObjectParameter(1);
/*    */
/* 64 */     FFT fft = new FFT(true, new Integer(scalingType.getValue()), 2);
/*    */
/* 66 */     return new DFTOpImage(source, renderHints, layout, dataNature, fft);
/*    */   }
View Full Code Here

/*      */   private static final int UPDATE_FROM_GETTILE = 5;
/*      */   private static final int ABOUT_TO_REMOVE = 6;
/*      */
/*      */   public static EnumeratedParameter[] getCachedTileActions()
/*      */   {
/*  149 */     return new EnumeratedParameter[] { new EnumeratedParameter("add", 0), new EnumeratedParameter("remove", 1), new EnumeratedParameter("remove_by_flush", 2), new EnumeratedParameter("remove_by_memorycontrol", 3), new EnumeratedParameter("timestamp_update_by_add", 4), new EnumeratedParameter("timestamp_update_by_gettile", 5), new EnumeratedParameter("preremove", 6) };
/*      */   }
View Full Code Here

/*     */
/* 247 */     if (!modeName.equalsIgnoreCase("rendered")) {
/* 248 */       return true;
/*     */     }
/*     */
/* 251 */     EnumeratedParameter dataNature = (EnumeratedParameter)args.getObjectParameter(1);
/*     */
/* 254 */     if (!dataNature.equals(REAL_TO_COMPLEX)) {
/* 255 */       RenderedImage src = args.getRenderedSource(0);
/*     */
/* 257 */       if (src.getSampleModel().getNumBands() % 2 != 0) {
/* 258 */         msg.append(getName() + " " + JaiI18N.getString("DFTDescriptor5"));
/*     */
View Full Code Here

/*  61 */     BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);
/*     */
/*  63 */     RenderedImage source = paramBlock.getRenderedSource(0);
/*     */
/*  65 */     float shear_amt = paramBlock.getFloatParameter(0);
/*  66 */     EnumeratedParameter shear_dir = (EnumeratedParameter)paramBlock.getObjectParameter(1);
/*     */
/*  69 */     float xTrans = paramBlock.getFloatParameter(2);
/*  70 */     float yTrans = paramBlock.getFloatParameter(3);
/*     */
/*  72 */     Object arg1 = paramBlock.getObjectParameter(4);
/*  73 */     Interpolation interp = (Interpolation)arg1;
/*     */
/*  75 */     double[] backgroundValues = (double[])paramBlock.getObjectParameter(5);
/*     */
/*  78 */     AffineTransform tr = new AffineTransform();
/*     */
/*  80 */     if (shear_dir.equals(ShearDescriptor.SHEAR_HORIZONTAL))
/*     */     {
/*  82 */       tr.setTransform(1.0D, 0.0D, shear_amt, 1.0D, xTrans, 0.0D);
/*     */     }
/*     */     else {
/*  85 */       tr.setTransform(1.0D, shear_amt, 0.0D, 1.0D, 0.0D, yTrans);
View Full Code Here

TOP

Related Classes of javax.media.jai.EnumeratedParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.