SvgCanvas

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.barcode.drawing.ICanvas, com.aspose.ms.System.IDisposable

public class SvgCanvas implements ICanvas, System.IDisposable

Represents SVG canvas.

Constructors

Constructor Description
SvgCanvas(int width, int height, System.IO.Stream output, float dpi, CanvasQualityMode qualityMode)

Methods

Method Description
clear(System.Drawing.Color color)
closeTransformGroup()
createBrush(System.Drawing.Color color)
createPen(System.Drawing.Color color, float thickness)
dispose()
drawLine(IPen pen, System.Drawing.Point p1, System.Drawing.Point p2)
drawLine(IPen pen, System.Drawing.PointF p1, System.Drawing.PointF p2)
drawRectangle(IPen pen, System.Drawing.Rectangle rectangle)
drawRectangle(IPen pen, System.Drawing.RectangleF rectangle)
drawText(String text, System.Drawing.Font font, IBrush brush, System.Drawing.PointF origin)
drawText(String text, System.Drawing.Font font, IBrush brush, 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 brush, float x, float y)
endDrawing()
equals(Object arg0)
fillEllipse(IBrush brush, System.Drawing.RectangleF rectangle)
fillPolygon(IBrush brush, System.Drawing.Point[] points)
fillRectangle(IBrush brush, System.Drawing.Rectangle rectangle)
fillRectangle(IBrush brush, System.Drawing.RectangleF rectangle)
getCanvasSize()
getClass()
getOffsetX()
getOffsetY()
getQualityMode()
hashCode()
notify()
notifyAll()
rotateTransform(float angle)
scaleTransform(float dx, float dy)
setScaleX(float scaleX)
toString()
translateTransform(float offsetX, float offsetY)
wait()
wait(long arg0)
wait(long arg0, int arg1)

SvgCanvas(int width, int height, System.IO.Stream output, float dpi, CanvasQualityMode qualityMode)

public SvgCanvas(int width, int height, System.IO.Stream output, float dpi, CanvasQualityMode qualityMode)

Parameters:

Parameter Type Description
width int
height int
output com.aspose.ms.System.IO.Stream
dpi float
qualityMode CanvasQualityMode

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

closeTransformGroup()

public void closeTransformGroup()

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()

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

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

Draws line between two points with specified pen.

Parameters:

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

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

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

Draws line between two points with specified pen.

Parameters:

Parameter Type Description
pen IPen
p1 com.aspose.ms.System.Drawing.PointF
p2 com.aspose.ms.System.Drawing.PointF

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

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

Draws rectangle border with specified pen.

Parameters:

Parameter Type Description
pen IPen
rectangle com.aspose.ms.System.Drawing.Rectangle

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

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

Draws rectangle border with specified pen.

Parameters:

Parameter Type Description
pen IPen
rectangle com.aspose.ms.System.Drawing.RectangleF

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

public void drawText(String text, System.Drawing.Font font, IBrush brush, 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
brush IBrush
origin com.aspose.ms.System.Drawing.PointF

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

public void drawText(String text, System.Drawing.Font font, IBrush brush, 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
brush 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 brush, float x, float y)

public void drawText(String text, System.Drawing.Font font, IBrush brush, 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
brush IBrush
x float
y float

endDrawing()

public void endDrawing()

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

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

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

Fills ellipse with specified brush.

Parameters:

Parameter Type Description
brush IBrush
rectangle com.aspose.ms.System.Drawing.RectangleF

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

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

Parameters:

Parameter Type Description
brush IBrush
points com.aspose.ms.System.Drawing.Point[]

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

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

Fills rectangle with specified brush.

Parameters:

Parameter Type Description
brush IBrush
rectangle com.aspose.ms.System.Drawing.Rectangle

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

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

Fills rectangle with specified brush.

Parameters:

Parameter Type Description
brush 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

scaleTransform(float dx, float dy)

public void scaleTransform(float dx, float dy)

Parameters:

Parameter Type Description
dx float
dy 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