Txt2Resource Class

Summary: Txt2 resource class

Module: aspose.psd.fileformats.psd.layers.layerresources

Full Name: aspose.psd.fileformats.psd.layers.layerresources.Txt2Resource

Inheritance: LayerResource

Aspose.PSD Version: 24.9.0

Constructors

NameDescription
Txt2Resource()Initializes a new instance of the Txt2Resource class

Properties

NameTypeAccessDescription
PSB_RESOURCE_SIGNATURE [static]intrThe PSB-specific resource signature.
RESOURCE_SIGNATURE [static]intrThe common resource signature.
TYPE_TOOL_KEY [static]intrThe type tool info key.
databyter/wGets or sets the data.
keyintrGets the layer resource key.
lengthintrGets the layer resource length in bytes.
psd_versionintrGets the minimal psd version required for layer resource. 0 indicates no restrictions.
signatureintrGets the layer resource signature.

Methods

NameDescription
add_text_record(text, bounds)Adds the text record to Resource and returns id of text record.
get_text_data()Gets the text record from resource data.
save(stream_container, psd_version)Saves the specified stream container.

Constructor: Txt2Resource()

 Txt2Resource() 

Initializes a new instance of the Txt2Resource class

Method: add_text_record(text, bounds)

 add_text_record(text, bounds) 

Adds the text record to Resource and returns id of text record.

Parameters:

ParameterTypeDescription
textstringThe record text.
boundsRectangleFThe bounds.

Returns

TypeDescription
intReturns Id of text record for resource

Method: get_text_data()

 get_text_data() 

Gets the text record from resource data.

Returns

TypeDescription
stringArray of text record

Method: save(stream_container, psd_version)

 save(stream_container, psd_version) 

Saves the specified stream container.

Parameters:

ParameterTypeDescription
stream_containerStreamContainerThe stream container.
psd_versionintThe PSD version.