public abstract class VectorImageResourceBase extends Object implements IImageResource
Base class for any supported vector image
| Modifier and Type | Field and Description |
|---|---|
protected Ratio |
_aspectRatio
Aspect ratio, which should always be valid
|
protected com.aspose.ms.System.IO.Stream |
_binaryContent
Content of the image in the stream
|
protected boolean |
_isDisposed
Flag, which indicates, whether this image is disposed
|
protected Dimensions |
_linearDimensions
Linear dimensions of the vector image, if they are present
|
protected String |
_name
Name of the vector image, which serves as its unique identifier.
|
protected long |
_streamOrigPosition
Original position in the stream, which indicates the beginning of the
image content
|
protected String |
_textContent
Content of the image in base64-encoded form, stored in the string
|
Event<EventHandler> |
Disposed |
| Constructor and Description |
|---|
VectorImageResourceBase() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
dispose()
In implementing type should dispose this instance
|
boolean |
equals(IHtmlResource other)
Checks this instance with specified on reference equality.
|
protected void |
fireDisposedEvent()
Fires a 'Disposed' event
|
Ratio |
getAspectRatio()
Returns aspect ratio of this vector image
|
InputStream |
getByteContent()
In implementing type should return a content of this vector image as byte
stream
|
String |
getFilenameWithExtension()
Returns correct filename of this vector image, which consists of name and
extension.
|
Dimensions |
getLinearDimensions()
Returns linear dimensions of this vector image (width and height)
|
String |
getName()
Returns name of this vector image.
|
abstract String |
getTextContent()
In implementing type should return a content of this vector image in text
form: base64-encoded of XML regarding of image type
|
abstract ImageType |
getType()
In implementing type should return information about type of the vector
image
|
boolean |
isDisposed()
Determines whether this raster image is disposed or not
|
abstract void |
save(String fullPathToFile)
In implementing type should save this image to the disk by specified path
|
abstract void |
saveToPng(OutputStream outputPngContent)
In implementing type should save a current vector image to the raster PNG
format into specified byte stream
|
protected Ratio _aspectRatio
Aspect ratio, which should always be valid
protected com.aspose.ms.System.IO.Stream _binaryContent
Content of the image in the stream
protected boolean _isDisposed
Flag, which indicates, whether this image is disposed
protected Dimensions _linearDimensions
Linear dimensions of the vector image, if they are present
protected String _name
Name of the vector image, which serves as its unique identifier. Should not be changed (readonly) after creating an instance of the class.
protected long _streamOrigPosition
Original position in the stream, which indicates the beginning of the image content
protected String _textContent
Content of the image in base64-encoded form, stored in the string
public final Event<EventHandler> Disposed
public abstract void dispose()
In implementing type should dispose this instance
dispose in interface IDisposablepublic final boolean equals(IHtmlResource other)
Checks this instance with specified on reference equality.
other - Other instance of vector imageprotected final void fireDisposedEvent()
Fires a 'Disposed' event
public final Ratio getAspectRatio()
Returns aspect ratio of this vector image
getAspectRatio in interface IImageResourcepublic InputStream getByteContent()
In implementing type should return a content of this vector image as byte stream
getByteContent in interface IHtmlResourcepublic final String getFilenameWithExtension()
Returns correct filename of this vector image, which consists of name and extension. Theoretically can differ from the name.
getFilenameWithExtension in interface IHtmlResourcepublic final Dimensions getLinearDimensions()
Returns linear dimensions of this vector image (width and height)
getLinearDimensions in interface IImageResourcepublic final String getName()
Returns name of this vector image. Usually doesn't contain filename extension and theoretically can differ from filename.
getName in interface IHtmlResourcepublic abstract String getTextContent()
In implementing type should return a content of this vector image in text form: base64-encoded of XML regarding of image type
getTextContent in interface IHtmlResourcepublic abstract ImageType getType()
In implementing type should return information about type of the vector image
getType in interface IHtmlResourcegetType in interface IImageResourcepublic final boolean isDisposed()
Determines whether this raster image is disposed or not
isDisposed in interface IAuxDisposablepublic abstract void save(String fullPathToFile)
In implementing type should save this image to the disk by specified path
save in interface IHtmlResourcefullPathToFile - public abstract void saveToPng(OutputStream outputPngContent)
In implementing type should save a current vector image to the raster PNG format into specified byte stream
outputPngContent - Byte stream, into which the PNG version of this
raster image will be stored. Should not be NULL and should support
writing.Copyright © 2024. All rights reserved.