/** * Use a region of the source image. Region must be set independently for the full size image and the preview if * you are using one. * @param sRegion the region of the source image to be displayed. * @return this instance for chaining. */ @NonNull public ImageSource region(Rect sRegion) { this.sRegion = sRegion; setInvariants(); return this; }
/** * Declare the dimensions of the image. This is only required for a full size image, when you are specifying a URI * and also a preview image. When displaying a bitmap object, or not using a preview, you do not need to declare * the image dimensions. Note if the declared dimensions are found to be incorrect, the view will reset. * @param sWidth width of the source image. * @param sHeight height of the source image. * @return this instance for chaining. */ @NonNull public ImageSource dimensions(int sWidth, int sHeight) { if (bitmap == null) { this.sWidth = sWidth; this.sHeight = sHeight; } setInvariants(); return this; }
/** * Use a region of the source image. Region must be set independently for the full size image and the preview if * you are using one. * @return this instance for chaining. */ public ImageSource region(Rect sRegion) { this.sRegion = sRegion; setInvariants(); return this; }
/** * Declare the dimensions of the image. This is only required for a full size image, when you are specifying a URI * and also a preview image. When displaying a bitmap object, or not using a preview, you do not need to declare * the image dimensions. Note if the declared dimensions are found to be incorrect, the view will reset. * @return this instance for chaining. */ public ImageSource dimensions(int sWidth, int sHeight) { if (bitmap == null) { this.sWidth = sWidth; this.sHeight = sHeight; } setInvariants(); return this; }