BitmapCanvas

Inheritance: java.lang.Object, com.aspose.barcode.drawing.GraphicsCanvas

All Implemented Interfaces: com.aspose.barcode.drawing.ICanvas, com.aspose.barcode.drawing.IDrawImageCanvas

public class BitmapCanvas extends GraphicsCanvas implements ICanvas, IDrawImageCanvas

Represents GDI bitmap canvas.

Constructors

ConstructorDescription
BitmapCanvas(Bitmap output, Dpi dpi, CanvasQualityMode imageMode, TextRenderingHint textHint)

Methods

MethodDescription
adaptFontToActualResolution(TextPaint font)
clear(int color)
createBrush(int color)
createPen(int color, float thickness)
dispose()
drawImage(Bitmap bitmap, Rect dst, Rect src)
drawLine(IPen pen, Point p1, Point p2)
drawLine(IPen pen, PointF p1, PointF p2)
drawRectangle(IPen p, System.Drawing.Rectangle rectangle)
drawRectangle(IPen p, System.Drawing.RectangleF rectangle)
drawText(String text, TextPaint font, IBrush brush, PointF origin)
drawText(String text, TextPaint font, IBrush b, System.Drawing.RectangleF bounds)
drawText(String text, TextPaint font, IBrush brush, System.Drawing.RectangleF bounds, TextOptions options)
drawText(String text, TextPaint font, IBrush b, float x, float y)
equals(Object arg0)
fillEllipse(IBrush b, System.Drawing.RectangleF rectangle)
fillPolygon(IBrush brush, Point[] points)
fillRectangle(IBrush b, System.Drawing.Rectangle rectangle)
fillRectangle(IBrush b, System.Drawing.RectangleF rectangle)
getCanvasSize()
getClass()
getOffsetX()
getOffsetY()
getQualityMode()
hashCode()
notify()
notifyAll()
rotateTransform(float angle)
setScaleX(float scaleX)
toString()
translateTransform(float offsetX, float offsetY)
wait()
wait(long arg0)
wait(long arg0, int arg1)

BitmapCanvas(Bitmap output, Dpi dpi, CanvasQualityMode imageMode, TextRenderingHint textHint)

public BitmapCanvas(Bitmap output, Dpi dpi, CanvasQualityMode imageMode, TextRenderingHint textHint)

Parameters:

ParameterTypeDescription
outputandroid.graphics.Bitmap
dpicom.aspose.barcode.drawing.Dpi
imageModecom.aspose.barcode.drawing.CanvasQualityMode
textHintcom.aspose.barcode.generation.TextRenderingHint

adaptFontToActualResolution(TextPaint font)

public TextPaint adaptFontToActualResolution(TextPaint font)

Parameters:

ParameterTypeDescription
fontandroid.text.TextPaint

Returns: android.text.TextPaint

clear(int color)

public void clear(int color)

Clears all canvas with specified color.

Parameters:

ParameterTypeDescription
colorint

createBrush(int color)

public IBrush createBrush(int color)

Creates brush for current canvas.

Parameters:

ParameterTypeDescription
colorint

Returns: com.aspose.barcode.drawing.IBrush

createPen(int color, float thickness)

public IPen createPen(int color, float thickness)

Creates pen for current canvas.

Parameters:

ParameterTypeDescription
colorint
thicknessfloat

Returns: com.aspose.barcode.drawing.IPen

dispose()

public void dispose()

drawImage(Bitmap bitmap, Rect dst, Rect src)

public void drawImage(Bitmap bitmap, Rect dst, Rect src)

Parameters:

ParameterTypeDescription
bitmapandroid.graphics.Bitmap
dstandroid.graphics.Rect
srcandroid.graphics.Rect

drawLine(IPen pen, Point p1, Point p2)

public void drawLine(IPen pen, Point p1, Point p2)

Draws line between two points with specified pen.

Parameters:

ParameterTypeDescription
pencom.aspose.barcode.drawing.IPen
p1android.graphics.Point
p2android.graphics.Point

drawLine(IPen pen, PointF p1, PointF p2)

public void drawLine(IPen pen, PointF p1, PointF p2)

Draws line between two points with specified pen.

Parameters:

ParameterTypeDescription
pencom.aspose.barcode.drawing.IPen
p1android.graphics.PointF
p2android.graphics.PointF

drawRectangle(IPen p, System.Drawing.Rectangle rectangle)

public void drawRectangle(IPen p, System.Drawing.Rectangle rectangle)

Draws rectangle border with specified pen.

Parameters:

