public class LspfResource extends LayerResource
Layer protected settings
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_TOOL_KEY
The type tool info key 1819504742
|
PSB_RESOURCE_SIGNATURE, RESOURCE_SIGNATURE
Constructor and Description |
---|
LspfResource()
Initializes a new instance of the
LspfResource class. |
LspfResource(boolean isTransparencyProtected,
boolean isCompositeProtected,
boolean isPositionProtected)
Initializes a new instance of the
LspfResource class. |
LspfResource(byte[] data)
Initializes a new instance of the
LspfResource class. |
Modifier and Type | Method and Description |
---|---|
int |
getKey()
Gets the layer resource key.
|
int |
getLength()
Gets the layer resource length in bytes.
|
int |
getLockType()
Gets the type of the lock.
|
int |
getPsdVersion()
Gets the minimal psd version required for layer resource.
|
int |
getSignature()
Gets the layer resource signature.
|
boolean |
isCompositeProtected()
Gets a value indicating whether this instance is composite protected.
|
boolean |
isPositionProtected()
Gets a value indicating whether this instance is position protected.
|
boolean |
isTransparencyProtected()
Gets a value indicating whether this instance is transparency protected.
|
void |
save(StreamContainer streamContainer,
int psdVersion)
Saves the resource to the specified stream container.
|
void |
setCompositeProtected(boolean value)
Sets a value indicating whether this instance is composite protected.
|
void |
setLockType(int value)
Sets the type of the lock.
|
void |
setPositionProtected(boolean value)
Sets a value indicating whether this instance is position protected.
|
void |
setTransparencyProtected(boolean value)
Sets a value indicating whether this instance is transparency protected.
|
toString
public static final int TYPE_TOOL_KEY
The type tool info key 1819504742
public LspfResource(byte[] data)
Initializes a new instance of the LspfResource
class.
With custom or unknown value
data
- The resource data.PsdImageArgumentException
- Invalid Lspf Resource data lengthpublic LspfResource(boolean isTransparencyProtected, boolean isCompositeProtected, boolean isPositionProtected)
Initializes a new instance of the LspfResource
class.
isTransparencyProtected
- if set to true
[is transparency protected].isCompositeProtected
- if set to true
[is composite protected].isPositionProtected
- if set to true
[is position protected].public LspfResource()
Initializes a new instance of the LspfResource
class.
public final boolean isTransparencyProtected()
Gets a value indicating whether this instance is transparency protected.
Value:true
if this instance is transparency protected; otherwise, false
.public final void setTransparencyProtected(boolean value)
Sets a value indicating whether this instance is transparency protected.
Value:true
if this instance is transparency protected; otherwise, false
.value
- a value indicating whether this instance is transparency protected.public final boolean isCompositeProtected()
Gets a value indicating whether this instance is composite protected.
Value:true
if this instance is composite protected; otherwise, false
.public final void setCompositeProtected(boolean value)
Sets a value indicating whether this instance is composite protected.
Value:true
if this instance is composite protected; otherwise, false
.value
- a value indicating whether this instance is composite protected.public final boolean isPositionProtected()
Gets a value indicating whether this instance is position protected.
Value:true
if this instance is position protected; otherwise, false
.public final void setPositionProtected(boolean value)
Sets a value indicating whether this instance is position protected.
Value:true
if this instance is position protected; otherwise, false
.value
- a value indicating whether this instance is position protected.public int getSignature()
Gets the layer resource signature.
getSignature
in class LayerResource
public int getKey()
Gets the layer resource key.
getKey
in class LayerResource
public int getLength()
Gets the layer resource length in bytes.
getLength
in class LayerResource
public int getPsdVersion()
Gets the minimal psd version required for layer resource. 0 indicates no restrictions.
getPsdVersion
in class LayerResource
public final int getLockType()
Gets the type of the lock.
Value: The type of the lock.public final void setLockType(int value)
Sets the type of the lock.
Value: The type of the lock.value
- the type of the lock.public void save(StreamContainer streamContainer, int psdVersion)
Saves the resource to the specified stream container.
save
in class LayerResource
streamContainer
- The stream container to save to.psdVersion
- The PSD version.