---
title: "CmxTextBlockSpec"
url: "https://reference.aspose.com/imaging/java/com.aspose.imaging.fileformats.cmx.objectmodel.specs/cmxtextblockspec/"
product: "Aspose.Imaging for Java API Reference"
description: "Represents info specified for text blocks."
---

**Inheritance:**
java.lang.Object

**All Implemented Interfaces:**
[com.aspose.imaging.fileformats.cmx.objectmodel.specs.ICmxObjectSpec](../../com.aspose.imaging.fileformats.cmx.objectmodel.specs/icmxobjectspec)
```
public class CmxTextBlockSpec implements ICmxObjectSpec
```

Represents info specified for text blocks.
## Constructors

| Constructor | Description |
| --- | --- |
| [CmxTextBlockSpec()](#CmxTextBlockSpec--) |  |
## Methods

| Method | Description |
| --- | --- |
| [getParagraphStyle()](#getParagraphStyle--) | Gets the paragraph style. |
| [setParagraphStyle(CmxParagraphStyle value)](#setParagraphStyle-com.aspose.imaging.fileformats.cmx.objectmodel.styles.CmxParagraphStyle-) | Sets the paragraph style. |
| [getFont()](#getFont--) | Gets the font. |
| [setFont(Font value)](#setFont-com.aspose.imaging.Font-) | Sets the font. |
| [getMatrix()](#getMatrix--) | Gets the transformation matrix. |
| [setMatrix(Matrix value)](#setMatrix-com.aspose.imaging.Matrix-) | Sets the transformation matrix. |
| [getText()](#getText--) | Gets the text. |
| [setText(String value)](#setText-java.lang.String-) | Sets the text. |
| [getCharLocations()](#getCharLocations--) | Gets the character locations. |
| [setCharLocations(PointF[] value)](#setCharLocations-com.aspose.imaging.PointF---) | Sets the character locations. |
| [equals(Object o)](#equals-java.lang.Object-) | Check if objects are equal. |
| [hashCode()](#hashCode--) | Get hash code of the current object. |
### CmxTextBlockSpec() {#CmxTextBlockSpec--}
```
public CmxTextBlockSpec()
```


### getParagraphStyle() {#getParagraphStyle--}
```
public final CmxParagraphStyle getParagraphStyle()
```


Gets the paragraph style.

**Returns:**
[CmxParagraphStyle](../../com.aspose.imaging.fileformats.cmx.objectmodel.styles/cmxparagraphstyle) - the paragraph style.
### setParagraphStyle(CmxParagraphStyle value) {#setParagraphStyle-com.aspose.imaging.fileformats.cmx.objectmodel.styles.CmxParagraphStyle-}
```
public final void setParagraphStyle(CmxParagraphStyle value)
```


Sets the paragraph style.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [CmxParagraphStyle](../../com.aspose.imaging.fileformats.cmx.objectmodel.styles/cmxparagraphstyle) | the paragraph style. |

### getFont() {#getFont--}
```
public final Font getFont()
```


Gets the font.

**Returns:**
[Font](../../com.aspose.imaging/font) - the font.
### setFont(Font value) {#setFont-com.aspose.imaging.Font-}
```
public final void setFont(Font value)
```


Sets the font.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Font](../../com.aspose.imaging/font) | the font. |

### getMatrix() {#getMatrix--}
```
public final Matrix getMatrix()
```


Gets the transformation matrix.

**Returns:**
[Matrix](../../com.aspose.imaging/matrix) - the transformation matrix.
### setMatrix(Matrix value) {#setMatrix-com.aspose.imaging.Matrix-}
```
public final void setMatrix(Matrix value)
```


Sets the transformation matrix.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Matrix](../../com.aspose.imaging/matrix) | the transformation matrix. |

### getText() {#getText--}
```
public final String getText()
```


Gets the text.

**Returns:**
java.lang.String - the text.
### setText(String value) {#setText-java.lang.String-}
```
public final void setText(String value)
```


Sets the text.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | the text. |

### getCharLocations() {#getCharLocations--}
```
public final PointF[] getCharLocations()
```


Gets the character locations.

**Returns:**
com.aspose.imaging.PointF[] - the character locations.
### setCharLocations(PointF[] value) {#setCharLocations-com.aspose.imaging.PointF---}
```
public final void setCharLocations(PointF[] value)
```


Sets the character locations.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [PointF\[\]](../../com.aspose.imaging/pointf) | the character locations. |

### equals(Object o) {#equals-java.lang.Object-}
```
public boolean equals(Object o)
```


Check if objects are equal.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| o | java.lang.Object | The other object. |

**Returns:**
boolean - The equality comparison result.
### hashCode() {#hashCode--}
```
public int hashCode()
```


Get hash code of the current object.

**Returns:**
int - The hash code.
