summaryrefslogtreecommitdiff
path: root/rsvg-filter.c
Commit message (Collapse)AuthorAgeFilesLines
* Move the C part of the library to a librsvg/ subdirectoryFederico Mena Quintero2018-02-221-5460/+0
| | | | Avoid having everything in the toplevel. Modified source files to
* rsvg_filter_primitive_tile_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-5/+22
|
* rsvg_filter_primitive_specular_lighting_set_atts(): Parse attributes with ↵Federico Mena Quintero2018-02-211-27/+52
| | | | the PHF
* rsvg_filter_primitive_diffuse_lighting_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-27/+51
|
* rsvg_node_light_source_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-20/+53
|
* rsvg_filter_primitive_image_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-8/+26
|
* rsvg_filter_primitive_turbulence_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-17/+42
|
* rsvg_filter_primitive_displacement_map_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-13/+37
|
* rsvg_filter_primitive_flood_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-3/+18
|
* rsvg_filter_primitive_composite_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-29/+56
|
* rsvg_filter_primitive_erode_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-15/+33
|
* rsvg_node_component_transfer_function_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-41/+62
|
* rsvg_filter_primitive_component_transfer_set_atts(): Parse attributes with ↵Federico Mena Quintero2018-02-211-5/+22
| | | | the PHF
* rsvg_filter_primitive_color_matrix_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-31/+51
|
* rsvg_filter_primitive_merge_node_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-3/+18
|
* rsvg_filter_primitive_merge_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-3/+18
|
* rsvg_filter_primitive_offset_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-9/+29
|
* rsvg_filter_primitive_gaussian_blur_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-9/+27
|
* rsvg_filter_primitive_convolve_matrix_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-70/+98
|
* rsvg_filter_primitive_blend_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-18/+38
|
* rsvg_filter_set_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-19/+42
|
* filter_primitive_set_x_y_width_height_atts(): Parse attributes with the PHFFederico Mena Quintero2018-02-211-15/+32
|
* Port PropertyBag to RustFederico Mena Quintero2018-02-201-20/+20
| | | | | | | | | This is a HashMap for now, to match the C version which used a GHashTable. Eventually its implementation will only be a wrapper for the (char **) from libxml2, plus an iterator over the key/value pairs in such an array. For now, we do need lookup() semantics. We will be moving the set_atts() methods to iteration instead of lookups one by one.
* gitlab#143 - rsvg-filter: Optimize get_/put_columnTimm Bäder2018-02-091-12/+6
| | | | | | | Use memcpy instead of a manual loop and replace the computation in every iteration with a simple increment. https://gitlab.gnome.org/GNOME/librsvg/issues/143
* Replace "RsvgHandle *ctx" for "RsvgHandle *handle" everywhereFederico Mena Quintero2018-02-081-3/+3
| | | | | | Hopefully reduce the confusion between "RsvgHandle *ctx" and "RsvgDrawingCtx *ctx" - the Rust code is already uses handle vs. ctx like this.
* gitlab#193 - Don't crash when feConvolveMatrix doesn't specify orderx/orderyFederico Mena Quintero2018-02-011-0/+2
| | | | | | | | We were not initializing the default values correctly, so rsvg_css_parse_number_list() would assert as it would get passed 0 for the expected length of the list. https://gitlab.gnome.org/GNOME/librsvg/issues/193
* gitlab#179 - rsvg_filter_primitive_free(): Check the GStrings for NULL ↵Federico Mena Quintero2018-01-081-2/+7
| | | | | | | | | | before freeing them rsvg_new_filter_primitive_merge_node() reuses a plain RsvgFilterPrimitive struct and doesn't set ->result. Allow for this general behavior in the destructor. https://gitlab.gnome.org/GNOME/librsvg/issues/179
* rsvg-filter: Use fabs() instead of abs() for floatsPhilip Withnall2017-11-301-1/+1
| | | | | | | | Fixes a compiler warning (-Wabsolute-value). Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=791017
* Move utility function in rsvg-image.[ch] to rsvg-base.c.Federico Mena Quintero2017-09-251-1/+0
| | | | With this, rsvg-image.[ch] are no more. Yay!
* rsvg-filter: Deal with errors in all callers to rsvg_filter_get_result()Federico Mena Quintero2017-07-071-7/+8
|
* rsvg-filter: Return NULL for invalid surfaces in rsvg_filter_get_{result,in}()Federico Mena Quintero2017-07-071-13/+9
|
* feGaussianBlur: Don't try to blur an invalid surfaceFederico Mena Quintero2017-07-071-0/+5
| | | | | | | | | This is a stop-gap measure to deal with invalid surfaces being fed to this filter. We get a surface which is not in CAIRO_STATUS_SUCCESS, and so its width/height are 0. In reality we should be able to bubble up errors from cairo_*_surface_create(), but we don't do that yet.
* feTile: don't divide by zero if the input surface has empty boundsFederico Mena Quintero2017-07-061-0/+5
| | | | Thanks to Stefan Cornelius <scorneli@redhat.com> for the test file.
* bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blursFederico Mena Quintero2017-06-271-9/+20
| | | | | | We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
* feConvolveMatrix: Use an enum for edgeMode, not intsFederico Mena Quintero2017-06-271-13/+29
|
* Make rsvg_css_parse_number_list() correspond to the Rust versionFederico Mena Quintero2017-06-201-15/+57
| | | | | | | And start turning the callers into using the new API. Also, this actually makes feConvolveMatrix be rendered. Apparently they weren't working at all before?
* Handle parse errors in all calls to rsvg_css_parse_number_optional_number()Federico Mena Quintero2017-06-131-10/+31
|
* Fully move rsvg_css_parse_color() to Rust. Yay!Federico Mena Quintero2017-05-191-4/+61
| | | | | | | We keep a C function rsvg_css_parse_color_() that just calls the Rust one. This is so that the linker will make the C symbol visible; this is the quirky function that gets exported just for the benefit of rsvg-convert.c.
* Sanitize the indentation specifiers for Emacs/VimFederico Mena Quintero2017-05-181-2/+2
| | | | | | Tabs are 8 spaces! Indentantion is 4 spaces!
* Replace g_new() with g_new0() throughoutFederico Mena Quintero2017-05-171-7/+7
| | | | | We should not have uninitialized memory! I'm not confident that we are actually initializing every struct field by hand.
* bgo#634324 - Gaussian blur with negative-scaling transformation matrix is ↵Federico Mena Quintero2017-04-181-3/+3
| | | | | | | | | | | | | not rendered When we figure out the standard deviations for Gaussian blurs, we were simply multiplying the given values by the scaling factors in the current transformation. But if this is a negative-scaling matrix, we'd get negative values, and we would not do a blur at all. Take the absolute value of the scaled factors instead. https://bugzilla.gnome.org/show_bug.cgi?id=634324
* rsvg-filter.c: "azimuth", "elevation", "limitingConeAngle" are numbers, not ↵Federico Mena Quintero2017-03-231-3/+3
| | | | | | | | angles Per the spec, these attributes specity plain numbers, which are interpreted as degrees. They are not CSS/SVG angle values with deg/rad/grad units.
* Ref the found node when iterating through children to find a specific nodeFederico Mena Quintero2017-02-171-2/+7
| | | | | The callback from rsvg_node_foreach_child() does not get to keep the child reference anymore; it has to ref() it.
* Audit casts in callers of rsvg_drawing_ctx_acquire_node_of_type()Federico Mena Quintero2017-02-171-4/+4
| | | | | | | | | | | | | | | | The pattern was RsvgNodeFoo *foo = (RsvgNodeFoo *) rsvg_drawing_ctx_acquire_node_of_type (ctx, FOO); This is wrong now, since RsvgNode is a Rust structure. Instead, do RsvgNode *node; RsvgNodeFoo *foo; node = rsvg_drawing_ctx_acquire_node_of_type (ctx, FOO); foo = rsvg_rust_cnode_get_impl (node);
* rsvg-filter.[ch]: Move over to rsvg_rust_cnode_new()Federico Mena Quintero2017-02-171-489/+416
|
* Implement more generic RsvgNode methods in Rust to replace the C functionsFederico Mena Quintero2017-02-171-4/+4
| | | | We use the new rsvg_node_get_type() throughout.
* rsvg-filter.c: Iterate the children of nodes with rsvg_node_foreach_child()Federico Mena Quintero2017-01-261-65/+112
|
* rsvg-filter: Remove the 'upself' nonsenseFederico Mena Quintero2017-01-261-100/+100
| | | | Rename those variables for their actual purpose
* rsvg-filter: Don't use CLAMP(x, 0, max) on unsigned valuesFederico Mena Quintero2016-12-131-3/+3
| | | | | | The comparison against 0 is always true anyway. Also, fix a potential out-of-bounds read in discrete_component_transfer_func().
* Don't do our own compositing for feComposite; let Cairo handle itFederico Mena Quintero2016-12-121-85/+69
| | | | | We only do the Arithmetic mode for feComposite. All the others (over, in, out, atop, xor) are done in Cairo now.