ParameterTypeDescription
pcom.aspose.barcode.drawing.IPen
rectanglecom.aspose.ms.System.Drawing.Rectangle

drawRectangle(IPen p, System.Drawing.RectangleF rectangle)

public void drawRectangle(IPen p, System.Drawing.RectangleF rectangle)

Draws rectangle border with specified pen.

Parameters:

ParameterTypeDescription
pcom.aspose.barcode.drawing.IPen
rectanglecom.aspose.ms.System.Drawing.RectangleF

drawText(String text, TextPaint font, IBrush brush, PointF origin)

public void drawText(String text, TextPaint font, IBrush brush, PointF origin)

Draws text from specified origin point.

Parameters:

ParameterTypeDescription
textjava.lang.String
fontandroid.text.TextPaint
brushcom.aspose.barcode.drawing.IBrush
originandroid.graphics.PointF

drawText(String text, TextPaint font, IBrush b, System.Drawing.RectangleF bounds)

public void drawText(String text, TextPaint font, IBrush b, System.Drawing.RectangleF bounds)

Draws text in the specified text box rectangle.

Parameters:

ParameterTypeDescription
textjava.lang.String
fontandroid.text.TextPaint
bcom.aspose.barcode.drawing.IBrush
boundscom.aspose.ms.System.Drawing.RectangleF

drawText(String text, TextPaint font, IBrush brush, System.Drawing.RectangleF bounds, TextOptions options)

public void drawText(String text, TextPaint font, IBrush brush, System.Drawing.RectangleF bounds, TextOptions options)

Draws text in the specified text box rectangle with additional options.

Parameters:

ParameterTypeDescription
textjava.lang.String
fontandroid.text.TextPaint
brushcom.aspose.barcode.drawing.IBrush
boundscom.aspose.ms.System.Drawing.RectangleF
optionscom.aspose.barcode.drawing.TextOptions

drawText(String text, TextPaint font, IBrush b, float x, float y)

public void drawText(String text, TextPaint font, IBrush b, float x, float y)

Draws text from specified origin point.

Parameters:

ParameterTypeDescription
textjava.lang.String
fontandroid.text.TextPaint
bcom.aspose.barcode.drawing.IBrush
xfloat
yfloat

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

fillEllipse(IBrush b, System.Drawing.RectangleF rectangle)

public void fillEllipse(IBrush b, System.Drawing.RectangleF rectangle)

Fills ellipse with specified brush.

Parameters:

ParameterTypeDescription
bcom.aspose.barcode.drawing.IBrush
rectanglecom.aspose.ms.System.Drawing.RectangleF

fillPolygon(IBrush brush, Point[] points)

public void fillPolygon(IBrush brush, Point[] points)

Parameters:

ParameterTypeDescription
brushcom.aspose.barcode.drawing.IBrush
pointsandroid.graphics.Point[]

fillRectangle(IBrush b, System.Drawing.Rectangle rectangle)

public void fillRectangle(IBrush b, System.Drawing.Rectangle rectangle)

Fills rectangle with specified brush.

Parameters:

ParameterTypeDescription
bcom.aspose.barcode.drawing.IBrush
rectanglecom.aspose.ms.System.Drawing.Rectangle

fillRectangle(IBrush b, System.Drawing.RectangleF rectangle)

public void fillRectangle(IBrush b, System.Drawing.RectangleF rectangle)

Fills rectangle with specified brush.

Parameters:

ParameterTypeDescription
bcom.aspose.barcode.drawing.IBrush
rectanglecom.aspose.ms.System.Drawing.RectangleF

getCanvasSize()

public System.Drawing.Size getCanvasSize()

Returns: com.aspose.ms.System.Drawing.Size

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getOffsetX()

public float getOffsetX()

Returns: float

getOffsetY()

public float getOffsetY()

Returns: float

getQualityMode()

public CanvasQualityMode getQualityMode()

Returns: com.aspose.barcode.drawing.CanvasQualityMode

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

rotateTransform(float angle)

public void rotateTransform(float angle)

Applies rotate transform for all further drawing.

Parameters:

ParameterTypeDescription
anglefloat

setScaleX(float scaleX)

public void setScaleX(float scaleX)

Sets scale factor for all further drawings

Parameters:

ParameterTypeDescription
scaleXfloat

toString()

public String toString()

Returns: java.lang.String

translateTransform(float offsetX, float offsetY)

public void translateTransform(float offsetX, float offsetY)

Applies translate transform for all further drawing.

Parameters:

ParameterTypeDescription
offsetXfloat
offsetYfloat

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int