/** * Return an instance of ColorSpaceHelper according to the ColorSpaceRestiction value. * <UL> * <li>ColorSpaceRestiction.NO_PATTERN : returns NoPatternColorSpaceHelper * <li>ColorSpaceRestiction.ONLY_DEVICE : returns DeviceColorSpaceHelper * <li>default : returns StandardColorSpaceHelper * </UL> * * @param context * the PreflightContext to access useful data * @param cs * the High level PDFBox object which represents the ColorSpace * @param csr * the color space restriction * @return the ColorSpaceHelper instance. */ public ColorSpaceHelper getColorSpaceHelper(PreflightContext context, PDColorSpace cs, ColorSpaceRestriction csr) { switch (csr) { case NO_PATTERN: return new NoPatternColorSpaceHelper(context, cs); case ONLY_DEVICE: return new DeviceColorSpaceHelper(context, cs); default: return new StandardColorSpaceHelper(context, cs); } }
/** * Return an instance of ColorSpaceHelper according to the ColorSpaceRestiction value. * <UL> * <li>ColorSpaceRestiction.NO_PATTERN : returns NoPatternColorSpaceHelper * <li>ColorSpaceRestiction.ONLY_DEVICE : returns DeviceColorSpaceHelper * <li>default : returns StandardColorSpaceHelper * </UL> * * @param context * the PreflightContext to access useful data * @param cs * the High level PDFBox object which represents the ColorSpace * @param csr * the color space restriction * @return the ColorSpaceHelper instance. */ public ColorSpaceHelper getColorSpaceHelper(PreflightContext context, PDColorSpace cs, ColorSpaceRestriction csr) { switch (csr) { case NO_PATTERN: return new NoPatternColorSpaceHelper(context, cs); case ONLY_DEVICE: return new DeviceColorSpaceHelper(context, cs); default: return new StandardColorSpaceHelper(context, cs); } }
/** * Return an instance of ColorSpaceHelper according to the ColorSpaceRestiction value. * <UL> * <li>ColorSpaceRestiction.NO_PATTERN : returns NoPatternColorSpaceHelper * <li>ColorSpaceRestiction.ONLY_DEVICE : returns DeviceColorSpaceHelper * <li>default : returns StandardColorSpaceHelper * </UL> * * @param context * the PreflightContext to access useful data * @param cs * the High level PDFBox object which represents the ColorSpace * @param csr * the color space restriction * @return the ColorSpaceHelper instance. */ public ColorSpaceHelper getColorSpaceHelper(PreflightContext context, PDColorSpace cs, ColorSpaceRestriction csr) { switch (csr) { case NO_PATTERN: return new NoPatternColorSpaceHelper(context, cs); case ONLY_DEVICE: return new DeviceColorSpaceHelper(context, cs); default: return new StandardColorSpaceHelper(context, cs); } }