Class ImageSaveOptions
- java.lang.Object
-
- com.aspose.tasks.SaveOptions
-
- com.aspose.tasks.ImageSaveOptions
-
public class ImageSaveOptions extends SaveOptions
Allows to specify additional options when rendering project pages to images.
-
-
Constructor Summary
Constructors Constructor Description ImageSaveOptions(int saveFormat)
Initializes a new instance of theImageSaveOptions
class which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyOutputPropertiesFrom(SaveOptions source)
SaveOptions
deepClone()
String
getDefaultFontName()
Gets the default font for rendering.FontResolveCallbackDelegate
getFontResolveCallback()
Gets a callback which can be used to customize resolved fonts.float
getHorizontalResolution()
Gets the horizontal resolution in dpi.int
getJpegQuality()
Gets a JPEG quality.List<Integer>
getPages()
Gets a list of page numbers to save when saving project layout to separate files.IPageSavingCallback
getPageSavingCallback()
Gets a user-defined callback which is used to get an output stream for each rendered page.int
getPixelFormat()
Gets the format of the color data for each pixel in the image.boolean
getReduceFooterGap()
Gets a value indicating whether a gap between last task and the footer must be reduced.int
getTiffCompression()
Gets the type of compression to apply when saving generated images to the TIFF format.boolean
getUseProjectDefaultFont()
Gets a value indicating whether the default font must be used for rendering.float
getVerticalResolution()
Gets the vertical resolution in dpi.void
setDefaultFontName(String value)
Sets the default font for rendering.void
setFontResolveCallback(FontResolveCallbackDelegate value)
Sets a callback which can be used to customize resolved fonts.void
setHorizontalResolution(float value)
Sets the horizontal resolution in dpi.void
setJpegQuality(int value)
Sets a JPEG quality.void
setPages(List<Integer> value)
Sets a list of page numbers to save when saving project layout to separate files.void
setPageSavingCallback(IPageSavingCallback value)
Sets a user-defined callback which is used to get an output stream for each rendered page.void
setPixelFormat(int value)
Sets the format of the color data for each pixel in the image.void
setReduceFooterGap(boolean value)
Sets a value indicating whether a gap between last task and the footer must be reduced.void
setTiffCompression(int value)
Sets the type of compression to apply when saving generated images to the TIFF format.void
setUseProjectDefaultFont(boolean value)
Sets a value indicating whether the default font must be used for rendering.void
setVerticalResolution(float value)
Sets the vertical resolution in dpi.-
Methods inherited from class com.aspose.tasks.SaveOptions
getBarStyles, getCustomPageSize, getDrawNonWorkingTime, getEndDate, getFitContent, getGridlines, getLegendOnEachPage, getMarkCriticalTasks, getNonWorkingTimeColor, getPageCount, getPageSize, getPresentationFormat, getRenderToSinglePage, getRollUpGanttBars, getSaveFormat, getStartDate, getTasksComparer, getTasksFilter, getTextStyles, getTimescale, getUseGradientBrush, getView, getViewSettings, setBarStyles, setCustomPageSize, setDrawNonWorkingTime, setEndDate, setFitContent, setGridlines, setLegendOnEachPage, setMarkCriticalTasks, setNonWorkingTimeColor, setPageSize, setPresentationFormat, setRenderToSinglePage, setRollUpGanttBars, setStartDate, setTasksComparer, setTasksFilter, setTextStyles, setTimescale, setUseGradientBrush, setView, setViewSettings
-
-
-
-
Constructor Detail
-
ImageSaveOptions
public ImageSaveOptions(int saveFormat)
Initializes a new instance of the
ImageSaveOptions
class which can be used to save rendered images in TIFF, PNG, BMP or JPEG formats.- Parameters:
saveFormat
- Can be TIFF, PNG, BMP or JPEGSaveFileFormat
.- Throws:
com.aspose.ms.System.ArgumentException
- Thrown ofsaveFormat
is not a valid image format. The valid values are TIFF, PNG, BMP or JPEG.
-
-
Method Detail
-
copyOutputPropertiesFrom
public final void copyOutputPropertiesFrom(SaveOptions source)
- Parameters:
source
-
-
deepClone
public SaveOptions deepClone()
- Returns:
-
getDefaultFontName
public final String getDefaultFontName()
Gets the default font for rendering.
- Returns:
- the default font for rendering.
-
setDefaultFontName
public final void setDefaultFontName(String value)
Sets the default font for rendering.
- Parameters:
value
- the default font for rendering.
-
getFontResolveCallback
public final FontResolveCallbackDelegate getFontResolveCallback()
Gets a callback which can be used to customize resolved fonts.
- Returns:
- a callback which can be used to customize resolved fonts.
-
setFontResolveCallback
public final void setFontResolveCallback(FontResolveCallbackDelegate value)
Sets a callback which can be used to customize resolved fonts.
- Parameters:
value
- a callback which can be used to customize resolved fonts.
-
getHorizontalResolution
public final float getHorizontalResolution()
Gets the horizontal resolution in dpi.
- Returns:
- the horizontal resolution in dpi.
-
setHorizontalResolution
public final void setHorizontalResolution(float value)
Sets the horizontal resolution in dpi.
- Parameters:
value
- the horizontal resolution in dpi.
-
getJpegQuality
public final int getJpegQuality()
Gets a JPEG quality. The allowed value range is 0..100.
- Returns:
- a JPEG quality.
-
setJpegQuality
public final void setJpegQuality(int value)
Sets a JPEG quality. The allowed value range is 0..100.
- Parameters:
value
- a JPEG quality.
-
getPageSavingCallback
public final IPageSavingCallback getPageSavingCallback()
Gets a user-defined callback which is used to get an output stream for each rendered page.
- Returns:
- a user-defined callback which is used to get an output stream for each rendered page.
-
setPageSavingCallback
public final void setPageSavingCallback(IPageSavingCallback value)
Sets a user-defined callback which is used to get an output stream for each rendered page.
- Parameters:
value
- a user-defined callback which is used to get an output stream for each rendered page.
-
getPages
public final List<Integer> getPages()
Gets a list of page numbers to save when saving project layout to separate files.
All pages will be saved if this list is empty.- Returns:
- a list of page numbers to save when saving project layout to separate files.
-
setPages
public final void setPages(List<Integer> value)
Sets a list of page numbers to save when saving project layout to separate files.
All pages will be saved if this list is empty.- Parameters:
value
- a list of page numbers to save when saving project layout to separate files.
-
getPixelFormat
public final int getPixelFormat()
Gets the format of the color data for each pixel in the image.
- Returns:
- the format of the color data for each pixel in the image.
-
setPixelFormat
public final void setPixelFormat(int value)
Sets the format of the color data for each pixel in the image.
- Parameters:
value
- the format of the color data for each pixel in the image.
-
getReduceFooterGap
public final boolean getReduceFooterGap()
Gets a value indicating whether a gap between last task and the footer must be reduced.
- Returns:
- a value indicating whether a gap between last task and the footer must be reduced.
-
setReduceFooterGap
public final void setReduceFooterGap(boolean value)
Sets a value indicating whether a gap between last task and the footer must be reduced.
- Parameters:
value
- a value indicating whether a gap between last task and the footer must be reduced.
-
getTiffCompression
public final int getTiffCompression()
Gets the type of compression to apply when saving generated images to the TIFF format.
Has effect only when saving to TIFF. The default value isTiffCompressionLZW
(getTiffCompression()
/setTiffCompression(int)
).- Returns:
- the type of compression to apply when saving generated images to the TIFF format.
-
setTiffCompression
public final void setTiffCompression(int value)
Sets the type of compression to apply when saving generated images to the TIFF format.
Has effect only when saving to TIFF. The default value isTiffCompressionLZW
(getTiffCompression()
/setTiffCompression(int)
).- Parameters:
value
- the type of compression to apply when saving generated images to the TIFF format.
-
getUseProjectDefaultFont
public final boolean getUseProjectDefaultFont()
Gets a value indicating whether the default font must be used for rendering.
- Returns:
- a value indicating whether the default font must be used for rendering.
-
setUseProjectDefaultFont
public final void setUseProjectDefaultFont(boolean value)
Sets a value indicating whether the default font must be used for rendering.
- Parameters:
value
- a value indicating whether the default font must be used for rendering.
-
getVerticalResolution
public final float getVerticalResolution()
Gets the vertical resolution in dpi.
- Returns:
- the vertical resolution in dpi.
-
setVerticalResolution
public final void setVerticalResolution(float value)
Sets the vertical resolution in dpi.
- Parameters:
value
- the vertical resolution in dpi.
-
-