A Resource represents a gradient, pattern, brush tip, brush preset, palette or
workspace definition.
Resources are identified by their type, name and filename. If you want to change the contents of a resource, you should read its data using data(), parse it and write the changed contents back.
Methods
Member documentation
Parameters
rhs | (no description provided) |
Return
(no description provided) |
Return the resource as a byte array.
Return
(no description provided) |
The filename of the resource, if present. Not all resources are loaded from files.
Return
(no description provided) |
An image that can be used to represent the resource in the user interface. For some resources, like patterns, the
image is identical to the resource, for others it's a mere icon.
Return
(no description provided) |
Change the internal data of the resource to the given byte
array. If the byte array is not valid, setData returns false, otherwise true.
Parameters
data | (no description provided) |
Return
(no description provided) |
Change the image for this resource.
Parameters
image | (no description provided) |
setName changes the user-visible name of the current resource.
Parameters
value | (no description provided) |
Return the type of this resource. Valid types are:
- pattern: a raster image representing a pattern
- gradient: a gradient
- brush: a brush tip
- preset: a brush preset
- palette: a color set
- workspace: a workspace definition.
Return
(no description provided) |