Click or drag to resize
IGraphicFactoryConvertGraphic Method
Public API of XMLmind XSL-FO Converter for .NET
Converts specified graphic to specified format, while optionally rescaling it.

Namespace: XmlMind.FoConverter
Assembly: xfc-api (in xfc-api.dll) Version: 6.3.0
Syntax
IGraphic ConvertGraphic(
	IGraphic graphic,
	string format,
	double xScale,
	double yScale,
	Object clientData,
	IGraphicEnv env
)

Parameters

graphic
Type: XmlMind.FoConverterIGraphic
graphic to be converted
format
Type: SystemString
MIME type of the image to be created. This format is guaranteed to be listed by GetOutputFormats.
xScale
Type: SystemDouble
scaling factor to apply to the width of graphic
yScale
Type: SystemDouble
scaling factor to apply to the height of graphic
clientData
Type: SystemObject
opaque client data to be associated with the newly created graphic
env
Type: XmlMind.FoConverterIGraphicEnv
services provided by XMLmind XSL-FO Converter

Return Value

Type: IGraphic
a newly created graphic
Exceptions
ExceptionCondition
Exceptionif, for any reason, this method fails
Remarks

Even when there is apparently nothing to do (that is, same format, no scaling), this method saves a copy of graphic and returns the saved copy. This method never returns graphic.

IMPORTANT: if graphic has resolution information and if image format format allows to store this information, then this resolution information must be stored in the source of the newly created Graphic.

See Also