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(System.Drawing.Bitmap output, Dpi dpi, CanvasQualityMode imageMode, int textHint)
BitmapCanvas(System.Drawing.Bitmap output)

Methods

Method Description
clear(System.Drawing.Color color)
createBrush(System.Drawing.Color color)
createPen(System.Drawing.Color color, float thickness)
dispose()
drawImage(System.Drawing.Bitmap bitmap, System.Drawing.Rectangle dst, System.Drawing.Rectangle src)
drawLine(IPen p, System.Drawing.Point p1, System.Drawing.Point p2)
drawLine(IPen p, System.Drawing.PointF p1, System.Drawing.PointF p2)
drawRectangle(IPen p, System.Drawing.Rectangle rectangle)
drawRectangle(IPen p, System.Drawing.RectangleF rectangle)
drawText(String text, System.Drawing.Font font, IBrush b, System.Drawing.PointF origin)
drawText(String text, System.Drawing.Font font, IBrush b, System.Drawing.RectangleF bounds)
drawText(String text, System.Drawing.Font font, IBrush brush, System.Drawing.RectangleF bounds, TextOptions options)
drawText(String text, System.Drawing.Font font, IBrush b, float x, float y)
equals(Object arg0)
fillEllipse(IBrush b, System.Drawing.RectangleF rectangle)
fillPolygon(IBrush b, System.Drawing.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(System.Drawing.Bitmap output, Dpi dpi, CanvasQualityMode imageMode, int textHint)

public BitmapCanvas(System.Drawing.Bitmap output, Dpi dpi, CanvasQualityMode imageMode, int textHint)

Parameters:

Parameter Type Description
output com.aspose.ms.System.Drawing.Bitmap
dpi Dpi
imageMode CanvasQualityMode
textHint int

BitmapCanvas(System.Drawing.Bitmap output)

public BitmapCanvas(System.Drawing.Bitmap output)

Parameters:

Parameter Type Description
output com.aspose.ms.System.Drawing.Bitmap

clear(System.Drawing.Color color)

public void clear(System.Drawing.Color color)

Clears all canvas with specified color.

Parameters:

Parameter Type Description
color com.aspose.ms.System.Drawing.Color

createBrush(System.Drawing.Color color)

public IBrush createBrush(System.Drawing.Color color)

Creates brush for current canvas.

Parameters:

Parameter Type Description
color com.aspose.ms.System.Drawing.Color

Returns: IBrush

createPen(System.Drawing.Color color, float thickness)

public IPen createPen(System.Drawing.Color color, float thickness)

Creates pen for current canvas.

Parameters:

Parameter Type Description
color com.aspose.ms.System.Drawing.Color
thickness float

Returns: IPen

dispose()

public void dispose()

drawImage(System.Drawing.Bitmap bitmap, System.Drawing.Rectangle dst, System.Drawing.Rectangle src)

public void drawImage(System.Drawing.Bitmap bitmap, System.Drawing.Rectangle dst, System.Drawing.Rectangle src)

Parameters:

Parameter Type Description
bitmap com.aspose.ms.System.Drawing.Bitmap
dst com.aspose.ms.System.Drawing.Rectangle
src com.aspose.ms.System.Drawing.Rectangle

drawLine(IPen p, System.Drawing.Point p1, System.Drawing.Point p2)

public void drawLine(IPen p, System.Drawing.Point p1, System.Drawing.Point p2)

Draws line between two points with specified pen.

Parameters:

Parameter Type Description
p IPen
p1 com.aspose.ms.System.Drawing.Point
p2 com.aspose.ms.System.Drawing.Point

drawLine(IPen p, System.Drawing.PointF p1, System.Drawing.PointF p2)

public void drawLine(IPen p, System.Drawing.PointF p1, System.Drawing.PointF p2)

Draws line between two points with specified pen.

Parameters:

Parameter Type Description
p IPen
p1 com.aspose.ms.System.Drawing.PointF
p2 com.aspose.ms.System.Drawing.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 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 IPen
rectangle com.aspose.ms.System.Drawing.RectangleF

drawText(String text, System.Drawing.Font font, IBrush b, System.Drawing.PointF origin)

public void drawText(String text, System.Drawing.Font font, IBrush b, System.Drawing.PointF origin)

Draws text from specified origin point.

Parameters:

Parameter Type Description
text java.lang.String
font com.aspose.ms.System.Drawing.Font
b IBrush
origin com.aspose.ms.System.Drawing.PointF

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

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

Draws text in the specified text box rectangle.

Parameters:

Parameter Type Description
text java.lang.String
font com.aspose.ms.System.Drawing.Font
b IBrush
bounds com.aspose.ms.System.Drawing.RectangleF

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

public void drawText(String text, System.Drawing.Font 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 com.aspose.ms.System.Drawing.Font
brush IBrush
bounds com.aspose.ms.System.Drawing.RectangleF
options TextOptions

drawText(String text, System.Drawing.Font font, IBrush b, float x, float y)

public void drawText(String text, System.Drawing.Font font, IBrush b, float x, float y)

Draws text from specified origin point.

Parameters:

Parameter Type Description
text java.lang.String
font com.aspose.ms.System.Drawing.Font
b 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 IBrush
rectangle com.aspose.ms.System.Drawing.RectangleF

fillPolygon(IBrush b, System.Drawing.Point[] points)

public void fillPolygon(IBrush b, System.Drawing.Point[] points)

Parameters:

Parameter Type Description
b IBrush
points com.aspose.ms.System.Drawing.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 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 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: 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