diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2007-08-04 06:50:50 +0000 |
|---|---|---|
| committer | jucablues <jucablues@users.sourceforge.net> | 2007-08-04 06:50:50 +0000 |
| commit | 18e5b82371737127114b0df06bba0a6771ed2723 (patch) | |
| tree | 548fd52ac1f36667daa63c2eec6e1a311db65c70 /src/helper-fns.h | |
| parent | boilerplate code for the remaining filters. My next commits will (diff) | |
| download | inkscape-18e5b82371737127114b0df06bba0a6771ed2723.tar.gz inkscape-18e5b82371737127114b0df06bba0a6771ed2723.zip | |
setting of attributes and default values for feColorMatrix.
refactornig: moved read_kernel_matrix to helper-fns.h and renamed it to
helperfns_read_vector. Used it on sp-fecolormatrix.cpp
(bzr r3364)
Diffstat (limited to 'src/helper-fns.h')
| -rw-r--r-- | src/helper-fns.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/helper-fns.h b/src/helper-fns.h index 10c311eda..f588b9905 100644 --- a/src/helper-fns.h +++ b/src/helper-fns.h @@ -39,7 +39,16 @@ static bool helperfns_read_bool(gchar const *value, bool default_value){ } return default_value; } - + +static std::vector<gdouble> helperfns_read_vector(const gchar* value, int size){ + std::vector<gdouble> v(size, (gdouble) 0); + int i; + gchar** values = g_strsplit(value , " ", size); + for (i=0;i<size;i++) + v[i] = g_ascii_strtod(values[i], NULL); + return v; +} + #endif /* !SEEN_HELPER_FNS_H */ /* |
