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
Constructor | Description |
---|---|
BitmapCanvas(Bitmap output, Dpi dpi, CanvasQualityMode imageMode, TextRenderingHint textHint) |
Methods
BitmapCanvas(Bitmap output, Dpi dpi, CanvasQualityMode imageMode, TextRenderingHint textHint)
public BitmapCanvas(Bitmap output, Dpi dpi, CanvasQualityMode imageMode, TextRenderingHint textHint)
Parameters:
Parameter | Type | Description |
---|---|---|
output | android.graphics.Bitmap | |
dpi | com.aspose.barcode.drawing.Dpi | |
imageMode | com.aspose.barcode.drawing.CanvasQualityMode | |
textHint | com.aspose.barcode.generation.TextRenderingHint |
adaptFontToActualResolution(TextPaint font)
public TextPaint adaptFontToActualResolution(TextPaint font)
Parameters:
Parameter | Type | Description |
---|---|---|
font | android.text.TextPaint |
Returns: android.text.TextPaint
clear(int color)
public void clear(int color)
Clears all canvas with specified color.
Parameters:
Parameter | Type | Description |
---|---|---|
color | int |
createBrush(int color)
public IBrush createBrush(int color)
Creates brush for current canvas.
Parameters:
Parameter | Type | Description |
---|---|---|
color | int |
Returns: com.aspose.barcode.drawing.IBrush
createPen(int color, float thickness)
public IPen createPen(int color, float thickness)
Creates pen for current canvas.
Parameters:
Parameter | Type | Description |
---|---|---|
color | int | |
thickness | float |
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:
Parameter | Type | Description |
---|---|---|
bitmap | android.graphics.Bitmap | |
dst | android.graphics.Rect | |
src | android.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:
Parameter | Type | Description |
---|---|---|
pen | com.aspose.barcode.drawing.IPen | |
p1 | android.graphics.Point | |
p2 | android.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:
Parameter | Type | Description |
---|---|---|
pen | com.aspose.barcode.drawing.IPen | |
p1 | android.graphics.PointF | |
p2 | android.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:
Parameter | Type | Description |
---|---|---|
p | com.aspose.barcode.drawing.IPen | |
rectangle | com.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:
Parameter | Type | Description |
---|---|---|
p | com.aspose.barcode.drawing.IPen | |
rectangle | com.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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | |
font | android.text.TextPaint | |
brush | com.aspose.barcode.drawing.IBrush | |
origin | android.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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | |
font | android.text.TextPaint | |
b | com.aspose.barcode.drawing.IBrush | |
bounds | com.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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | |
font | android.text.TextPaint | |
brush | com.aspose.barcode.drawing.IBrush | |
bounds | com.aspose.ms.System.Drawing.RectangleF | |
options | com.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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | |
font | android.text.TextPaint | |
b | com.aspose.barcode.drawing.IBrush | |
x | float | |
y | float |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
b | com.aspose.barcode.drawing.IBrush | |
rectangle | com.aspose.ms.System.Drawing.RectangleF |
fillPolygon(IBrush brush, Point[] points)
public void fillPolygon(IBrush brush, Point[] points)
Parameters:
Parameter | Type | Description |
---|---|---|
brush | com.aspose.barcode.drawing.IBrush | |
points | android.graphics.Point[] |
fillRectangle(IBrush b, System.Drawing.Rectangle rectangle)
public void fillRectangle(IBrush b, System.Drawing.Rectangle rectangle)
Fills rectangle with specified brush.
Parameters:
Parameter | Type | Description |
---|---|---|
b | com.aspose.barcode.drawing.IBrush | |
rectangle | com.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:
Parameter | Type | Description |
---|---|---|
b | com.aspose.barcode.drawing.IBrush | |
rectangle | com.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:
Parameter | Type | Description |
---|---|---|
angle | float |
setScaleX(float scaleX)
public void setScaleX(float scaleX)
Sets scale factor for all further drawings
Parameters:
Parameter | Type | Description |
---|---|---|
scaleX | float |
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:
Parameter | Type | Description |
---|---|---|
offsetX | float | |
offsetY | float |
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |