Loading a vector image happens in 2 steps:
width and height.This function is run during the lifetime of the GIMP session, as the first step above. It should extract the maximum of information from the source document to help GIMP take appropriate decisions for default values and also for displaying relevant information in the load dialog (if necessary).
The best case scenario is to be able to extract proper dimensions (width and height) with valid units supported
by GIMP. If not possible, returning already processed dimensions then setting exact_width and exact_height to
false in extracted_data is also an option. If all you can get are no-unit dimensions, set
them with gimp_unit_pixel and correct_ratio to
true to at least give a valid ratio as a default.
If there is no way to extract any valid default dimensions, not even a ratio, then return false but leave error as null. [callback@RunVectorLoadFunc] will still be called but default values might be bogus. If the return value is false and error is set, it means that the file is invalid and cannot even be loaded. Thus [callback@RunVectorLoadFunc] won't be run and error is passed as the main run error.
Note: when procedure is run, the original arguments will be passed as config. Nevertheless it may happen that
this function is called with a null config, in particular when [
method@VectorLoadProcedure.extract_dimensions] is called. In such a case, the callback is expected to return whatever can be considered
"best judgement" defaults.
| procedure |
the [class@Gimp.Procedure]. |
| run_mode |
the [enum@RunMode]. |
| file |
the [iface@Gio.File] to load from. |
| metadata |
the [class@Gimp.Metadata] which will be added to the new image. |
| config |
the |
| extracted_data |
dimensions and pixel density extracted from |
| data_for_run |
will be passed as |
| data_for_run_destroy |
the free function for |
| extract_data |
the |
|
true if any information could be extracted from |