**Inheritance:**
java.lang.Object
```
public class VectorRasterizationOptions
```

The vector rasterization options. Please note that [VectorRasterizationOptions](../../com.aspose.imaging.imageoptions/vectorrasterizationoptions) will no longer derive from [ImageOptionsBase](../../com.aspose.imaging/imageoptionsbase) since Aspose.Imaging 24.12 version.
## Constructors

| Constructor | Description |
| --- | --- |
| [VectorRasterizationOptions()](#VectorRasterizationOptions--) |  |
| [VectorRasterizationOptions(VectorRasterizationOptions imageOptions)](#VectorRasterizationOptions-com.aspose.imaging.imageoptions.VectorRasterizationOptions-) |  |
## Methods

| Method | Description |
| --- | --- |
| [getSmoothingMode()](#getSmoothingMode--) | Gets the smoothing mode. |
| [setSmoothingMode(int value)](#setSmoothingMode-int-) | Sets the smoothing mode. |
| [getBorderX()](#getBorderX--) | Gets or sets the border X in pixels. |
| [setBorderX(float value)](#setBorderX-float-) | Gets or sets the border X in pixels. |
| [getBorderY()](#getBorderY--) | Gets or sets the border Y in pixels. |
| [setBorderY(float value)](#setBorderY-float-) | Gets or sets the border Y in pixels. |
| [getCenterDrawing()](#getCenterDrawing--) | Gets a value indicating whether center drawing. |
| [setCenterDrawing(boolean value)](#setCenterDrawing-boolean-) | Sets a value indicating whether center drawing. |
| [getPageHeight()](#getPageHeight--) | Gets the page height. |
| [setPageHeight(float value)](#setPageHeight-float-) | Sets the page height in pixels. |
| [getPageSize()](#getPageSize--) | Gets the page size in pixels. |
| [setPageSize(SizeF value)](#setPageSize-com.aspose.imaging.SizeF-) | Sets the page size in pixels. |
| [setPageSize(Size value)](#setPageSize-com.aspose.imaging.Size-) | Sets the page size in pixels. |
| [getPageWidth()](#getPageWidth--) | Gets the page width. |
| [setPageWidth(float value)](#setPageWidth-float-) | Sets the page width. |
| [getBackgroundColor()](#getBackgroundColor--) | Gets a background color. |
| [setBackgroundColor(Color value)](#setBackgroundColor-com.aspose.imaging.Color-) | Sets a background color. |
| [getDrawColor()](#getDrawColor--) | Gets a foreground color. |
| [setDrawColor(Color value)](#setDrawColor-com.aspose.imaging.Color-) | Sets a foreground color. |
| [getTextRenderingHint()](#getTextRenderingHint--) | Gets the text rendering hint. |
| [setTextRenderingHint(int value)](#setTextRenderingHint-int-) | Sets the text rendering hint. |
| [getPositioning()](#getPositioning--) | Gets the positioning. |
| [setPositioning(int value)](#setPositioning-int-) | Sets the positioning. |
| [getReplaceTextMapping()](#getReplaceTextMapping--) | Gets the text replace mapping. |
| [setReplaceTextMapping(HashMap<String,String> value)](#setReplaceTextMapping-java.util.HashMap-java.lang.String-java.lang.String--) | Sets the text replace mapping. |
| [copyTo(VectorRasterizationOptions vectorRasterizationOptions)](#copyTo-com.aspose.imaging.imageoptions.VectorRasterizationOptions-) | Copies this instance to `vectorRasterizationOptions`. |
| [deepClone()](#deepClone--) | Makes a shallow clone of object. |
### VectorRasterizationOptions() {#VectorRasterizationOptions--}
```
public VectorRasterizationOptions()
```


### VectorRasterizationOptions(VectorRasterizationOptions imageOptions) {#VectorRasterizationOptions-com.aspose.imaging.imageoptions.VectorRasterizationOptions-}
```
public VectorRasterizationOptions(VectorRasterizationOptions imageOptions)
```


**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| imageOptions | [VectorRasterizationOptions](../../com.aspose.imaging.imageoptions/vectorrasterizationoptions) |  |

### getSmoothingMode() {#getSmoothingMode--}
```
public final int getSmoothingMode()
```


Gets the smoothing mode.

**Returns:**
int - the smoothing mode.
### setSmoothingMode(int value) {#setSmoothingMode-int-}
```
public final void setSmoothingMode(int value)
```


Sets the smoothing mode.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | the smoothing mode. |


**Example: This example shows how to load an SVG image from a file and rasterize it to PNG using various options.**

``` java
String dir = "c:\\temp\\";

// Using Aspose.Imaging.Image.Load is a unified way to load image.
com.aspose.imaging.fileformats.svg.SvgImage svgImage = (com.aspose.imaging.fileformats.svg.SvgImage) com.aspose.imaging.Image.load(dir + "test.svg");
try {
    // In order to rasterize SVG we need to specify rasterization options.
    com.aspose.imaging.imageoptions.SvgRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.SvgRasterizationOptions();

    // Set default color of a background for an image. Default value is white.
    rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getGray());

    // Set the page size
    rasterizationOptions.setPageSize(new com.aspose.imaging.SizeF(svgImage.getWidth(), svgImage.getHeight()));

    // Antialiasing is applied to lines and curves and the edges of filled areas.
    rasterizationOptions.setSmoothingMode(com.aspose.imaging.SmoothingMode.AntiAlias);

    // Each character is drawn using its antialiased glyph bitmap without hinting.
    rasterizationOptions.setTextRenderingHint(com.aspose.imaging.TextRenderingHint.AntiAlias);

    // Reduce the image size 10 times, i.e. the output size will be 10% of the original size.
    rasterizationOptions.setScaleX(0.1f);
    rasterizationOptions.setScaleY(0.1f);

    com.aspose.imaging.imageoptions.PngOptions saveOptions = new com.aspose.imaging.imageoptions.PngOptions();
    saveOptions.setVectorRasterizationOptions(rasterizationOptions);

    // Save to a PNG file
    svgImage.save(dir + "test.output.png", saveOptions);
} finally {
    svgImage.dispose();
}
```

### getBorderX() {#getBorderX--}
```
public float getBorderX()
```


Gets or sets the border X in pixels.

**Returns:**
float - The border X in pixels.
### setBorderX(float value) {#setBorderX-float-}
```
public void setBorderX(float value)
```


Gets or sets the border X in pixels.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | float | The border X in pixels. |

### getBorderY() {#getBorderY--}
```
public float getBorderY()
```


Gets or sets the border Y in pixels.

**Returns:**
float - The border Y in pixels.
### setBorderY(float value) {#setBorderY-float-}
```
public void setBorderY(float value)
```


Gets or sets the border Y in pixels.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | float | The border Y in pixels. |

### getCenterDrawing() {#getCenterDrawing--}
```
public boolean getCenterDrawing()
```


Gets a value indicating whether center drawing.

**Returns:**
boolean - a value indicating whether center drawing.
### setCenterDrawing(boolean value) {#setCenterDrawing-boolean-}
```
public void setCenterDrawing(boolean value)
```


Sets a value indicating whether center drawing.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | a value indicating whether center drawing. |

### getPageHeight() {#getPageHeight--}
```
public float getPageHeight()
```


Gets the page height.

**Returns:**
float - the page height in pixels.
### setPageHeight(float value) {#setPageHeight-float-}
```
public void setPageHeight(float value)
```


Sets the page height in pixels.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | float | the page height in pixels. |

### getPageSize() {#getPageSize--}
```
public SizeF getPageSize()
```


Gets the page size in pixels.

**Returns:**
[SizeF](../../com.aspose.imaging/sizef) - the page size in pixels.
### setPageSize(SizeF value) {#setPageSize-com.aspose.imaging.SizeF-}
```
public void setPageSize(SizeF value)
```


Sets the page size in pixels.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [SizeF](../../com.aspose.imaging/sizef) | the page size in pixels. |


**Example: This example shows how to load a WMF image from a file and convert it to SVG using WmfRasterizationOptions.**

``` java
String dir = "c:\\temp\\";

// Using Aspose.Imaging.Image.Load is a unified way to load all types of images including WMF.
try (com.aspose.imaging.fileformats.wmf.WmfImage wmfImage = (com.aspose.imaging.fileformats.wmf.WmfImage)com.aspose.imaging.Image.load(dir + "test.wmf"))
{
    com.aspose.imaging.imageoptions.SvgOptions saveOptions = new com.aspose.imaging.imageoptions.SvgOptions();
                    
    // Text will be converted to shapes.
    saveOptions.setTextAsShapes(true);

    com.aspose.imaging.imageoptions.WmfRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.WmfRasterizationOptions();

    // The background color of the drawing surface.
    rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getWhiteSmoke());

    // The page size.
    rasterizationOptions.setPageSize(Size.to_SizeF(wmfImage.getSize()));

    // If embedded emf exists, then render emf; otherwise render wmf.
    rasterizationOptions.setRenderMode(com.aspose.imaging.fileformats.wmf.WmfRenderMode.Auto);

    saveOptions.setVectorRasterizationOptions(rasterizationOptions);

    wmfImage.save(dir + "test.output.svg", saveOptions);
}
```


**Example: This example shows how to load a EMF image from a file and convert it to SVG using EmfRasterizationOptions.**

``` java
String dir = "c:\\temp\\";

// Using Aspose.Imaging.Image.Load is a unified way to load all types of images including EMF.
com.aspose.imaging.fileformats.emf.EmfImage emfImage = (com.aspose.imaging.fileformats.emf.EmfImage) com.aspose.imaging.Image.load(dir + "test.emf");
try {
    com.aspose.imaging.imageoptions.SvgOptions saveOptions = new com.aspose.imaging.imageoptions.SvgOptions();

    // Text will be converted to shapes.
    saveOptions.setTextAsShapes(true);

    com.aspose.imaging.imageoptions.EmfRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.EmfRasterizationOptions();

    // The background color of the drawing surface.
    rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getWhiteSmoke());

    // The page size.
    rasterizationOptions.setPageSize(new com.aspose.imaging.SizeF(emfImage.getWidth(), emfImage.getHeight()));

    // If embedded emf exists, then render emf; otherwise render wmf.
    rasterizationOptions.setRenderMode(com.aspose.imaging.fileformats.emf.EmfRenderMode.Auto);

    // Set the horizontal margin
    rasterizationOptions.setBorderX(50);

    // Set the vertical margin
    rasterizationOptions.setBorderY(50);

    saveOptions.setVectorRasterizationOptions(rasterizationOptions);

    emfImage.save(dir + "test.output.svg", saveOptions);
} finally {
    emfImage.dispose();
}
```

### setPageSize(Size value) {#setPageSize-com.aspose.imaging.Size-}
```
public void setPageSize(Size value)
```


Sets the page size in pixels.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Size](../../com.aspose.imaging/size) | the page size in pixels. |

### getPageWidth() {#getPageWidth--}
```
public float getPageWidth()
```


Gets the page width.

**Returns:**
float - the page width.
### setPageWidth(float value) {#setPageWidth-float-}
```
public void setPageWidth(float value)
```


Sets the page width.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | float | the page width. |

### getBackgroundColor() {#getBackgroundColor--}
```
public Color getBackgroundColor()
```


Gets a background color.

**Returns:**
[Color](../../com.aspose.imaging/color) - a background color.
### setBackgroundColor(Color value) {#setBackgroundColor-com.aspose.imaging.Color-}
```
public void setBackgroundColor(Color value)
```


Sets a background color.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Color](../../com.aspose.imaging/color) | a background color. |


**Example: This example shows how to load a WMF image from a file and convert it to SVG using WmfRasterizationOptions.**

``` java
String dir = "c:\\temp\\";

// Using Aspose.Imaging.Image.Load is a unified way to load all types of images including WMF.
try (com.aspose.imaging.fileformats.wmf.WmfImage wmfImage = (com.aspose.imaging.fileformats.wmf.WmfImage)com.aspose.imaging.Image.load(dir + "test.wmf"))
{
    com.aspose.imaging.imageoptions.SvgOptions saveOptions = new com.aspose.imaging.imageoptions.SvgOptions();
                    
    // Text will be converted to shapes.
    saveOptions.setTextAsShapes(true);

    com.aspose.imaging.imageoptions.WmfRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.WmfRasterizationOptions();

    // The background color of the drawing surface.
    rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getWhiteSmoke());

    // The page size.
    rasterizationOptions.setPageSize(Size.to_SizeF(wmfImage.getSize()));

    // If embedded emf exists, then render emf; otherwise render wmf.
    rasterizationOptions.setRenderMode(com.aspose.imaging.fileformats.wmf.WmfRenderMode.Auto);

    saveOptions.setVectorRasterizationOptions(rasterizationOptions);

    wmfImage.save(dir + "test.output.svg", saveOptions);
}
```


**Example: This example shows how to load a EMF image from a file and convert it to SVG using EmfRasterizationOptions.**

``` java
String dir = "c:\\temp\\";

// Using Aspose.Imaging.Image.Load is a unified way to load all types of images including EMF.
com.aspose.imaging.fileformats.emf.EmfImage emfImage = (com.aspose.imaging.fileformats.emf.EmfImage) com.aspose.imaging.Image.load(dir + "test.emf");
try {
    com.aspose.imaging.imageoptions.SvgOptions saveOptions = new com.aspose.imaging.imageoptions.SvgOptions();

    // Text will be converted to shapes.
    saveOptions.setTextAsShapes(true);

    com.aspose.imaging.imageoptions.EmfRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.EmfRasterizationOptions();

    // The background color of the drawing surface.
    rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getWhiteSmoke());

    // The page size.
    rasterizationOptions.setPageSize(new com.aspose.imaging.SizeF(emfImage.getWidth(), emfImage.getHeight()));

    // If embedded emf exists, then render emf; otherwise render wmf.
    rasterizationOptions.setRenderMode(com.aspose.imaging.fileformats.emf.EmfRenderMode.Auto);

    // Set the horizontal margin
    rasterizationOptions.setBorderX(50);

    // Set the vertical margin
    rasterizationOptions.setBorderY(50);

    saveOptions.setVectorRasterizationOptions(rasterizationOptions);

    emfImage.save(dir + "test.output.svg", saveOptions);
} finally {
    emfImage.dispose();
}
```

### getDrawColor() {#getDrawColor--}
```
public Color getDrawColor()
```


Gets a foreground color.

**Returns:**
[Color](../../com.aspose.imaging/color) - a foreground color.
### setDrawColor(Color value) {#setDrawColor-com.aspose.imaging.Color-}
```
public void setDrawColor(Color value)
```


Sets a foreground color.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Color](../../com.aspose.imaging/color) | a foreground color. |

### getTextRenderingHint() {#getTextRenderingHint--}
```
public final int getTextRenderingHint()
```


Gets the text rendering hint.

Value: The text rendering hint.

**Returns:**
int - the text rendering hint.
### setTextRenderingHint(int value) {#setTextRenderingHint-int-}
```
public final void setTextRenderingHint(int value)
```


Sets the text rendering hint.

Value: The text rendering hint.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | the text rendering hint. |


**Example: This example shows how to load an SVG image from a file and rasterize it to PNG using various options.**

``` java
String dir = "c:\\temp\\";

// Using Aspose.Imaging.Image.Load is a unified way to load image.
com.aspose.imaging.fileformats.svg.SvgImage svgImage = (com.aspose.imaging.fileformats.svg.SvgImage) com.aspose.imaging.Image.load(dir + "test.svg");
try {
    // In order to rasterize SVG we need to specify rasterization options.
    com.aspose.imaging.imageoptions.SvgRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.SvgRasterizationOptions();

    // Set default color of a background for an image. Default value is white.
    rasterizationOptions.setBackgroundColor(com.aspose.imaging.Color.getGray());

    // Set the page size
    rasterizationOptions.setPageSize(new com.aspose.imaging.SizeF(svgImage.getWidth(), svgImage.getHeight()));

    // Antialiasing is applied to lines and curves and the edges of filled areas.
    rasterizationOptions.setSmoothingMode(com.aspose.imaging.SmoothingMode.AntiAlias);

    // Each character is drawn using its antialiased glyph bitmap without hinting.
    rasterizationOptions.setTextRenderingHint(com.aspose.imaging.TextRenderingHint.AntiAlias);

    // Reduce the image size 10 times, i.e. the output size will be 10% of the original size.
    rasterizationOptions.setScaleX(0.1f);
    rasterizationOptions.setScaleY(0.1f);

    com.aspose.imaging.imageoptions.PngOptions saveOptions = new com.aspose.imaging.imageoptions.PngOptions();
    saveOptions.setVectorRasterizationOptions(rasterizationOptions);

    // Save to a PNG file
    svgImage.save(dir + "test.output.png", saveOptions);
} finally {
    svgImage.dispose();
}
```

### getPositioning() {#getPositioning--}
```
public final int getPositioning()
```


Gets the positioning.

Value: The positioning.

**Returns:**
int - the positioning.
### setPositioning(int value) {#setPositioning-int-}
```
public final void setPositioning(int value)
```


Sets the positioning.

Value: The positioning.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | the positioning. |

### getReplaceTextMapping() {#getReplaceTextMapping--}
```
public final HashMap<String,String> getReplaceTextMapping()
```


Gets the text replace mapping.

Value: The text replace mapping.

**Returns:**
java.util.HashMap<java.lang.String,java.lang.String> - the text replace mapping.
### setReplaceTextMapping(HashMap<String,String> value) {#setReplaceTextMapping-java.util.HashMap-java.lang.String-java.lang.String--}
```
public final void setReplaceTextMapping(HashMap<String,String> value)
```


Sets the text replace mapping.

Value: The text replace mapping.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.util.HashMap<java.lang.String,java.lang.String> | the text replace mapping. |

### copyTo(VectorRasterizationOptions vectorRasterizationOptions) {#copyTo-com.aspose.imaging.imageoptions.VectorRasterizationOptions-}
```
public void copyTo(VectorRasterizationOptions vectorRasterizationOptions)
```


Copies this instance to `vectorRasterizationOptions`.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| vectorRasterizationOptions | [VectorRasterizationOptions](../../com.aspose.imaging.imageoptions/vectorrasterizationoptions) | The vector rasterization options. |

### deepClone() {#deepClone--}
```
public VectorRasterizationOptions deepClone()
```


Makes a shallow clone of object.

**Returns:**
[VectorRasterizationOptions](../../com.aspose.imaging.imageoptions/vectorrasterizationoptions) - The shallow clone of object.
