|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.util.BitmapUtils
public class BitmapUtils
This class provides a set of static methods to manipulate
Bitmaps.
| Method Summary | |
|---|---|
static Bitmap |
tile(Bitmap src,
int newWidth,
int newHeight,
int left,
int top,
int right,
int bottom)
Tile a bitmap. |
static Bitmap |
tileHorizontal(Bitmap src,
int newWidth)
Tile a bitmap horizontally. |
static Bitmap |
tileHorizontal(Bitmap src,
int newWidth,
int left,
int right)
Tile a bitmap horizontally. |
static Bitmap |
tileVertical(Bitmap src,
int newHeight)
Tile a bitmap vertically. |
static Bitmap |
tileVertical(Bitmap src,
int newHeight,
int top,
int bottom)
Tile a bitmap vertically. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Bitmap tileHorizontal(Bitmap src,
int newWidth)
src - source bitmap.newWidth - width of the bitmap to return.
public static Bitmap tileHorizontal(Bitmap src,
int newWidth,
int left,
int right)
Tile a bitmap horizontally. A new bitmap is created with the desired width.
The left part of the original bitmap from x-coordinate 0 to x-coordinate left
is copied into the leftmost portion of the new bitmap.
The right part of the original bitmap from x-coordinate right to the right edge is
copied into the rightmost portion of the new bitmap.
The rest of the new bitmap is tiled with the middle section of the original bitmap.
Note that calling tileHorizontal(newWidth, 0, getWidth()) results in tiling the entire image.
src - source bitmap.newWidth - new width of the bitmap.left - right edge of left portion to copy.right - left edge of right portion to copy.
public static Bitmap tileVertical(Bitmap src,
int newHeight)
src - source bitmap.newHeight - height of the bitmap to return.
public static Bitmap tileVertical(Bitmap src,
int newHeight,
int top,
int bottom)
Tile a bitmap vertically. A new bitmap is created with the desired height.
The top part of the original bitmap from y-coordinate 0 to y-coordinate top
is copied into the topmost portion of the new bitmap.
The bottom part of the original bitmap from y-coordinate bottom to the bottom edge is
copied into the bottommost portion of the new bitmap.
The rest of the new bitmap is tiled with the middle section of the original bitmap.
Note that calling tileVertical(newHeight, 0, getHeight()) results in tiling the entire image.
src - source bitmap.newHeight - new height of the bitmap.top - bottom edge of top portion to copy.bottom - top edge of bottom portion to copy.
public static Bitmap tile(Bitmap src,
int newWidth,
int newHeight,
int left,
int top,
int right,
int bottom)
src - source bitmap.newWidth - new width of the bitmap.newHeight - new height of the bitmap.left - right edge of left 3 sections to copy.top - bottom edge of top 3 sections to copy.right - left edge of right 3 sections to copy.bottom - top edge of bottom 3 sections to copy.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||