Searched defs:bounds (Results 1 - 8 of 8) sorted by relevance

/gdk/samples/PhotoEditor/src/com/android/photoeditor/filters/
H A DCropFilter.java28 private RectF bounds; field in class:CropFilter
33 public void setCropBounds(RectF bounds) { argument
34 this.bounds = bounds;
40 dst.crop((int) (src.width() * bounds.left), (int) (src.height() * bounds.top),
41 (int) (src.width() * bounds.width()), (int) (src.height() * bounds.height()));
H A DStraightenFilter.java32 private final RectF bounds = new RectF(); field in class:StraightenFilter
46 bounds.set(0, 0, src.width(), src.height());
47 RectUtils.getStraightenMatrix(bounds, angle, matrix);
48 matrix.mapRect(bounds);
49 matrix.postTranslate((src.width() - bounds.width()) / 2,
50 (src.height() - bounds.height()) / 2);
/gdk/samples/PhotoEditor/src/com/android/photoeditor/
H A DRectUtils.java24 * Utils for rectangles/bounds related calculations.
32 * Gets straighten matrix for the given bounds and degrees.
34 public static void getStraightenMatrix(RectF bounds, float degrees, Matrix matrix) { argument
36 if ((degrees != 0) && !bounds.isEmpty()) {
37 float w = bounds.width() / 2;
38 float h = bounds.height() / 2;
52 postRotateMatrix(degrees, new RectF(bounds), matrix);
58 * Post rotates the matrix and bounds for the given bounds and degrees.
60 public static void postRotateMatrix(float degrees, RectF bounds, Matri argument
[all...]
H A DPhotoView.java84 RectF bounds = getPhotoBounds();
85 displayMatrix.mapRect(bounds);
86 return bounds;
97 RectF bounds = getPhotoBounds();
98 matrix.mapRect(bounds);
100 RectUtils.postCenterMatrix(bounds, this, displayMatrix);
104 public void clipPhoto(RectF bounds) { argument
105 clipBounds = bounds;
181 RectF bounds = getPhotoBounds();
182 float scale = RectUtils.getDisplayScale(bounds, thi
[all...]
/gdk/samples/PhotoEditor/src/com/android/photoeditor/actions/
H A DCropAction.java40 private RectF mapPhotoBounds(RectF bounds, RectF photoBounds) { argument
41 return new RectF((bounds.left - photoBounds.left) / photoBounds.width(),
42 (bounds.top - photoBounds.top) / photoBounds.height(),
43 (bounds.right - photoBounds.left) / photoBounds.width(),
44 (bounds.bottom - photoBounds.top) / photoBounds.height());
56 public void onCropChanged(RectF bounds, boolean fromUser) {
58 filter.setCropBounds(mapPhotoBounds(bounds, photoBounds));
H A DDoodleView.java69 * Clears clip bounds and paths drawn.
77 * Clips bounds for paths being drawn.
79 public void clipBounds(RectF bounds) { argument
80 clipBounds = bounds;
H A DCropView.java38 * A view that track touch motions and adjust crop bounds accordingly.
43 * Listener of crop bounds.
47 void onCropChanged(RectF bounds, boolean fromUser); argument
121 public void setCropBounds(RectF bounds) { argument
122 bounds.intersect(photoBounds);
123 cropBounds = bounds;
137 * Sets bounds to crop within.
139 public void setPhotoBounds(RectF bounds) { argument
140 photoBounds = bounds;
214 } else { // adjusting bounds
[all...]
H A DRotateView.java92 * Sets grid bounds to be drawn or null to hide grids right before the view is visible.
94 public void setGridBounds(RectF bounds) { argument
97 if (bounds != null) {
98 float delta = bounds.width() / 4.0f;
99 for (float x = bounds.left + delta; x < bounds.right; x += delta) {
100 grids.moveTo(x, bounds.top);
101 grids.lineTo(x, bounds.bottom);
103 delta = bounds.height() / 4.0f;
104 for (float y = bounds
[all...]

Completed in 101 milliseconds