public abstract class MetafileImage extends Image implements Cloneable
Modifier and Type | Method and Description |
---|---|
void |
cacheData()
Caches the data and ensures no additional data loading will be performed from the underlying
DataStreamSupporter.DataStreamContainer . |
Object |
clone()
Creates a copy of the metafile object.
|
RenderedImage |
createDefaultRendering()
Creates a RenderedImage with default size unless it exceeds
MinPixelCount..MaxPixelCount range.
|
RenderedImage |
createScaledRendering(int w,
int h,
RenderingHints hints)
Creates a RenderedImage with the specified width and height.
|
void |
crop(int leftShift,
int rightShift,
int topShift,
int bottomShift)
Crop image with shifts.
|
void |
crop(Rectangle rectangle)
Crops the specified rectangle.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
abstract Rectangle |
getBounds()
Returns the metafile's bounds.
Note: this rectangle is not an image size. |
abstract com.aspose.imaging.fileformats.metafile.MetafileComment[] |
getComments() |
Rectangle |
getCroppingRectangle()
Returns the copping rectangle.
|
RenderingHints |
getDefaultRenderingHints()
Returns metafile's default RenderingHints.
|
com.aspose.imaging.fileformats.metafile.EmbeddedBitmap[] |
getEmbeddedBitmaps()
Returns an array containing copies of binary data of all embedded bitmaps.
|
int |
getHeight()
Returns the height of a metafile.
|
int |
getMaxPixelCount()
Returns a maximum number of pixels in the image, created by
createDefaultRendering() method.
|
int |
getMinPixelCount()
Returns a minimum number of pixels in the image created by
createDefaultRendering() method.
|
float |
getMinX()
Returns the minimum X coordinate of a metafile.
|
float |
getMinY()
Returns the minimum Y coordinate of a metafile.
|
abstract String[] |
getMissedFonts()
Retu rns the list of fonts which used inside metafile and are not found in system.
|
Object |
getProperty(String name)
Required by RenderableImage interface.
|
String[] |
getPropertyNames()
Required by RenderableImage interface.
|
Color |
getRenderableBackgroundColor()
Returns a color to fill a RenderedImage generated by RenderableImage's methods.
|
Vector |
getSources()
Required by RenderableImage interface.
|
com.aspose.imaging.fileformats.metafile.TextOutOperation[] |
getTextOutOperations()
Returns all TextOut Operations of a metafile.
|
String[] |
getTextStrings()
Returns all strings from a metafile.
|
abstract String[] |
getUsedFonts()
Returns the list of font which used inside metafile.
|
abstract com.aspose.imaging.fileformats.metafile.MetafileRecorderGraphics2D |
getWatermarkDrawer()
Returns the custom watermark drawer
|
int |
getWidth()
Returns the width of a metafile.
|
boolean |
isCached()
Gets a value indicating whether object's data is cached currently and no data readig is required.
|
boolean |
isDynamic()
Required by RenderableImage interface.
|
abstract void |
playMetafile(Graphics2D target)
Plays a metafile without transform to the specified Graphics2D object.
|
abstract void |
playMetafile(Graphics2D target,
AffineTransform trans)
Plays a metafile to the specified Graphics2D object.
|
void |
resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
|
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
|
void |
rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
|
void |
save_internalized(com.aspose.ms.System.IO.Stream stream)
Saves the object's data to the specified stream.
|
void |
setDefaultRenderingHints(RenderingHints rh)
Replaces current metafile's default RenderingHints.
Note: default rendering hints used only by createRendering(), createDefaultRendering(), createScaledRendering() and methods, which use them. |
void |
setMaxPixelCount(int value)
Sets a maximum number of pixels in the image, created by
createDefaultRendering() method.
|
void |
setMinPixelCount(int value)
Sets a minimum number of pixels in the image, created by
createDefaultRendering() method.
|
void |
setPalette(IColorPalette palette,
boolean updateColors)
Sets the image palette.
|
void |
setRenderableBackgroundColor(Color color)
Sets a color to fill a RenderedImage generated by RenderableImage's methods.
|
canLoad, canLoad, canLoad, canLoad, canLoadInternal_internalized, canLoadInternal_internalized, canSave, create, getBackgroundColor, getContainer, getFileFormat, getFileFormat, getFileFormatInternal_internalized, getFittingRectangle, getFittingRectangle, getPalette, getProportionalHeight, getProportionalWidth, getSize, getVentureLicense_internalized, hasBackgroundColor, load, load, load, load, loadInternal_internalized, loadInternal_internalized, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save_internalized, save, save, save, save, save, setBackgroundColor, setBackgroundColor, setContainer_internalized, setPalette, setVentureLicense_internalized
getDataStreamContainer, save, save, save, setDataStreamContainer
close, dispose, getDisposed
public abstract Rectangle getBounds()
getBounds
in interface IObjectWithBounds
getBounds
in class Image
public abstract void playMetafile(Graphics2D target) throws MetafilesException
target
- -
Graphics2D object.MetafilesException
public abstract void playMetafile(Graphics2D target, AffineTransform trans) throws MetafilesException
target
- -
Graphics2D object.trans
- -
coordinates transformation from metafile's coordinates to
Graphics2D user space.MetafilesException
public Vector getSources()
public float getMinX()
public float getMinY()
public int getWidth()
getWidth
in interface IObjectWithBounds
getWidth
in class Image
public void resize(int newWidth, int newHeight, ImageResizeSettings settings)
Image
Resizes the image.
public int getHeight()
getHeight
in interface IObjectWithBounds
getHeight
in class Image
public boolean isDynamic()
public String[] getPropertyNames()
public Object getProperty(String name)
public RenderedImage createScaledRendering(int w, int h, RenderingHints hints)
w
- -
image width.h
- -
image height.hints
- -
RenderingHits used to draw and scale metafile.public RenderedImage createDefaultRendering()
public void setDefaultRenderingHints(RenderingHints rh)
rh
- -
new default RenderingHints.public RenderingHints getDefaultRenderingHints()
public com.aspose.imaging.fileformats.metafile.TextOutOperation[] getTextOutOperations() throws MetafilesException
MetafilesException
public String[] getTextStrings() throws MetafilesException
MetafilesException
public void crop(int leftShift, int rightShift, int topShift, int bottomShift)
Crop image with shifts.
leftShift
- The left shift.rightShift
- The right shift.topShift
- The top shift.bottomShift
- The bottom shift.public void crop(Rectangle rectangle)
Crops the specified rectangle.
rectangle
- The rectangle.public Rectangle getCroppingRectangle()
Returns the copping rectangle.
public int getMinPixelCount()
public void setMinPixelCount(int value)
public int getMaxPixelCount()
public void setMaxPixelCount(int value)
public Color getRenderableBackgroundColor()
public void setRenderableBackgroundColor(Color color)
public abstract com.aspose.imaging.fileformats.metafile.MetafileComment[] getComments()
public com.aspose.imaging.fileformats.metafile.EmbeddedBitmap[] getEmbeddedBitmaps()
public Object clone()
public boolean isCached()
DataStreamSupporter
Gets a value indicating whether object's data is cached currently and no data readig is required.
Value:true
if object's data is cached; otherwise, false
.isCached
in class DataStreamSupporter
public void cacheData()
DataStreamSupporter
Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer
.
cacheData
in class DataStreamSupporter
public void save_internalized(com.aspose.ms.System.IO.Stream stream)
DataStreamSupporter
Saves the object's data to the specified stream.
save_internalized
in class DataStreamSupporter
stream
- The stream to save the object's data to.public void resize(int newWidth, int newHeight, int resizeType)
Image
Resizes the image.
public void rotateFlip(int rotateFlipType)
Image
Rotates, flips, or rotates and flips the image.
rotateFlip
in class Image
rotateFlipType
- Type of the rotate flip.public void setPalette(IColorPalette palette, boolean updateColors)
Image
Sets the image palette.
setPalette
in class Image
palette
- The palette to set.updateColors
- if set to true
colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.public int getBitsPerPixel()
Image
Gets the image bits per pixel count.
Value: The image bits per pixel count.getBitsPerPixel
in class Image
public abstract com.aspose.imaging.fileformats.metafile.MetafileRecorderGraphics2D getWatermarkDrawer()
Returns the custom watermark drawer
Graphics2D
watermark drawer.public abstract String[] getUsedFonts()
public abstract String[] getMissedFonts()
Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.