Gimp.VectorLoadProcedure¶
- Subclasses:
None
Methods¶
- Inherited:
Gimp.LoadProcedure (5), Gimp.FileProcedure (14), Gimp.Procedure (145), GObject.Object (37)
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gimp.VectorLoadProcedure(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [class`Procedure`] subclass that makes it easier to write load procedures for vector image formats.
It automatically adds the standard arguments: ([enum`RunMode`], [iface`Gio`.File], int width, int height)
and the standard return value: ( [class`Image`] )
It is possible to add additional arguments.
When invoked via [method`Procedure`.run], it unpacks these standard arguments and calls run_func which is a [callback`RunImageFunc`]. The [class`ProcedureConfig`] of [callback`Gimp`.RunVectorLoadFunc] contains additionally added arguments but also the arguments added by this class.
- classmethod new(plug_in, name, proc_type, extract_func, extract_data, run_func, *run_data)¶
- Parameters:
plug_in (
Gimp.PlugIn
) – aGimp.PlugIn
.name (
str
) – the new procedure’s name.proc_type (
Gimp.PDBProcType
) – the new procedure’sGimp.PDBProcType
.extract_func (
Gimp.ExtractVectorFunc
) –run_func (
Gimp.RunVectorLoadFunc
) – the run function for the new procedure.
- Returns:
a new
Gimp.Procedure
.- Return type:
Creates a new load procedure named name which will call run_func when invoked.
See
Gimp.Procedure.new
() for information about proc_type.New in version 3.0.
- extract_dimensions(file)¶
- Parameters:
file (
Gio.File
) – a [iface`Gio`.File] which can be processed by self.- Raises:
- Returns:
True
if dimensions could be extracted.- data:
the returned dimension data.
- Return type:
(
bool
, data:Gimp.VectorLoadData
)
Extracts native or suggested dimensions from file, which must be a vector file in the right format supported by self. It is considered a programming error to pass a file of invalid format.