|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.support.v4.print.PrintHelperKitkat
public class PrintHelperKitkat
Kitkat specific PrintManager API implementation.
Field Summary | |
---|---|
static int |
COLOR_MODE_COLOR
this is a color image (default) |
static int |
COLOR_MODE_MONOCHROME
this is a black and white image |
static int |
SCALE_MODE_FILL
image will fill the paper and be cropped (default) |
static int |
SCALE_MODE_FIT
image will be scaled but leave white space |
Method Summary | |
---|---|
int |
getColorMode()
Gets the color mode with which the image will be printed. |
int |
getScaleMode()
Returns the scale mode with which the image will fill the paper. |
void |
printBitmap(java.lang.String jobName,
android.graphics.Bitmap bitmap)
Prints a bitmap. |
void |
printBitmap(java.lang.String jobName,
android.net.Uri imageFile)
Prints an image located at the Uri. |
void |
setColorMode(int colorMode)
Sets whether the image will be printed in color (default) COLOR_MODE_COLOR or in back and white
COLOR_MODE_MONOCHROME . |
void |
setScaleMode(int scaleMode)
Selects whether the image will fill the paper and be cropped SCALE_MODE_FIT
or whether the image will be scaled but leave white space
SCALE_MODE_FILL . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SCALE_MODE_FIT
public static final int SCALE_MODE_FILL
public static final int COLOR_MODE_MONOCHROME
public static final int COLOR_MODE_COLOR
Method Detail |
---|
public void setScaleMode(int scaleMode)
SCALE_MODE_FIT
or whether the image will be scaled but leave white space
SCALE_MODE_FILL
.
scaleMode
- SCALE_MODE_FIT
or
SCALE_MODE_FILL
public int getScaleMode()
SCALE_MODE_FIT
or
SCALE_MODE_FILL
public void setColorMode(int colorMode)
COLOR_MODE_COLOR
or in back and white
COLOR_MODE_MONOCHROME
.
colorMode
- The color mode which is one of
COLOR_MODE_COLOR
and COLOR_MODE_MONOCHROME
.public int getColorMode()
COLOR_MODE_COLOR
and COLOR_MODE_MONOCHROME
.public void printBitmap(java.lang.String jobName, android.graphics.Bitmap bitmap)
jobName
- The print job name.bitmap
- The bitmap to print.public void printBitmap(java.lang.String jobName, android.net.Uri imageFile) throws java.io.FileNotFoundException
BitmapFactory.decodeStream
(JPEG, GIF, PNG, BMP, WEBP)
jobName
- The print job name.imageFile
- The Uri
pointing to an image to print.
java.io.FileNotFoundException
- if Uri
is not pointing to a valid image.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |