public abstract class PrintItem
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PrintItem.ScaleType
This defines how the print item will be laid out on the paper.
|
Modifier and Type | Field and Description |
---|---|
static PrintItem.ScaleType |
DEFAULT_SCALE_TYPE |
Modifier | Constructor and Description |
---|---|
protected |
PrintItem(Parcel in) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
cleanup(Context context) |
abstract void |
drawPage(Canvas canvas,
float dpi,
RectF pageBounds)
Draw the printItem onto a canvas.
|
Asset |
getAsset()
Get the asset of the print item.
|
PrintAttributes.Margins |
getMargins()
Get the margin of the print item.
|
PrintAttributes.MediaSize |
getMediaSize()
Get the media size of the print item.
|
Bitmap |
getPrintableBitmap()
Get's the bitmap from the asset.
|
PrintItem.ScaleType |
getScaleType()
Get the scale type.
|
void |
writeToParcel(Parcel dest,
int flags) |
public static PrintItem.ScaleType DEFAULT_SCALE_TYPE
public PrintAttributes.MediaSize getMediaSize()
public PrintAttributes.Margins getMargins()
public PrintItem.ScaleType getScaleType()
public Asset getAsset()
public Bitmap getPrintableBitmap()
public abstract void drawPage(Canvas canvas, float dpi, RectF pageBounds)
canvas
- The canvas to be drawn ondpi
- The dpi of the canvaspageBounds
- The bounds of the page on the canvas. (Canvas can be bigger than the page we
want to draw on.protected abstract void cleanup(Context context)
public void writeToParcel(Parcel dest, int flags)