@Override public void serialize(TransformationSourceOptions sourceOptions, Map<String, Serializable> parameters) { if (parameters == null || sourceOptions == null) return; CropSourceOptions cropSourceOptions = (CropSourceOptions) sourceOptions; parameters.put(PARAM_CROP_WIDTH, cropSourceOptions.getWidth()); parameters.put(PARAM_CROP_HEIGHT, cropSourceOptions.getHeight()); parameters.put(PARAM_CROP_X_OFFSET, cropSourceOptions.getXOffset()); parameters.put(PARAM_CROP_Y_OFFSET, cropSourceOptions.getYOffset()); parameters.put(PARAM_CROP_GRAVITY, cropSourceOptions.getGravity()); parameters.put(PARAM_IS_PERCENT_CROP, cropSourceOptions.isPercentageCrop()); }
@Override public void serialize(TransformationSourceOptions sourceOptions, Map<String, Serializable> parameters) { if (parameters == null || sourceOptions == null) return; CropSourceOptions cropSourceOptions = (CropSourceOptions) sourceOptions; parameters.put(PARAM_CROP_WIDTH, cropSourceOptions.getWidth()); parameters.put(PARAM_CROP_HEIGHT, cropSourceOptions.getHeight()); parameters.put(PARAM_CROP_X_OFFSET, cropSourceOptions.getXOffset()); parameters.put(PARAM_CROP_Y_OFFSET, cropSourceOptions.getYOffset()); parameters.put(PARAM_CROP_GRAVITY, cropSourceOptions.getGravity()); parameters.put(PARAM_IS_PERCENT_CROP, cropSourceOptions.isPercentageCrop()); }
appendOffset(builder, cropOptions.getXOffset()); appendOffset(builder, cropOptions.getYOffset()); builder.append(" +repage");
appendOffset(builder, cropOptions.getXOffset()); appendOffset(builder, cropOptions.getYOffset()); builder.append(" +repage");
cropXOffset = Integer.toString(cropOptions.getXOffset()); cropYOffset = Integer.toString(cropOptions.getYOffset());
cropXOffset = Integer.toString(cropOptions.getXOffset()); cropYOffset = Integer.toString(cropOptions.getYOffset());